From 1a9383d087a118c479e1dc44f48e12dfb88df48b Mon Sep 17 00:00:00 2001 From: lurchi Date: Thu, 16 Feb 2017 11:43:37 +0100 Subject: remove fluid temporarily --- prototype_2016/third_party/fluid/.gitignore | 4 - prototype_2016/third_party/fluid/.mailmap | 2 - prototype_2016/third_party/fluid/.travis.yml | 54 -- .../third_party/fluid/.travis/PKGBUILD.in | 47 -- .../third_party/fluid/.travis/bintray-wrapper.sh | 42 -- .../third_party/fluid/.travis/bintray.json.in | 29 -- prototype_2016/third_party/fluid/AUTHORS.md | 25 - prototype_2016/third_party/fluid/CMakeLists.txt | 84 --- prototype_2016/third_party/fluid/LICENSE.MPL2 | 373 -------------- prototype_2016/third_party/fluid/README.md | 77 --- .../fluid/controls/+material/BaseListItem.qml | 45 -- .../fluid/controls/+material/BodyLabel.qml | 30 -- .../fluid/controls/+material/CaptionLabel.qml | 20 - .../fluid/controls/+material/DisplayLabel.qml | 48 -- .../fluid/controls/+material/HeadlineLabel.qml | 22 - .../fluid/controls/+material/SubheadingLabel.qml | 29 -- .../fluid/controls/+material/ThinDivider.qml | 22 - .../fluid/controls/+material/TitleLabel.qml | 21 - .../third_party/fluid/controls/Action.qml | 79 --- .../third_party/fluid/controls/AppBar.qml | 169 ------ .../third_party/fluid/controls/AppToolBar.qml | 64 --- .../third_party/fluid/controls/BaseListItem.qml | 43 -- .../third_party/fluid/controls/BodyLabel.qml | 51 -- .../third_party/fluid/controls/CMakeLists.txt | 65 --- .../third_party/fluid/controls/CaptionLabel.qml | 35 -- prototype_2016/third_party/fluid/controls/Card.qml | 88 ---- .../third_party/fluid/controls/CircleImage.qml | 49 -- .../third_party/fluid/controls/Dialog.qml | 169 ------ .../third_party/fluid/controls/DisplayLabel.qml | 59 --- .../third_party/fluid/controls/FluidStyle.qml | 68 --- .../third_party/fluid/controls/FluidWindow.qml | 101 ---- .../third_party/fluid/controls/HeadlineLabel.qml | 35 -- prototype_2016/third_party/fluid/controls/Icon.qml | 173 ------- .../third_party/fluid/controls/IconButton.qml | 39 -- .../third_party/fluid/controls/InfoBar.qml | 149 ------ .../third_party/fluid/controls/ListItem.qml | 155 ------ .../fluid/controls/ListItemDelegate.qml | 42 -- .../third_party/fluid/controls/Loadable.qml | 70 --- .../fluid/controls/NavigationDrawer.qml | 195 ------- .../third_party/fluid/controls/NoiseBackground.qml | 99 ---- prototype_2016/third_party/fluid/controls/Page.qml | 139 ----- .../third_party/fluid/controls/PageStack.qml | 51 -- .../third_party/fluid/controls/Placeholder.qml | 66 --- .../third_party/fluid/controls/Showable.qml | 68 --- .../third_party/fluid/controls/Sidebar.qml | 168 ------ .../third_party/fluid/controls/SmoothFadeImage.qml | 309 ----------- .../fluid/controls/SmoothFadeLoader.qml | 137 ----- .../third_party/fluid/controls/Subheader.qml | 45 -- .../third_party/fluid/controls/SubheadingLabel.qml | 51 -- prototype_2016/third_party/fluid/controls/Tab.qml | 47 -- .../third_party/fluid/controls/TabbedPage.qml | 57 --- .../third_party/fluid/controls/ThinDivider.qml | 28 - .../third_party/fluid/controls/TitleLabel.qml | 36 -- .../third_party/fluid/controls/Units.qml | 125 ----- .../third_party/fluid/controls/controls.pri | 4 - .../third_party/fluid/controls/controls.qrc | 46 -- .../fluid/controls/iconthemeimageprovider.cpp | 47 -- .../fluid/controls/iconthemeimageprovider.h | 25 - .../third_party/fluid/controls/plugin.cpp | 42 -- .../third_party/fluid/controls/plugins.qmltypes | 569 --------------------- prototype_2016/third_party/fluid/controls/qmldir | 40 -- .../third_party/fluid/controls/qmldir_noplugin | 36 -- .../third_party/fluid/core/CMakeLists.txt | 32 -- prototype_2016/third_party/fluid/core/Object.qml | 38 -- .../third_party/fluid/core/PlatformExtensions.qml | 51 -- prototype_2016/third_party/fluid/core/Utils.qml | 106 ---- .../third_party/fluid/core/clipboard.cpp | 54 -- prototype_2016/third_party/fluid/core/clipboard.h | 41 -- prototype_2016/third_party/fluid/core/core.pri | 19 - prototype_2016/third_party/fluid/core/core.qrc | 8 - prototype_2016/third_party/fluid/core/device.cpp | 152 ------ prototype_2016/third_party/fluid/core/device.h | 67 --- .../third_party/fluid/core/doc/fluidcore.qdocconf | 47 -- .../third_party/fluid/core/iconsimageprovider.cpp | 67 --- .../third_party/fluid/core/iconsimageprovider.h | 25 - prototype_2016/third_party/fluid/core/plugin.cpp | 90 ---- .../third_party/fluid/core/plugins.qmltypes | 268 ---------- .../third_party/fluid/core/qmldateutils.cpp | 34 -- .../third_party/fluid/core/qmldateutils.h | 42 -- prototype_2016/third_party/fluid/core/qmldir | 8 - .../third_party/fluid/core/qmldir_noplugin | 5 - .../fluid/core/qqmlsortfilterproxymodel.cpp | 283 ---------- .../fluid/core/qqmlsortfilterproxymodel.h | 129 ----- .../third_party/fluid/core/standardpaths.cpp | 36 -- .../third_party/fluid/core/standardpaths.h | 51 -- .../fluid/demo/+material/StyledRectangle.qml | 22 - .../fluid/demo/+universal/StyledRectangle.qml | 22 - .../third_party/fluid/demo/BasicComponents.qml | 80 --- .../third_party/fluid/demo/CMakeLists.txt | 10 - .../third_party/fluid/demo/CompoundComponents.qml | 76 --- .../third_party/fluid/demo/MaterialComponents.qml | 74 --- .../fluid/demo/NavigationComponents.qml | 74 --- .../fluid/demo/Pages/Basic/BusyIndicatorPage.qml | 34 -- .../fluid/demo/Pages/Basic/ButtonPage.qml | 105 ---- .../fluid/demo/Pages/Basic/CheckBoxPage.qml | 91 ---- .../fluid/demo/Pages/Basic/ProgressBarPage.qml | 117 ----- .../fluid/demo/Pages/Basic/RadioButtonPage.qml | 90 ---- .../fluid/demo/Pages/Basic/SliderPage.qml | 142 ----- .../fluid/demo/Pages/Basic/SwitchPage.qml | 90 ---- .../fluid/demo/Pages/Compound/CardPage.qml | 77 --- .../fluid/demo/Pages/Compound/InfoBarPage.qml | 32 -- .../fluid/demo/Pages/Compound/ListItemPage.qml | 40 -- .../fluid/demo/Pages/Compound/SubPage.qml | 31 -- .../fluid/demo/Pages/Material/ActionButtonPage.qml | 60 --- .../fluid/demo/Pages/Material/WavePage.qml | 41 -- .../fluid/demo/Pages/Navigation/NavDrawerPage.qml | 27 - .../fluid/demo/Pages/Style/PalettePage.qml | 121 ----- .../fluid/demo/Pages/Style/PaletteSwatch.qml | 173 ------- .../fluid/demo/Pages/Style/TypographyPage.qml | 81 --- prototype_2016/third_party/fluid/demo/Style.qml | 75 --- .../third_party/fluid/demo/StyledRectangle.qml | 21 - prototype_2016/third_party/fluid/demo/demo.pro | 9 - prototype_2016/third_party/fluid/demo/demo.qrc | 30 -- prototype_2016/third_party/fluid/demo/main.cpp | 37 -- prototype_2016/third_party/fluid/demo/main.qml | 83 --- .../third_party/fluid/doc/defaults.qdocconf | 23 - .../third_party/fluid/doc/fluid.qdocconf | 59 --- .../fluid/doc/html-footer-offline.qdocconf | 18 - .../third_party/fluid/doc/src/fluidcontrols.qdoc | 25 - .../third_party/fluid/doc/src/fluidcore.qdoc | 30 -- .../third_party/fluid/doc/src/fluideffects.qdoc | 21 - .../third_party/fluid/doc/src/fluidmaterial.qdoc | 21 - .../third_party/fluid/doc/src/index.qdoc | 31 -- .../third_party/fluid/effects/BoxShadow.qml | 53 -- .../third_party/fluid/effects/CMakeLists.txt | 10 - .../third_party/fluid/effects/CircleMask.qml | 51 -- .../third_party/fluid/effects/Vignette.qml | 77 --- .../third_party/fluid/effects/effects.pri | 1 - .../third_party/fluid/effects/effects.qrc | 9 - .../third_party/fluid/effects/plugins.qmltypes | 15 - prototype_2016/third_party/fluid/effects/qmldir | 6 - prototype_2016/third_party/fluid/fluid.pri | 8 - .../third_party/fluid/material/ActionButton.qml | 106 ---- .../third_party/fluid/material/CMakeLists.txt | 11 - .../third_party/fluid/material/ElevationEffect.qml | 251 --------- .../third_party/fluid/material/Ripple.qml | 290 ----------- prototype_2016/third_party/fluid/material/Wave.qml | 80 --- .../third_party/fluid/material/material.pri | 2 - .../third_party/fluid/material/material.qrc | 10 - .../third_party/fluid/material/plugins.qmltypes | 569 --------------------- prototype_2016/third_party/fluid/material/qmldir | 7 - .../third_party/fluid/scripts/fetch_icons.sh | 39 -- .../third_party/fluid/src/CMakeLists.txt | 79 --- .../third_party/fluid/src/FluidConfig.cmake.in | 11 - prototype_2016/third_party/fluid/src/dateutils.cpp | 82 --- prototype_2016/third_party/fluid/src/dateutils.h | 44 -- prototype_2016/third_party/fluid/src/src.pri | 5 - .../third_party/fluid/tests/CMakeLists.txt | 1 - .../third_party/fluid/tests/auto/CMakeLists.txt | 7 - .../fluid/tests/auto/controls/CMakeLists.txt | 10 - .../fluid/tests/auto/controls/controls.cpp | 16 - .../fluid/tests/auto/controls/tst_icon.qml | 83 --- .../fluid/tests/auto/controls/tst_listitem.qml | 123 ----- .../fluid/tests/auto/core/CMakeLists.txt | 10 - .../third_party/fluid/tests/auto/core/core.cpp | 16 - .../fluid/tests/auto/core/tst_clipboard.qml | 59 --- .../fluid/tests/auto/core/tst_utils.qml | 38 -- .../fluid/tests/auto/material/CMakeLists.txt | 12 - .../fluid/tests/auto/material/material.cpp | 16 - .../fluid/tests/auto/material/material.qrc | 5 - .../tests/auto/material/qtquickcontrols2.conf | 2 - .../fluid/tests/auto/material/tst_ripple.qml | 88 ---- .../fluid/tests/auto/material/tst_typography.qml | 166 ------ 163 files changed, 11421 deletions(-) delete mode 100644 prototype_2016/third_party/fluid/.gitignore delete mode 100644 prototype_2016/third_party/fluid/.mailmap delete mode 100644 prototype_2016/third_party/fluid/.travis.yml delete mode 100644 prototype_2016/third_party/fluid/.travis/PKGBUILD.in delete mode 100755 prototype_2016/third_party/fluid/.travis/bintray-wrapper.sh delete mode 100644 prototype_2016/third_party/fluid/.travis/bintray.json.in delete mode 100644 prototype_2016/third_party/fluid/AUTHORS.md delete mode 100644 prototype_2016/third_party/fluid/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/LICENSE.MPL2 delete mode 100644 prototype_2016/third_party/fluid/README.md delete mode 100644 prototype_2016/third_party/fluid/controls/+material/BaseListItem.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/BodyLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/CaptionLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/DisplayLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/HeadlineLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/SubheadingLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/ThinDivider.qml delete mode 100644 prototype_2016/third_party/fluid/controls/+material/TitleLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Action.qml delete mode 100644 prototype_2016/third_party/fluid/controls/AppBar.qml delete mode 100644 prototype_2016/third_party/fluid/controls/AppToolBar.qml delete mode 100644 prototype_2016/third_party/fluid/controls/BaseListItem.qml delete mode 100644 prototype_2016/third_party/fluid/controls/BodyLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/controls/CaptionLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Card.qml delete mode 100644 prototype_2016/third_party/fluid/controls/CircleImage.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Dialog.qml delete mode 100644 prototype_2016/third_party/fluid/controls/DisplayLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/FluidStyle.qml delete mode 100644 prototype_2016/third_party/fluid/controls/FluidWindow.qml delete mode 100644 prototype_2016/third_party/fluid/controls/HeadlineLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Icon.qml delete mode 100644 prototype_2016/third_party/fluid/controls/IconButton.qml delete mode 100644 prototype_2016/third_party/fluid/controls/InfoBar.qml delete mode 100644 prototype_2016/third_party/fluid/controls/ListItem.qml delete mode 100644 prototype_2016/third_party/fluid/controls/ListItemDelegate.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Loadable.qml delete mode 100644 prototype_2016/third_party/fluid/controls/NavigationDrawer.qml delete mode 100644 prototype_2016/third_party/fluid/controls/NoiseBackground.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Page.qml delete mode 100644 prototype_2016/third_party/fluid/controls/PageStack.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Placeholder.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Showable.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Sidebar.qml delete mode 100644 prototype_2016/third_party/fluid/controls/SmoothFadeImage.qml delete mode 100644 prototype_2016/third_party/fluid/controls/SmoothFadeLoader.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Subheader.qml delete mode 100644 prototype_2016/third_party/fluid/controls/SubheadingLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Tab.qml delete mode 100644 prototype_2016/third_party/fluid/controls/TabbedPage.qml delete mode 100644 prototype_2016/third_party/fluid/controls/ThinDivider.qml delete mode 100644 prototype_2016/third_party/fluid/controls/TitleLabel.qml delete mode 100644 prototype_2016/third_party/fluid/controls/Units.qml delete mode 100644 prototype_2016/third_party/fluid/controls/controls.pri delete mode 100644 prototype_2016/third_party/fluid/controls/controls.qrc delete mode 100644 prototype_2016/third_party/fluid/controls/iconthemeimageprovider.cpp delete mode 100644 prototype_2016/third_party/fluid/controls/iconthemeimageprovider.h delete mode 100644 prototype_2016/third_party/fluid/controls/plugin.cpp delete mode 100644 prototype_2016/third_party/fluid/controls/plugins.qmltypes delete mode 100644 prototype_2016/third_party/fluid/controls/qmldir delete mode 100644 prototype_2016/third_party/fluid/controls/qmldir_noplugin delete mode 100644 prototype_2016/third_party/fluid/core/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/core/Object.qml delete mode 100644 prototype_2016/third_party/fluid/core/PlatformExtensions.qml delete mode 100644 prototype_2016/third_party/fluid/core/Utils.qml delete mode 100644 prototype_2016/third_party/fluid/core/clipboard.cpp delete mode 100644 prototype_2016/third_party/fluid/core/clipboard.h delete mode 100644 prototype_2016/third_party/fluid/core/core.pri delete mode 100644 prototype_2016/third_party/fluid/core/core.qrc delete mode 100644 prototype_2016/third_party/fluid/core/device.cpp delete mode 100644 prototype_2016/third_party/fluid/core/device.h delete mode 100644 prototype_2016/third_party/fluid/core/doc/fluidcore.qdocconf delete mode 100644 prototype_2016/third_party/fluid/core/iconsimageprovider.cpp delete mode 100644 prototype_2016/third_party/fluid/core/iconsimageprovider.h delete mode 100644 prototype_2016/third_party/fluid/core/plugin.cpp delete mode 100644 prototype_2016/third_party/fluid/core/plugins.qmltypes delete mode 100644 prototype_2016/third_party/fluid/core/qmldateutils.cpp delete mode 100644 prototype_2016/third_party/fluid/core/qmldateutils.h delete mode 100644 prototype_2016/third_party/fluid/core/qmldir delete mode 100644 prototype_2016/third_party/fluid/core/qmldir_noplugin delete mode 100644 prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.cpp delete mode 100644 prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.h delete mode 100644 prototype_2016/third_party/fluid/core/standardpaths.cpp delete mode 100644 prototype_2016/third_party/fluid/core/standardpaths.h delete mode 100644 prototype_2016/third_party/fluid/demo/+material/StyledRectangle.qml delete mode 100644 prototype_2016/third_party/fluid/demo/+universal/StyledRectangle.qml delete mode 100644 prototype_2016/third_party/fluid/demo/BasicComponents.qml delete mode 100644 prototype_2016/third_party/fluid/demo/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/demo/CompoundComponents.qml delete mode 100644 prototype_2016/third_party/fluid/demo/MaterialComponents.qml delete mode 100644 prototype_2016/third_party/fluid/demo/NavigationComponents.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/BusyIndicatorPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/ButtonPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/ProgressBarPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/RadioButtonPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/SliderPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Basic/SwitchPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Compound/CardPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Compound/InfoBarPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Compound/ListItemPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Compound/SubPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Material/ActionButtonPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Material/WavePage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Navigation/NavDrawerPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Style/PalettePage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Style/PaletteSwatch.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Pages/Style/TypographyPage.qml delete mode 100644 prototype_2016/third_party/fluid/demo/Style.qml delete mode 100644 prototype_2016/third_party/fluid/demo/StyledRectangle.qml delete mode 100644 prototype_2016/third_party/fluid/demo/demo.pro delete mode 100644 prototype_2016/third_party/fluid/demo/demo.qrc delete mode 100644 prototype_2016/third_party/fluid/demo/main.cpp delete mode 100644 prototype_2016/third_party/fluid/demo/main.qml delete mode 100644 prototype_2016/third_party/fluid/doc/defaults.qdocconf delete mode 100644 prototype_2016/third_party/fluid/doc/fluid.qdocconf delete mode 100644 prototype_2016/third_party/fluid/doc/html-footer-offline.qdocconf delete mode 100644 prototype_2016/third_party/fluid/doc/src/fluidcontrols.qdoc delete mode 100644 prototype_2016/third_party/fluid/doc/src/fluidcore.qdoc delete mode 100644 prototype_2016/third_party/fluid/doc/src/fluideffects.qdoc delete mode 100644 prototype_2016/third_party/fluid/doc/src/fluidmaterial.qdoc delete mode 100644 prototype_2016/third_party/fluid/doc/src/index.qdoc delete mode 100644 prototype_2016/third_party/fluid/effects/BoxShadow.qml delete mode 100644 prototype_2016/third_party/fluid/effects/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/effects/CircleMask.qml delete mode 100644 prototype_2016/third_party/fluid/effects/Vignette.qml delete mode 100644 prototype_2016/third_party/fluid/effects/effects.pri delete mode 100644 prototype_2016/third_party/fluid/effects/effects.qrc delete mode 100644 prototype_2016/third_party/fluid/effects/plugins.qmltypes delete mode 100644 prototype_2016/third_party/fluid/effects/qmldir delete mode 100644 prototype_2016/third_party/fluid/fluid.pri delete mode 100644 prototype_2016/third_party/fluid/material/ActionButton.qml delete mode 100644 prototype_2016/third_party/fluid/material/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/material/ElevationEffect.qml delete mode 100644 prototype_2016/third_party/fluid/material/Ripple.qml delete mode 100644 prototype_2016/third_party/fluid/material/Wave.qml delete mode 100644 prototype_2016/third_party/fluid/material/material.pri delete mode 100644 prototype_2016/third_party/fluid/material/material.qrc delete mode 100644 prototype_2016/third_party/fluid/material/plugins.qmltypes delete mode 100644 prototype_2016/third_party/fluid/material/qmldir delete mode 100755 prototype_2016/third_party/fluid/scripts/fetch_icons.sh delete mode 100644 prototype_2016/third_party/fluid/src/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/src/FluidConfig.cmake.in delete mode 100644 prototype_2016/third_party/fluid/src/dateutils.cpp delete mode 100644 prototype_2016/third_party/fluid/src/dateutils.h delete mode 100644 prototype_2016/third_party/fluid/src/src.pri delete mode 100644 prototype_2016/third_party/fluid/tests/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/tests/auto/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/tests/auto/controls/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/tests/auto/controls/controls.cpp delete mode 100644 prototype_2016/third_party/fluid/tests/auto/controls/tst_icon.qml delete mode 100644 prototype_2016/third_party/fluid/tests/auto/controls/tst_listitem.qml delete mode 100644 prototype_2016/third_party/fluid/tests/auto/core/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/tests/auto/core/core.cpp delete mode 100644 prototype_2016/third_party/fluid/tests/auto/core/tst_clipboard.qml delete mode 100644 prototype_2016/third_party/fluid/tests/auto/core/tst_utils.qml delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/CMakeLists.txt delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/material.cpp delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/material.qrc delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/qtquickcontrols2.conf delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/tst_ripple.qml delete mode 100644 prototype_2016/third_party/fluid/tests/auto/material/tst_typography.qml diff --git a/prototype_2016/third_party/fluid/.gitignore b/prototype_2016/third_party/fluid/.gitignore deleted file mode 100644 index 305f772..0000000 --- a/prototype_2016/third_party/fluid/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -build/ -material-design-icons/ -icons/ -*.user diff --git a/prototype_2016/third_party/fluid/.mailmap b/prototype_2016/third_party/fluid/.mailmap deleted file mode 100644 index dccdf66..0000000 --- a/prototype_2016/third_party/fluid/.mailmap +++ /dev/null @@ -1,2 +0,0 @@ -Pier Luigi Fiorini -Pier Luigi Fiorini diff --git a/prototype_2016/third_party/fluid/.travis.yml b/prototype_2016/third_party/fluid/.travis.yml deleted file mode 100644 index e0d227d..0000000 --- a/prototype_2016/third_party/fluid/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -language: c - -compiler: - - gcc - - clang - -sudo: required - -env: - global: - # BINTRAY_USER - - secure: "vEoMBcWLvExapeJ7644Qa5j8zQcIRvSmZawrDWciQAVv47ckjS4CzeKxfniwYuVcMY+G8mk+NANM/cvEYhBuBx1YLRz7qR9WkLtIGs5ZN/Tqna8bEYDx4fz/grsaPIO0zSCOlFy4gjW4OTZc0Pi6h82UNkbu4VruCA0+KHRMeLbqP2SnhLTlKibofp3YgFLK+MpBjQ9m99rfkRlVWSdY6dscST3s5ROreTepoaP1Q4XzG1eRp2aLSqKurWnDdFdXZhInHeWxWwZ5lRPcCj29+oYgU8cvxA/D2DuDfPlM92XzqTTqD9tTztnz0klN/tQaXECaFZYu5/BC/o71FmWtYzuc7SScggFU1XLmEPdsYy8B/bDyvP+QueiwO/i3ZnEiSLccuN7fkEi2qCHLjpcMRJb/A6NKcgkyFHN65ncqcvG3xrk7mcCAMiupkpx0MVskiYI0HD3g/2auIEjDcqKbOGYV1mRwGhWwV51qfDYsAtSQcn5JaTN3ioFjfPpSI4swevAfOdBp1vhkFXvYQHDEWtyaQWQkiZN/D2osO3VoTgXMUF68I2BNskUVXqU/X18f3xzcv3PXsUCTWAY8tQ7iDt93UQyC/rtqnxUhKJqcnM2ri7GGk2yK/GHyjUonf9GO5mucPyAWzkPP13T6gj1Y/XH76wFBurdP89FUidyiVVE=" - # BINTRAY_API_KEY - - secure: "Z4721k6LWdc7/UDVkBSVxr1G2nRWJu1817jCpuE+6pub65WhGqBB20xwI3jsp/J2U2iX3RUgLiJTCRPuQnLoxaDRXY1WZa2qXLumgGcYwgwgCLQgBIvV5OWwPgBpSl40f7w1c8qfEVTeFt4X51fwZR+2WSNzCn9dHZFICHwweasNXMe/1/nnopvZmTmnAICLTTGM3QL8TgrqnAevNtR9/ILGli6YewFmpPBiy/nV5SIPlay4s0gtpr4WOACHbCjyi2dY+OMgln+zcrV2Xe75b/G9G+JbjmQj2wb3MviQhQ9EXGhxcRZTmpgLmZ4VXuFizsl1ssfte7p8JEHdwJi1nnGkjuP0xcmfc/t8y3u/QFQbPd0K/xgQhrHVlVytDGgrwZdfGoHV43E5v338E6vPd0R4PaZbKKwvEfze3T+X04wrnMm2SgtVQnr4l0WBwYEsOLP+MdFyfHsXs74MMg+1VQcz6gnD7YPOPqftds0ZaEltIn6VOZqt72K06t544jjFv1fIxA0bWDFBgIECfF6dGRykaw/Jo/29VoUT9K4dfMX/V9LMxy1x3p/ltW1U0VryqUCzj/QqSJw82rEYkMMvQYq8x+eBdlYjbAZZhRGvMHYa+1uHwiKbyRyQQZlc+r8b1/usI9B2E4y12dPPGmHBW8gbRHfoGCX5m3aBkaqUpeE=" - # BINTRAY_REPO_OWNER - - secure: "fHxkvRKupN+jmbncPeNIVxvAxmHpZskJ89jJoDM3Fdmheq08+BPCLVUaDX3C1Ux4ETCONKKFwiQ152M30TczU95OXCfs9N3Uo631CL0AFH0vavBPDtAdZyOdljS+gkFMRCT/NFxdTgaju128jYVqumJw6fSVke8Edh43cDURhhpD6Xr6qm45620Iua3/Vieu/IBzoCISV4RgBxSgPOBew8diIk9nVqk4nSeU9aP110lJ5ExhI++G7sRaZvlMTkHdti5Wcg2/MXy883IVAacieOALRmdBuW1lv1lgEkV6KZ0cjmiG8B0XuvkWCgx05wbY4FWnAZlU6mkuTUPo4Sg2JhtGUr1ejAHe3TF1g05s2JBiP8oX2vdflh5Immyi0afpdzJGxinrEXY39QBmfK8Donkn78Flz7NdLQz882bdQsQ3MnFGHG8FOqMdJWAAUxpn7L5SCgShH/GpspFnvONWKmJybsRAdMZTHJL7d4pwYgo854vo43p9RDGSZX/jdQ6Gb874rNUdtfWXZLWpaq4jH/jigC+WGG4r78kNIMoylRRqINfg2F7jjR4Z/rieePZ7d0IUeD4+a0XFriYuix415FPpRcogB4cpXmDn6ZQTCfd4QDBxILlv6phHMcTOvrwgBMd40OCtewkXrODIKqC6xaeWf99/8sJti5ZUZK5DiuA=" - -arch: - packages: - - qt5-declarative - - qt5-quickcontrols2 - - qt5-graphicaleffects - - qt5-svg - - extra-cmake-modules - - xorg-server-xvfb - - clang - #- clazy-git - script: - - scripts/fetch_icons.sh - - if [ "$CC" = "gcc" ]; then cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi - #- if [ "$CC" = "clang" ]; then env CLAZY_CHECKS="level1" cmake . -DCMAKE_CXX_COMPILER=clazy -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi - - if [ "$CC" = "clang" ]; then cmake . -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=/usr; fi - - make - - sudo make install - - xvfb-run -a -s "-screen 0 800x600x24" make check - - ./.travis/bintray-wrapper.sh - -script: - - "curl -s https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh | bash" - -deploy: - provider: bintray - on: - branch: develop - condition: "$CC = gcc" - file: cibuild/bintray.json - user: - secure: "ABQ0Vh69XIJ38UOTGQOmnJ/zr1E0zNK6bDkqJ+ioujqBE8pvZuppdb9DyPmqscUgJWLQy8C7qfRMXMkkBUdecqV7LAFplO08yMxXmSNCq2gYi7l8jY6WCp+dyno+8tO7P7zO/8Vgae99c2MNkCVw8FpN7vFC3l5QLBUuEuSgCWYInW4aXkQnTkKNPN5hiMb7pJ7c1WMo6YKydkKs6yL4ACUkTzoR8iuTLqIAvi2w9UMzIUE16FGOHHUSZZI0UwExhSPTmH30pLddKexvdip6AyROGPDSqgh1zh9mIpYyz6BRWoTPR8LCpAFE2soTF2t0XdkRoQeZS6+zXJdU3AdJnEj1y2n9zxR3CSl+MfeJCz24yAJ+2shLyl+LZwhert7z45GC5CNrFsxliA7wMCuP3AeBEwCYaTgNcB5mQWK7+nyQuEZ43v/ffQiZUziEPOsHpxdggPN4TQ/KLSwC9eSKyh7dvlvupfd5p509d06239gXVNwDU45H3in2XKv9WQQIBXLW48IoY7YQFDvKCsAuNNn1fJLMLhg4MUqSYWSCYGjGn3nHBm9IJ0Y176dzN7c+2kP+Vm6x9PhWR6ZDpRVh4ygh+TKVNTVpzQ2bD/J+vWcGTf1KP4GJOLPWe7S0BsXNWry1jGz8v+9IDDPMVf9bFRSBZNSGD/qU8FCsS6nVXOU=" - key: - secure: "x5L7Cc9ncaXhjLjGi/+0P1Yjzo5yPTPqB47odKvnvHVG91n7LR0tCY8pKMAITSlnKqxlV6q/jlr5Ur8JzY0hwwi1KaM7t80cjWn9feE79DsA2Tpdxks2eRLQs1kXoqepa+tpuxOCysrYL5KMw/ly3vnnnkeXleb05bdadZLxdf54BK+6pA8djwKoVAba4lQDBL4RrdN7yQYB5ZBdGHFO6BScaVR1xuykOalfSQsQWAQqENbnOSFpxkdxYt0FUsP2N0UwqZ7kbX7XtdRKCfubnRJ9YoNh4kbImRLKbosl1NX8+MAwbudnKa6AV3P+LxQZA6cU1T8JIu6W54A7pXJYnf2bOezSy4ifzE0L+4rgbrIQVL9AUcWpK8gDkdpPJ6B6gwWW8+VP+wDCnzXEk9DXBlOLCGeHBaDOJAeOkCC2NJ64hC0bQfILO79KKYkpQTTf1uepngeie7y50CmOq4CaxAX1rQcPz2GlZlp5XIOZX5ZV5GABxORCn4zANrs7hmhY44ooky6KltiA35vgFxJGfqkgSUWWFqHvEPwDN2anRLjlY+trMN3YRMBCnhL3WCtHjiJ5sUW6drUcBfzcoJxGY7JF31q8N7y0ZhdXNc5P6GC/f62ggHDnk9lklOb4DlEqh+npREk+o89TUU/RkXNPuLBpNiq3UwCrDlKbpoULhgs=" - -notifications: - email: false - slack: lirios:fdUqVmPzqPskEL1UBhqapZ0w diff --git a/prototype_2016/third_party/fluid/.travis/PKGBUILD.in b/prototype_2016/third_party/fluid/.travis/PKGBUILD.in deleted file mode 100644 index 82a49c2..0000000 --- a/prototype_2016/third_party/fluid/.travis/PKGBUILD.in +++ /dev/null @@ -1,47 +0,0 @@ -# Maintainer: Pier Luigi Fiorini - -pkgname=fluid-git -pkgver=@PKGVER@ -pkgrel=1 -pkgdesc="Components for Qt Quick applications" -arch=('i686' 'x86_64' 'armv6h' 'armv7h') -url='https://github.com/lirios' -license=('MPL2') -depends=('qt5-quickcontrols2' 'qt5-graphicaleffects' 'qt5-svg') -makedepends=('git' 'extra-cmake-modules') -conflicts=('fluid') -replaces=('fluid') -provides=('fluid') -groups=('liri-git') - -_gitroot="git://github.com/lirios/fluid.git" -_gitbranch=@GITBRANCH@ -_gitname=$pkgname -source=(${_gitname}::${_gitroot}#branch=${_gitbranch}) -md5sums=('SKIP') - -pkgver() { - cd ${srcdir}/${_gitname} - echo "$(git log -1 --format="%cd" --date=short | tr -d '-').$(git log -1 --format="%h")" -} - -prepare() { - mkdir -p build -} - -build() { - cd build - cmake ../${_gitname} \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_INSTALL_DIR=lib \ - -DLIBEXEC_INSTALL_DIR=lib \ - -DQML_INSTALL_DIR=lib/qt/qml \ - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo - make -} - -package() { - cd build - make DESTDIR="${pkgdir}" install -} diff --git a/prototype_2016/third_party/fluid/.travis/bintray-wrapper.sh b/prototype_2016/third_party/fluid/.travis/bintray-wrapper.sh deleted file mode 100755 index 04c2ebd..0000000 --- a/prototype_2016/third_party/fluid/.travis/bintray-wrapper.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -# This file is part of Liri. -# -# Copyright (C) 2016 Pier Luigi Fiorini -# -# $BEGIN_LICENSE:BSD$ -# -# You may use this file under the terms of the BSD license as follows: -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the Hawaii Project 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 Pier Luigi Fiorini 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. -# -# $END_LICENSE$ -# - -if [ "$CC" = "gcc" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then - if [ "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" ]; then - curl -s https://raw.githubusercontent.com/lirios/repotools/${TRAVIS_BRANCH}/travis/bintray.sh > .travis/bintray.sh - chmod 755 .travis/bintray.sh - exec ./.travis/bintray.sh - fi -fi diff --git a/prototype_2016/third_party/fluid/.travis/bintray.json.in b/prototype_2016/third_party/fluid/.travis/bintray.json.in deleted file mode 100644 index 690b379..0000000 --- a/prototype_2016/third_party/fluid/.travis/bintray.json.in +++ /dev/null @@ -1,29 +0,0 @@ -{ - "package": { - "name": "fluid", - "repo": "archlinux-@GITBRANCH@", - "subject": "liri", - "desc": "A collection of cross-platform QtQuick components for building fluid and dynamic applications", - "website_url": "http://liri.io", - "issue_tracker_url": "https://github.com/lirios/fluid", - "vcs_url": "https://github.com/lirios/fluid", - "licenses": ["MPL-2.0"], - "labels": ["qt", "qml", "quick", "controls", "material"] - }, - "version": { - "name": "@PKGVER@", - "desc": "Arch Linux build from CI", - "released": "@TODAY@", - "vcs_tag": "@GITREV@", - "attributes": [ - {"name": "gitrevision", "values": ["@GITREV@"], "type": "string"}, - {"name": "gitdate", "values": ["@GITDATE@"], "type": "date"} - ], - "gpgSign": false - }, - "files": [ - {"includePattern": "cibuild/(fluid-git-.*.pkg.tar.xz)", "uploadPattern": "@ARCH@/$1", "matrixParams": {"override": 1}}, - {"includePattern": "cibuild/(fluid.db.tar.gz)", "uploadPattern": "@ARCH@/fluid.db", "matrixParams": {"override": 1}} - ], - "publish": true -} diff --git a/prototype_2016/third_party/fluid/AUTHORS.md b/prototype_2016/third_party/fluid/AUTHORS.md deleted file mode 100644 index 77aee46..0000000 --- a/prototype_2016/third_party/fluid/AUTHORS.md +++ /dev/null @@ -1,25 +0,0 @@ -Fluid -===== - -# Authors - - * Pier Luigi Fiorini - * Michael Spencer - -This is the list of contributors to this code base. - -Names are sorted by number of commits at the time of this writing. -Commit data has been generated with: - -```sh -git shortlog -s -e -n -``` - -Commit counts have been removed, since they change pretty frequently. - -Remember to update this file before any release is made, also make sure -a .mailmap file is maintained if committer names and email addresses -change over time. - - * Pier Luigi Fiorini - * Michael Spencer diff --git a/prototype_2016/third_party/fluid/CMakeLists.txt b/prototype_2016/third_party/fluid/CMakeLists.txt deleted file mode 100644 index 3411262..0000000 --- a/prototype_2016/third_party/fluid/CMakeLists.txt +++ /dev/null @@ -1,84 +0,0 @@ -project(Fluid) - -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) -cmake_policy(VERSION 3.4.1) - -# Instruct CMake to run moc and rrc automatically when needed -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) - -# Apple-specific configuration -set(APPLE_SUPPRESS_X11_WARNING ON) - -# Set version -set(PROJECT_VERSION "0.9.0") -set(PROJECT_VERSION_MAJOR 0) -set(PROJECT_SOVERSION 0) - -# Set up packaging -if(NOT USE_SUPERBUILD) - set(CPACK_PACKAGE_NAME "fluid") - set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") - set(CPACK_GENERATOR "TGZ") - set(CPACK_SET_DESTDIR FALSE) - set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") - set(CPACK_SOURCE_IGNORE_FILES "/build/;/.git;/.tx/;~$;${CPACK_SOURCE_IGNORE_FILES}") - include(CPack) - add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) -endif() - -# ECM -find_package(ECM 1.7.0 REQUIRED NO_MODULE) -list(APPEND CMAKE_MODULE_PATH - "${ECM_MODULE_PATH}" - "${ECM_KDE_MODULE_DIR}" -) - -# Macros -include(FeatureSummary) -include(KDEInstallDirs) -include(KDECompilerSettings) -include(KDECMakeSettings) - -# Build flags -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Werror -Wall -Wextra -Wformat -Wswitch-default -Wunused-parameter -pedantic -std=c++11") - -# Assume release build by default -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "" FORCE) -endif() - -# Find Qt5 -set(REQUIRED_QT_VERSION "5.7.0") -find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED COMPONENTS - Svg Gui Qml Quick QuickTest QuickControls2) - -# Find QT_INSTALL_DOCS -get_target_property(QMAKE_EXECUTABLE Qt5::qmake LOCATION) -if(NOT QT_INSTALL_DOCS) - exec_program(${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_DOCS" RETURN_VALUE return_code OUTPUT_VARIABLE QT_INSTALL_DOCS) -endif() - -# Documentation target -find_program(QDOC_EXECUTABLE qdoc-qt5 qdoc) -add_custom_target(docs - COMMAND QT_INSTALL_DOCS=${QT_INSTALL_DOCS} QT_VERSION_TAG=5.7 FLUID_VERSION=${PROJECT_VERSION} FLUID_VERSION_TAG=1.0 FLUID_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR} ${QDOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doc/fluid.qdocconf) - -# Subdirectories -add_subdirectory(controls) -add_subdirectory(core) -add_subdirectory(demo) -add_subdirectory(effects) -add_subdirectory(src) -add_subdirectory(tests) -add_subdirectory(material) - -# Install icons -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/icons") - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/icons" - DESTINATION ${QML_INSTALL_DIR}/Fluid/Controls - PATTERN "icons/icons.qrc" EXCLUDE) -endif() - -# Display feature summary -feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/prototype_2016/third_party/fluid/LICENSE.MPL2 b/prototype_2016/third_party/fluid/LICENSE.MPL2 deleted file mode 100644 index 14e2f77..0000000 --- a/prototype_2016/third_party/fluid/LICENSE.MPL2 +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/prototype_2016/third_party/fluid/README.md b/prototype_2016/third_party/fluid/README.md deleted file mode 100644 index 30110c4..0000000 --- a/prototype_2016/third_party/fluid/README.md +++ /dev/null @@ -1,77 +0,0 @@ -Fluid -===== - -[![ZenHub.io](https://img.shields.io/badge/supercharged%20by-zenhub.io-blue.svg)](https://zenhub.io) - -[![License](https://img.shields.io/badge/license-MPL2%2B-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/) -[![GitHub release](https://img.shields.io/github/release/lirios/fluid.svg)](https://github.com/lirios/fluid) -[![Build Status](https://travis-ci.org/lirios/fluid.svg?branch=develop)](https://travis-ci.org/lirios/fluid) -[![GitHub issues](https://img.shields.io/github/issues/lirios/fluid.svg)](https://github.com/lirios/fluid/issues) -[![Maintained](https://img.shields.io/maintenance/yes/2016.svg)](https://github.com/lirios/fluid/commits/develop) - -Fluid is a collection of cross-platform QtQuick components for building fluid and dynamic applications. - -## Dependencies - -Qt >= 5.7.0 with at least the following modules is required: - - * [qtbase](http://code.qt.io/cgit/qt/qtbase.git) - * [qtdeclarative](http://code.qt.io/cgit/qt/qtdeclarative.git) - * [qtquickcontrols2](http://code.qt.io/cgit/qt/qtquickcontrols2.git) - * [qtgraphicaleffects](http://code.qt.io/cgit/qt/qtgraphicaleffects.git) - * [qtsvg](http://code.qt.io/cgit/qt/qtsvg.git) - -## System-wide installation - -First, if you want to include the Material Design icons used with the `Icon` component, run: - -```sh -./scripts/fetch_icons.sh -``` - -This will clone the Google repository holding the icons and copy the SVG icons into the `icons` directory. - -From the root of the repository, run: - -```sh -mkdir build; cd build -cmake .. -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -make -make install # use sudo if necessary -``` - -On the `cmake` line, you can specify additional configuration parameters: - - * `-DCMAKE_INSTALL_PREFIX=/path/to/install` (for example, `/opt/liri` or `/usr`) - * `-DCMAKE_BUILD_TYPE=`, where `` is one of: - * **Debug:** debug build - * **Release:** release build - * **RelWithDebInfo:** release build with debugging information - -## Per-project installation using QMake - -First, clone this repository. - -Run the icon script located here: - -```sh -./scripts/fetch_icons.sh -``` - -In your project file, include the fluid.pri file: - `include(path/to/fluid.pri)` - -Then, in your `main.cpp` file or wherever you set up a `QQmlApplicationEngine`: -* add this include directive : -`#include "iconthemeimageprovider.h"` -* add the resources files to your `QQmlApplicationEngine` import paths : -`engine.addImportPath(QStringLiteral("qrc:/"));` -* register fluid's image providers to the engine : -`engine.addImageProvider(QLatin1String("fluidicons"), new IconsImageProvider());` -`engine.addImageProvider(QLatin1String("fluidicontheme"), new IconThemeImageProvider());` -* and after that you can load your qml file: -`engine.load(QUrl(QStringLiteral("qrc:/main.qml")));` - -## Licensing - -Licensed under the terms of the Mozilla Public License version 2.0. diff --git a/prototype_2016/third_party/fluid/controls/+material/BaseListItem.qml b/prototype_2016/third_party/fluid/controls/+material/BaseListItem.qml deleted file mode 100644 index 41f2692..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/BaseListItem.qml +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Material 1.0 - -ListItemDelegate { - id: listItem - - background: Rectangle { - color: listItem.highlighted ? Qt.rgba(0,0,0,0.05) - : ripple.containsMouse ? Qt.rgba(0,0,0,0.03) - : Qt.rgba(0,0,0,0) - - Ripple { - id: ripple - width: parent.width - height: parent.height - enabled: interactive - - control: listItem - } - - ThinDivider { - x: dividerInset - y: parent.height - height - - width: parent.width - x - - visible: showDivider - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/+material/BodyLabel.qml b/prototype_2016/third_party/fluid/controls/+material/BodyLabel.qml deleted file mode 100644 index cf52144..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/BodyLabel.qml +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Core 1.0 - -Label { - property int level: 1 - - font.pixelSize: Device.isMobile ? 14 : 13 - font.weight: level == 1 ? Font.Normal : Font.Medium - lineHeight: level <= 1 ? 20.0 : 24.0 - lineHeightMode: Text.FixedHeight - onLevelChanged: { - if (level < 1 || level > 2) - console.error("BodyLabel level must be either 1 or 2") - } -} diff --git a/prototype_2016/third_party/fluid/controls/+material/CaptionLabel.qml b/prototype_2016/third_party/fluid/controls/+material/CaptionLabel.qml deleted file mode 100644 index 4ef1710..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/CaptionLabel.qml +++ /dev/null @@ -1,20 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 - -Label { - font.pixelSize: 12 -} diff --git a/prototype_2016/third_party/fluid/controls/+material/DisplayLabel.qml b/prototype_2016/third_party/fluid/controls/+material/DisplayLabel.qml deleted file mode 100644 index 72087d1..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/DisplayLabel.qml +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Core 1.0 - -Label { - property int level: 1 - - font.pixelSize: { - if (level <= 1) - return 34 - else if (level == 2) - return 45 - else if (level == 3) - return 56 - return 112 - } - lineHeight: { - if (level <= 1) - return 40.0 - else if (level == 2) - return 48.0 - return 1.0 - } - lineHeightMode: { - if (level <= 2) - return Text.FixedHeight - return Text.ProportionalHeight - } - font.weight: level >= 4 ? Font.Light : Font.Normal - onLevelChanged: { - if (level < 1 || level > 4) - console.error("DisplayLabel level must be between 1 and 4") - } -} diff --git a/prototype_2016/third_party/fluid/controls/+material/HeadlineLabel.qml b/prototype_2016/third_party/fluid/controls/+material/HeadlineLabel.qml deleted file mode 100644 index 8264c2d..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/HeadlineLabel.qml +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 - -Label { - font.pixelSize: 24 - lineHeight: 32.0 - lineHeightMode: Text.FixedHeight -} diff --git a/prototype_2016/third_party/fluid/controls/+material/SubheadingLabel.qml b/prototype_2016/third_party/fluid/controls/+material/SubheadingLabel.qml deleted file mode 100644 index 06c005b..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/SubheadingLabel.qml +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Core 1.0 - -Label { - property int level: 1 - - font.pixelSize: Device.isMobile ? 16 : 15 - lineHeight: level <= 1 ? 24.0 : 28.0 - lineHeightMode: Text.FixedHeight - onLevelChanged: { - if (level < 1 || level > 2) - console.error("SubheadingLabel level must be either 1 or 2 with the Material style") - } -} diff --git a/prototype_2016/third_party/fluid/controls/+material/ThinDivider.qml b/prototype_2016/third_party/fluid/controls/+material/ThinDivider.qml deleted file mode 100644 index 113c2b0..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/ThinDivider.qml +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls.Material 2.0 - -Rectangle { - color: Material.dividerColor - width: parent.width - height: 1 -} diff --git a/prototype_2016/third_party/fluid/controls/+material/TitleLabel.qml b/prototype_2016/third_party/fluid/controls/+material/TitleLabel.qml deleted file mode 100644 index bf62b29..0000000 --- a/prototype_2016/third_party/fluid/controls/+material/TitleLabel.qml +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 - -Label { - font.pixelSize: 20 - font.weight: Font.Medium -} diff --git a/prototype_2016/third_party/fluid/controls/Action.qml b/prototype_2016/third_party/fluid/controls/Action.qml deleted file mode 100644 index b73f524..0000000 --- a/prototype_2016/third_party/fluid/controls/Action.qml +++ /dev/null @@ -1,79 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.5 -import Fluid.Core 1.0 - -/*! - \qmltype Action - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Represents an action shown in an action bar, context menu, or list. - - One of the most common uses of actions is displaying actions in the action bar of a page - using the \l Page::actions property. See the example for \l Page for more details. - */ -Object { - id: action - - /*! - Set to \c false to disable the action in the UI. - */ - property bool enabled: true - - property string iconName - - /*! - A URL pointing to an image to display as the icon. By default, this is - a special URL representing the icon named by \l iconName from the Material Design - icon collection or FontAwesome. The icon will be colorized using the specificed \l color, - unless you put ".color." in the filename, for example, "app-icon.color.svg". - - \sa iconName - \sa Icon - */ - property url iconSource: Utils.getSourceForIconName(iconName) - - /*! - \qmlproperty keysequence shortcut - - This property holds the shortcut bound to the action. - The keysequence can be a string or a standard key. - */ - property alias shortcut: shortcutItem.sequence - - /*! - The text displayed for the action. - */ - property string text - - /*! - The tooltip displayed for the action. - */ - property string tooltip - - /*! - Set to \c false to hide the action in the UI. - */ - property bool visible: true - - signal triggered(var source) - - Shortcut { - id: shortcutItem - onActivated: action.triggered(shortcutItem) - } -} diff --git a/prototype_2016/third_party/fluid/controls/AppBar.qml b/prototype_2016/third_party/fluid/controls/AppBar.qml deleted file mode 100644 index 1fcfca8..0000000 --- a/prototype_2016/third_party/fluid/controls/AppBar.qml +++ /dev/null @@ -1,169 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 - -/*! - \qmltype AppBar - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Application tool bar. - */ -ToolBar { - id: appBar - - Material.elevation: toolbar ? 0 : elevation - Material.theme: toolbar ? toolbar.Material.theme : Material.Light - - /*! - The back action to display to the left of the title in the action bar. - When used with a page, this will pick up the page's back action, which - by default is a back arrow when there is a page behind the current page - on the page stack. However, you can customize this, for example, to show - a navigation drawer at the root of your app. - - When using an action bar in a page, set the \l Page::backAction instead of - directly setting this property. - */ - property Action leftAction - - /*! - A list of actions to show in the action bar. These actions will be shown - anchored to the right, and will overflow if there are more than the - maximum number of actions as defined in \l maxActionCount. - - When used with a page, the actions will be set to the page's \l Page::actions - property, so set that instead of changing this directly. - */ - property list actions - - /*! - The elevation of the action bar. Set to 0 if you want have a header or some - other view below the action bar that you want to appear as part of the action bar. - */ - property int elevation: 2 - - /*! - \internal - The size of the left icon and the action icons. - */ - property int iconSize: Device.gridUnit <= 48 ? 20 : 24 - - property alias leftKeyline: titleLabel.x - - /*! - The maximum number of actions that can be displayed before they spill over - into a drop-down menu. When using an action bar with a page, this inherits - from the global \l Toolbar::maxActionCount. If you are using an action bar - for custom purposes outside of a toolbar, this defaults to \c 3. - */ - property int maxActionCount: toolbar ? toolbar.maxActionCount : 3 - - /*! - The title displayed in the action bar. When used in a page, the title will - be set to the title of the page, so set the \l Page::title property instead - of changing this directly. - */ - property alias title: titleLabel.text - - property alias tabs: tabBar.contentData - - property alias currentTabIndex: tabBar.currentIndex - - property AppToolBar toolbar - - height: Device.gridUnit + (tabBar.visible ? tabBar.height : 0) - - IconButton { - id: leftButton - - property bool showing: leftAction && leftAction.visible - property int margin: (width - 24)/2 - - anchors { - verticalCenter: actionsRow.verticalCenter - left: parent.left - leftMargin: leftButton.showing ? 16 - leftButton.margin : -leftButton.width - } - - iconSize: appBar.iconSize - - iconSource: leftAction ? leftAction.iconSource : "" - visible: leftAction && leftAction.visible - enabled: leftAction && leftAction.enabled - onClicked: { - if (leftAction) - leftAction.triggered(leftButton) - } - } - - Label { - id: titleLabel - - anchors { - verticalCenter: actionsRow.verticalCenter - left: parent.left - right: actionsRow.left - leftMargin: 16 + (leftButton.showing ? Device.gridUnit - leftButton.margin : 0) - rightMargin: 16 - } - - textFormat: Text.PlainText - font: FluidStyle.titleFont - color: Material.primaryTextColor - elide: Text.ElideRight - } - - Row { - id: actionsRow - - anchors { - right: parent.right - rightMargin: 16 - leftButton.margin - } - - height: appBar.height - - spacing: 24 - 2 * leftButton.margin - - Repeater { - model: appBar.actions - delegate: IconButton { - id: actionButton - - anchors.verticalCenter: parent.verticalCenter - - iconSize: appBar.iconSize - - iconSource: modelData.iconSource - visible: modelData.visible - enabled: modelData.enabled - onClicked: modelData.triggered(actionButton) - } - } - } - - TabBar { - id: tabBar - width: parent.width - y: actionsRow.height - visible: contentChildren.count > 0 - } -} diff --git a/prototype_2016/third_party/fluid/controls/AppToolBar.qml b/prototype_2016/third_party/fluid/controls/AppToolBar.qml deleted file mode 100644 index 591e096..0000000 --- a/prototype_2016/third_party/fluid/controls/AppToolBar.qml +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 - -/*! - \qmltype AppToolBar - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Application tool bar. - */ -ToolBar { - id: toolbar - - Material.elevation: page ? page.appBar.elevation : 2 - Material.background: Material.primaryColor - Material.theme: Utils.lightDark(Material.background, Material.Light, Material.Dark) - - property Page page - property int maxActionCount: 3 - - height: page ? page.appBar.height : 0 - - function pop(page) { - stack.pop(page.appBar) - - toolbar.page = page - } - - function push(page) { - stack.push(page.appBar) - - page.appBar.toolbar = toolbar - toolbar.page = page - } - - function replace(page) { - toolbar.page = page - - stack.replace(page.appBar) - } - - StackView { - id: stack - - width: parent.width - height: parent.height - } -} diff --git a/prototype_2016/third_party/fluid/controls/BaseListItem.qml b/prototype_2016/third_party/fluid/controls/BaseListItem.qml deleted file mode 100644 index b931fbd..0000000 --- a/prototype_2016/third_party/fluid/controls/BaseListItem.qml +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 - -/*! - \qmltype BaseListItem - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief The base class for list items. - - Provides ripple effects, mouse/touch handling and tinting on mouse hover. - */ -ListItemDelegate { - id: listItem - - background: Rectangle { - color: listItem.interactive && (listItem.highlighted || listItem.down) - ? Qt.rgba(0,0,0,0.05) : Qt.rgba(0,0,0,0) - - ThinDivider { - x: dividerInset - y: parent.height - height - - width: parent.width - x - - visible: showDivider - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/BodyLabel.qml b/prototype_2016/third_party/fluid/controls/BodyLabel.qml deleted file mode 100644 index edd38b1..0000000 --- a/prototype_2016/third_party/fluid/controls/BodyLabel.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype BodyLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to body text. - - \code - BodyLabel { - text: qsTr("Body text") - } - \endcode -*/ -T.Label { - /*! - \qmlproperty int level - - This property holds the label level that controls - font style and size. - - It can be either 1 or 2. - - Default value is 1. - */ - property int level: 1 - - font.pixelSize: 14 - color: "#26282a" - linkColor: "#45a7d7" - onLevelChanged: { - if (level < 1 || level > 2) - console.error("BodyLabel level must be either 1 or 2") - } -} diff --git a/prototype_2016/third_party/fluid/controls/CMakeLists.txt b/prototype_2016/third_party/fluid/controls/CMakeLists.txt deleted file mode 100644 index 5a9b6e6..0000000 --- a/prototype_2016/third_party/fluid/controls/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -set(SOURCES - iconthemeimageprovider.cpp - plugin.cpp -) - -set(QML_FILES - plugins.qmltypes - qmldir - Action.qml - AppBar.qml - AppToolBar.qml - BaseListItem.qml - BodyLabel.qml - CaptionLabel.qml - Card.qml - CircleImage.qml - Dialog.qml - DisplayLabel.qml - FluidStyle.qml - FluidWindow.qml - HeadlineLabel.qml - IconButton.qml - Icon.qml - InfoBar.qml - ListItemDelegate.qml - ListItem.qml - Loadable.qml - NavigationDrawer.qml - NoiseBackground.qml - Page.qml - PageStack.qml - Placeholder.qml - Showable.qml - Sidebar.qml - SmoothFadeImage.qml - SmoothFadeLoader.qml - Subheader.qml - SubheadingLabel.qml - Tab.qml - TabbedPage.qml - ThinDivider.qml - TitleLabel.qml - Units.qml -) - -set(MATERIAL_FILES - +material/BaseListItem.qml - +material/BodyLabel.qml - +material/CaptionLabel.qml - +material/DisplayLabel.qml - +material/HeadlineLabel.qml - +material/SubheadingLabel.qml - +material/ThinDivider.qml - +material/TitleLabel.qml -) - -add_library(fluidcontrols SHARED ${SOURCES} ${QML_FILES} ${MATERIAL_FILES}) -target_link_libraries(fluidcontrols Qt5::Gui Qt5::Quick) - -install(TARGETS fluidcontrols LIBRARY - DESTINATION ${QML_INSTALL_DIR}/Fluid/Controls) -install(FILES ${QML_FILES} - DESTINATION ${QML_INSTALL_DIR}/Fluid/Controls) -install(FILES ${MATERIAL_FILES} - DESTINATION ${QML_INSTALL_DIR}/Fluid/Controls/+material) diff --git a/prototype_2016/third_party/fluid/controls/CaptionLabel.qml b/prototype_2016/third_party/fluid/controls/CaptionLabel.qml deleted file mode 100644 index a2289eb..0000000 --- a/prototype_2016/third_party/fluid/controls/CaptionLabel.qml +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype CaptionLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to captions. - - \code - Caption { - text: qsTr("A translatable caption") - } - \endcode -*/ -T.Label { - font.pixelSize: 10 - color: "#26282a" - linkColor: "#45a7d7" -} diff --git a/prototype_2016/third_party/fluid/controls/Card.qml b/prototype_2016/third_party/fluid/controls/Card.qml deleted file mode 100644 index 60eb97a..0000000 --- a/prototype_2016/third_party/fluid/controls/Card.qml +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick.Controls 2.0 as C -import QtQuick.Controls.Material 2.0 - -/*! - \qmltype Card - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Cards display content composed of different elements. - - \code - Card { - anchors.centerIn: parent - width: 400 - height: 400 - - Image { - id: picture - anchors { - left: parent.left - top: parent.top - right: parent.right - } - height: 200 - source: "Yosemite.jpg" - } - - Column { - id: column - anchors { - left: parent.left - top: picture.bottom - right: parent.right - margins: Units.smallSpacing * 2 - } - spacing: Units.smallSpacing * 2 - - TitleLabel { - text: qsTr("Yosemite National Park") - } - - BodyLabel { - text: qsTr("First protected in 1864, Yosemite National Park " + - "is best known for its waterfalls, but within its " + - "nearly 1,200 square miles, you can find deep " + - "valleys, grand meadows, ancient giant sequoias, " + - "a vast wilderness area, and much more.") - wrapMode: Text.WordWrap - width: parent.width - } - - Row { - spacing: Units.smallSpacing - - Button { - text: qsTr("Share") - flat: true - } - - Button { - text: qsTr("Explore") - flat: true - } - } - } - } - \endcode -*/ -C.Pane { - padding: 0 - - Material.background: "white" - Material.elevation: 1 -} diff --git a/prototype_2016/third_party/fluid/controls/CircleImage.qml b/prototype_2016/third_party/fluid/controls/CircleImage.qml deleted file mode 100644 index ad73593..0000000 --- a/prototype_2016/third_party/fluid/controls/CircleImage.qml +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtGraphicalEffects 1.0 -import Fluid.Effects 1.0 - -/*! - \qmltype CircleImage - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Circular image. -*/ -Item { - id: item - - property alias source: image.source - property alias status: image.status - property alias sourceSize: image.sourceSize - property alias asynchronous: image.asynchronous - property alias cache: image.cache - property alias fillMode: image.fillMode - - width: image.implicitWidth - height: image.implicitHeight - - Image { - id: image - anchors.fill: parent - visible: false - } - - CircleMask { - anchors.fill: image - source: image - } -} diff --git a/prototype_2016/third_party/fluid/controls/Dialog.qml b/prototype_2016/third_party/fluid/controls/Dialog.qml deleted file mode 100644 index 0da57fa..0000000 --- a/prototype_2016/third_party/fluid/controls/Dialog.qml +++ /dev/null @@ -1,169 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Dialog - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Dialog. -*/ -Popup { - property alias title: titleLabel.text - property alias text: textLabel.text - - property alias positiveButton: positiveButton - property alias negativeButton: negativeButton - - property string positiveButtonText: qsTr("Ok") - property string negativeButtonText: qsTr("Cancel") - - default property alias dialogContent: dialogContentItem.data - - property bool __triggered - - padding: 0 - modal: true - focus: true - - x: (parent.width - width)/2 - y: (parent.height - height)/2 - - signal accepted - signal rejected - signal canceled - - onOpened: __triggered = false - - onAccepted: { - __triggered = true - close() - } - - onRejected: { - __triggered = true - close() - } - - onClosed: { - if (!__triggered) - canceled() - } - - ColumnLayout { - width: parent.width - spacing: 0 - - Rectangle { - Layout.fillWidth: true - Layout.preferredWidth: column.implicitWidth + 48 - Layout.preferredHeight: column.implicitHeight + 48 - Layout.minimumWidth: Device.isMobile ? 280 : 300 - - ColumnLayout { - id: column - - anchors.centerIn: parent - spacing: 0 - - width: parent.width - 48 - - TitleLabel { - id: titleLabel - - Layout.fillWidth: true - - wrapMode: Text.Wrap - visible: title != "" - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: 20 - visible: titleLabel.visible && textLabel.visible - } - - Label { - id: textLabel - - Layout.fillWidth: true - - font: FluidStyle.dialogFont - wrapMode: Text.Wrap - color: Material.secondaryTextColor - visible: text != "" - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: 20 - visible: textLabel.visible - } - - Item { - id: dialogContentItem - Layout.fillWidth: true - Layout.preferredHeight: childrenRect.height - } - } - } - - RowLayout { - Layout.alignment: Qt.AlignRight - Layout.preferredHeight: 52 - - spacing: 0 - - Button { - id: negativeButton - - Layout.alignment: Qt.AlignVCenter - Material.foreground: Material.primaryColor - - text: negativeButtonText - flat: true - - onClicked: rejected() - } - - Item { - Layout.preferredWidth: 8 - } - - Button { - id: positiveButton - - Layout.alignment: Qt.AlignVCenter - Material.foreground: Material.primaryColor - - text: positiveButtonText - flat: true - - onClicked: accepted() - } - - Item { - Layout.preferredWidth: 8 - } - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/DisplayLabel.qml b/prototype_2016/third_party/fluid/controls/DisplayLabel.qml deleted file mode 100644 index 0070419..0000000 --- a/prototype_2016/third_party/fluid/controls/DisplayLabel.qml +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype DisplayLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to display text. - - \code - DisplayLabel { - text: qsTr("Display text") - } - \endcode -*/ -T.Label { - /*! - \qmlproperty int level - - This property holds the label level that controls - font style and size. - - Only values between 1 and 4 are allowed. - - Default value is 1. - */ - property int level: 1 - - font.pixelSize: { - if (level <= 1) - return 30 - else if (level == 2) - return 40 - else if (level == 3) - return 50 - return 100 - } - color: "#26282a" - linkColor: "#45a7d7" - onLevelChanged: { - if (level < 1 || level > 4) - console.error("DisplayLabel level must be between 1 and 4") - } -} diff --git a/prototype_2016/third_party/fluid/controls/FluidStyle.qml b/prototype_2016/third_party/fluid/controls/FluidStyle.qml deleted file mode 100644 index a67de44..0000000 --- a/prototype_2016/third_party/fluid/controls/FluidStyle.qml +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import Fluid.Core 1.0 - -pragma Singleton - -/*! - \qmltype FluidStyle - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Style. -*/ -QtObject { - id: fluidStyle - - readonly property color iconColorLight: Qt.rgba(0,0,0,0.54) - readonly property color iconColorDark: Qt.rgba(1,1,1) - - readonly property font display4Font: Qt.font({ family: "Roboto", weight: Font.Light, - pixelSize: 112 }) - - readonly property font display3Font: Qt.font({ family: "Roboto", pixelSize: 56 }) - - readonly property font display2Font: Qt.font({ family: "Roboto", pixelSize: 45 }) - - readonly property font display1Font: Qt.font({ family: "Roboto", pixelSize: 34 }) - - readonly property font headlineFont: Qt.font({ family: "Roboto", pixelSize: 24 }) - - readonly property font titleFont: Qt.font({ family: "Roboto", weight: Font.DemiBold, - pixelSize: 20 }) - - readonly property font subheadingFont: Qt.font({ family: "Roboto", - pixelSize: Device.isMobile ? 16 : 15 }) - - readonly property font body2Font: Qt.font({ family: "Roboto", weight: Font.DemiBold, - pixelSize: Device.isMobile ? 14 : 13 }) - - readonly property font body1Font: Qt.font({ family: "Roboto", - pixelSize: Device.isMobile ? 14 : 13 }) - - readonly property font captionFont: Qt.font({ family: "Roboto", pixelSize: 12 }) - - readonly property font buttonFont: Qt.font({ family: "Roboto", weight: Font.DemiBold, - pixelSize: 14, capitalization: Font.AllUppercase }) - - /* Control fonts that don't fit into the standard font styles */ - - readonly property font subheaderFont: Qt.font({ family: "Roboto", weight: Font.DemiBold, - pixelSize: 14 }) - - readonly property font dialogFont: Qt.font({ family: "Roboto", - pixelSize: Device.isMobile ? 18 : 17 }) -} diff --git a/prototype_2016/third_party/fluid/controls/FluidWindow.qml b/prototype_2016/third_party/fluid/controls/FluidWindow.qml deleted file mode 100644 index 97e43ec..0000000 --- a/prototype_2016/third_party/fluid/controls/FluidWindow.qml +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 - -/*! - \qmltype FluidWindow - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief A window that provides features commonly used for Material Design apps. - - This is normally what you should use as your root component. It provides a \l Toolbar and - \l PageStack to provide access to standard features used by Material Design applications. - - Here is a short working example of an application: - - \qml - import QtQuick 2.4 - import Fluid.Controls 1.0 - - ApplicationWindow { - title: "Application Name" - - initialPage: page - - Page { - id: page - title: "Page Title" - - Label { - anchors.centerIn: parent - text: "Hello World!" - } - } - } - \endqml -*/ -ApplicationWindow { - id: window - - /*! - \qmlproperty color decorationColor - - The color of the status bar or window decorations, if the current - platform supports it. - */ - property alias decorationColor: platformExtensions.decorationColor - - property alias appBar: appBar - - /*! - \qmlproperty Page initialPage - - The initial page shown when the application starts. - */ - property alias initialPage: pageStack.initialItem - - /*! - \qmlproperty PageStack pageStack - - The \l PageStack used for controlling pages and transitions between pages. - */ - property alias pageStack: pageStack - - header: AppToolBar { - id: appBar - } - - PageStack { - id: pageStack - - width: parent.width - height: parent.height - - onPushed: appBar.push(page) - onPopped: appBar.pop(page) - onReplaced: appBar.replace(page) - } - - PlatformExtensions { - id: platformExtensions - window: window - decorationColor: Material.shade(window.Material.primaryColor, Material.Shade700) - } -} diff --git a/prototype_2016/third_party/fluid/controls/HeadlineLabel.qml b/prototype_2016/third_party/fluid/controls/HeadlineLabel.qml deleted file mode 100644 index 91dcbfc..0000000 --- a/prototype_2016/third_party/fluid/controls/HeadlineLabel.qml +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype HeadlineLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to headlines. - - \code - HeadlineLabel { - text: qsTr("A translatable headline") - } - \endcode -*/ -T.Label { - font.pixelSize: 22 - color: "#26282a" - linkColor: "#45a7d7" -} diff --git a/prototype_2016/third_party/fluid/controls/Icon.qml b/prototype_2016/third_party/fluid/controls/Icon.qml deleted file mode 100644 index b52dded..0000000 --- a/prototype_2016/third_party/fluid/controls/Icon.qml +++ /dev/null @@ -1,173 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * Copyright (C) 2015 Bogdan Cuza - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Window 2.2 -import QtGraphicalEffects 1.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Icon - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Displays an icon from the Material Design icon collection, the platform's icon theme, - or another (local or remote) location. - - To use an icon from the \l{}{Material Design icon collection}, set the \c name property to the name of the icon in its group in the form of \c group/icon_name. For example: - \code - Icon { - name: "action/settings" - } - \endcode - - This icon will by default use the light icon color from Material Design. To use the dark icon - color: - \code - Icon { - Material.theme: Material.Dark - - name: "action/settings" - } - \endcode - - In addition to using icons from Material Design, you can also use icons from the platform's - \l{http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html}{Freedesktop icon theme}. For example: - - \code - Icon { - name: "gimp" - } - \endcode - - By default, icons from the Freedesktop icon theme are not colorized unless they include the word "symbolic" in the icon name. For example, "gimp" would be full-colored by "edit-cut-symbolic" would be colored using the set \c color property (based off of \c Material.theme). If you need to colorize an icon manually, you can do so like this: - - \code - Icon { - name: "gimp" - colorize: true - } - \endcode - - You can also use custom icons like this: - \code - Icon { - source: Qt.resolvedUrl("icons/fun_icon.png") - } - \endcode - */ -Item { - id: icon - - /*! - The color of the icon. Defaults to \c FluidStyle.iconColorLight. For dark backgrounds, - set \c Material.theme to Material.Dark or set this to \c FluidStyle.iconColorDark. - */ - property color color: Material.theme == Material.Light ? FluidStyle.iconColorLight - : FluidStyle.iconColorDark - - /*! - The size of the icon. Defaults to 24px. - */ - property real size: 24 - - /*! - The name of the icon to display. - - \sa source - */ - property string name - - /*! - \brief A URL pointing to an image to display as the icon. - - By default, this is a special URL representing the icon named by \ref name from the Material - Design icon collection when using the form of "collection/icon_name", or in the case of a - single "icon_name", the platform's Freedesktop icon theme will be used. - - By default, icons from the Material Design icons collection will be treated as symbolic icons and colored using the specified \ref color, while icons from the Freedesktop icon theme will - not be colorized. To override this, or set the behavior for your own custom icons, use - \ref colorize. - - \sa name - */ - property url source: Utils.getSourceForIconName(name) - - /*! - \qmlproperty enumeration status - \list - \li Image.Null - no image has been set - \li Image.Ready - the image has been loaded - \li Image.Loading - the image is currently being loaded - \li Image.Error - an error occurred while loading the image - \endlist - */ - property alias status: image.status - - /*! - Specifies whether the image should be cached. - The default value is true. - - Setting cache to false is useful when dealing with large images, - to make sure that they aren't cached at the expense of small - 'ui element' images. - */ - property alias cache: image.cache - - /*! - \c true if the icon is valid and fully loaded. - */ - readonly property bool valid: status == Image.Ready - - /*! - Set to \c false if you want the icon to use the original image's colors and not be - colored using the specified \ref color. - */ - property bool colorize: (String(icon.source).indexOf(".color.") === -1 && - String(icon.source).indexOf("image://fluidicontheme/") === -1) || - String(icon.source).indexOf("symbolic") !== -1 - - readonly property real sourceSize: String(icon.source).indexOf("image://fluidicontheme/") === 0 ? Units.roundToIconSize(size) : size - - width: size - height: size - - Image { - id: image - - anchors.fill: parent - visible: !colorize - - source: icon.source - - sourceSize { - width: icon.sourceSize * Screen.devicePixelRatio - height: icon.sourceSize * Screen.devicePixelRatio - } - } - - ColorOverlay { - id: overlay - - anchors.fill: parent - source: image - color: Utils.alpha(icon.color, 1) - cached: true - visible: icon.valid && colorize - opacity: icon.color.a - } -} diff --git a/prototype_2016/third_party/fluid/controls/IconButton.qml b/prototype_2016/third_party/fluid/controls/IconButton.qml deleted file mode 100644 index ee07a42..0000000 --- a/prototype_2016/third_party/fluid/controls/IconButton.qml +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 - -/*! - \qmltype IconButton - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Tool button with an \l Icon. -*/ -ToolButton { - id: iconButton - - property alias iconName: icon.name - property alias iconSource: icon.source - property alias iconSize: icon.size - property alias iconColor: icon.color - - indicator: Icon { - id: icon - - anchors.centerIn: parent - } -} diff --git a/prototype_2016/third_party/fluid/controls/InfoBar.qml b/prototype_2016/third_party/fluid/controls/InfoBar.qml deleted file mode 100644 index 31afcf8..0000000 --- a/prototype_2016/third_party/fluid/controls/InfoBar.qml +++ /dev/null @@ -1,149 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2014-2016 Michael Spencer - * Copyright (C) 2014 Bogdan Cuza - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 - -/*! - \qmltype InfoBar - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief InfoBar provide lightweight feedback about an operation. - - \code - Page { - title: qsTr("Send a message") - - Button { - anchors.centerIn: parent - text: qsTr("Send Message") - onClicked: infoBar.open(qsTr("Message sent")) - } - - InfoBar { - id: infoBar - } - } - \endcode -*/ -Rectangle { - id: infoBar - - property string buttonText - property color buttonColor: Material.accentColor - property string text - property bool opened - property int duration: 2000 - property bool fullWidth: Device.type === Device.phone || Device.type === Device.phablet - - signal clicked - - function open(text) { - infoBar.text = text - opened = true - timer.restart() - } - - anchors { - left: fullWidth ? parent.left : undefined - right: fullWidth ? parent.right : undefined - bottom: parent.bottom - bottomMargin: opened ? 0 : -infoBar.height - horizontalCenter: fullWidth ? undefined : parent.horizontalCenter - - Behavior on bottomMargin { - NumberAnimation { duration: 300 } - } - } - radius: fullWidth ? 0 : 2 - color: "#323232" - height: snackLayout.height - width: fullWidth ? undefined : snackLayout.width - opacity: opened ? 1 : 0 - - Timer { - id: timer - - interval: infoBar.duration - - onTriggered: { - if (!running) - infoBar.opened = false - } - } - - RowLayout { - id: snackLayout - - anchors { - verticalCenter: parent.verticalCenter - left: infoBar.fullWidth ? parent.left : undefined - right: infoBar.fullWidth ? parent.right : undefined - } - - spacing: 0 - - Item { - width: 24 - } - - Label { - id: snackText - Layout.fillWidth: true - Layout.minimumWidth: infoBar.fullWidth ? -1 : 216 - snackButton.width - Layout.maximumWidth: infoBar.fullWidth ? -1 : - Math.min(496 - snackButton.width - middleSpacer.width - 48, - infoBar.parent.width - snackButton.width - middleSpacer.width - 48) - - Layout.preferredHeight: lineCount == 2 ? 80 : 48 - verticalAlignment: Text.AlignVCenter - maximumLineCount: 2 - wrapMode: Text.Wrap - elide: Text.ElideRight - text: infoBar.text - color: "white" - } - - Item { - id: middleSpacer - width: infoBar.buttonText == "" ? 0 : infoBar.fullWidth ? 24 : 48 - } - - Button { - id: snackButton - visible: infoBar.buttonText != "" - text: infoBar.buttonText - flat: true - width: visible ? implicitWidth : 0 - font.bold: true - onClicked: infoBar.clicked() - - Material.foreground: infoBar.buttonColor - } - - Item { - width: 24 - } - } - - Behavior on opacity { - NumberAnimation { duration: 300 } - } -} diff --git a/prototype_2016/third_party/fluid/controls/ListItem.qml b/prototype_2016/third_party/fluid/controls/ListItem.qml deleted file mode 100644 index ab70717..0000000 --- a/prototype_2016/third_party/fluid/controls/ListItem.qml +++ /dev/null @@ -1,155 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Layouts 1.1 -import Fluid.Controls 1.0 - -/*! - \qmltype BaseListItem - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief A standard list item, with one or more lines of text and optional left and right items. - */ -BaseListItem { - id: listItem - - implicitHeight: Math.max(subText != "" ? maximumLineCount == 2 ? 72 : 88 - : secondaryItem.showing ? secondaryItem.childrenRect.height + Units.smallSpacing * 2 : 48, - leftItem.childrenRect.height + Units.smallSpacing * 2, - rightItem.childrenRect.height + Units.smallSpacing * 2) - - dividerInset: leftItem.visible ? listItem.height : 0 - - property int maximumLineCount: 2 - - property alias subText: subLabel.text - property alias valueText: valueLabel.text - - property alias iconName: icon.name - property alias iconSource: icon.source - - property alias leftItem: leftItem.children - property alias rightItem: rightItem.children - property alias secondaryItem: secondaryItem.children - - contentItem: RowLayout { - spacing: Units.smallSpacing * 2 - - Item { - id: leftItem - objectName: "leftItem" - - Layout.preferredWidth: showing ? 40 : 0 - Layout.preferredHeight: width - Layout.alignment: Qt.AlignCenter - - property bool showing: visibleChildren.length > 0 - - Icon { - id: icon - objectName: "icon" - - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - } - - visible: icon.valid - color: listItem.highlighted ? Material.primaryColor - : Material.theme == Material.Light ? FluidStyle.iconColorLight - : FluidStyle.iconColorDark - } - } - - ColumnLayout { - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.fillWidth: true - - spacing: 0 - - RowLayout { - Layout.fillWidth: true - - visible: label.text != "" || valueLabel.text != "" - spacing: Units.smallSpacing - - SubheadingLabel { - id: label - objectName: "textLabel" - - Layout.alignment: Qt.AlignVCenter - Layout.fillWidth: true - - text: listItem.text - elide: Text.ElideRight - color: listItem.highlighted ? Material.primaryColor - : Material.primaryTextColor - visible: text != "" - } - - BodyLabel { - id: valueLabel - objectName: "valueLabel" - - Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: visible ? implicitWidth : 0 - - color: Material.secondaryTextColor - elide: Text.ElideRight - - visible: text != "" - } - } - - BodyLabel { - id: subLabel - objectName: "subTextLabel" - - Layout.fillWidth: true - Layout.preferredHeight: implicitHeight * maximumLineCount/lineCount - - color: Material.secondaryTextColor - elide: Text.ElideRight - wrapMode: Text.WordWrap - - visible: text != "" && !contentItem.showing - maximumLineCount: listItem.maximumLineCount - 1 - } - - Item { - id: secondaryItem - objectName: "secondaryItem" - - Layout.fillWidth: true - Layout.preferredHeight: showing ? childrenRect.height + Units.smallSpacing : 0 - - property bool showing: visibleChildren.length > 0 - } - } - - Item { - id: rightItem - objectName: "rightItem" - Layout.preferredWidth: showing ? childrenRect.width : 0 - Layout.preferredHeight: parent.height - - property bool showing: visibleChildren.length > 0 - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/ListItemDelegate.qml b/prototype_2016/third_party/fluid/controls/ListItemDelegate.qml deleted file mode 100644 index d50d3cd..0000000 --- a/prototype_2016/third_party/fluid/controls/ListItemDelegate.qml +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 -import Fluid.Material 1.0 - -/*! - \qmltype ListItemDelegate - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief A delegate for list views. -*/ -ItemDelegate { - Layout.fillWidth: true - - property int dividerInset: 0 - property bool showDivider: false - property bool interactive: true - - width: parent ? parent.width : undefined - - leftPadding: 16 - rightPadding: 16 - topPadding: 0 - bottomPadding: 0 - - opacity: enabled ? 1 : 0.6 -} diff --git a/prototype_2016/third_party/fluid/controls/Loadable.qml b/prototype_2016/third_party/fluid/controls/Loadable.qml deleted file mode 100644 index ed23179..0000000 --- a/prototype_2016/third_party/fluid/controls/Loadable.qml +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype Loadable - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Loadable component. -*/ -Item { - property Component component - property var showAnimation - property var hideAnimation - property alias asynchronous: loader.asynchronous - property alias item: loader.item - - id: root - visible: false - - Loader { - id: loader - anchors.fill: parent - asynchronous: true - onStatusChanged: { - if (status != Loader.Ready) - return; - if (item.showAnimation == undefined && root.showAnimation != undefined) - item.showAnimation = root.showAnimation; - if (item.hideAnimation == undefined && root.hideAnimation != undefined) - item.hideAnimation = root.hideAnimation; - root.visible = true; - if (item.show != undefined) - item.show(); - } - } - - Connections { - target: loader.item - onVisibleChanged: { - // Unload component as soon as it's hidden and hide this item as well - if (!loader.item.visible) { - loader.sourceComponent = undefined; - root.visible = false; - } - } - } - - function show() { - loader.sourceComponent = root.component; - } - - function hide() { - if (loader.item && loader.item.hide != undefined) - loader.item.hide(); - } -} diff --git a/prototype_2016/third_party/fluid/controls/NavigationDrawer.qml b/prototype_2016/third_party/fluid/controls/NavigationDrawer.qml deleted file mode 100644 index 7e82a1d..0000000 --- a/prototype_2016/third_party/fluid/controls/NavigationDrawer.qml +++ /dev/null @@ -1,195 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 -import QtQml 2.2 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 - -/*! - \qmltype NavigationDrawer - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief The navigation drawer slides in from the left and is a common pattern in apps. - - \code - import QtQuick.Window 2.2 - import Fluid.Controls 2.0 as FluidControls - - Window { - id: window - width: 400 - height: 400 - visible: true - - Button { - text: "Open" - onClicked: drawer.open() - } - - FluidControls.NavigationDrawer { - topContent: [ - Button { - text: "Push me" - onClicked: console.log("Pushed") - } - ] - - actions: [ - Action { - text: "Action 1" - }, - Action { - text: "Action 1" - } - ] - } - } - \endcode -*/ - -Drawer { - id: drawer - - /*! - \qmlproperty list topContent - - The items added to this list will be displayed on top of the - actions list. - - \code - import QtQuick.Window 2.2 - import Fluid.Controls 2.0 as FluidControls - - Window { - id: window - width: 400 - height: 400 - visible: true - - Button { - text: "Open" - onClicked: drawer.open() - } - - FluidControls.NavigationDrawer { - topContent: [ - Button { - text: "Push me" - onClicked: console.log("Pushed") - } - ] - } - } - \endcode - */ - property alias topContent: topContent.data - - /*! - \qmlproperty list actions - - List of actions to be displayed by the drawer. - - \code - import QtQuick.Window 2.2 - import Fluid.Controls 2.0 as FluidControls - - Window { - id: window - width: 400 - height: 400 - visible: true - - Button { - text: "Open" - onClicked: drawer.open() - } - - FluidControls.NavigationDrawer { - actions: [ - Action { - text: "Action 1" - }, - Action { - text: "Action 1" - } - ] - } - } - \endcode - */ - property list actions - - width: { - switch (Device.formFactor) { - case Device.Phone: - return 280 - case Device.Tablet: - return 320 - default: - break - } - return 56 * 4 - } - height: ApplicationWindow.height - - padding: 0 - - Pane { - id: pane - - anchors.fill: parent - padding: 0 - - ColumnLayout { - anchors.fill: parent - spacing: 0 - - ColumnLayout { - id: topContent - - height: childrenRect.height + 2 * drawer.padding - - spacing: 0 - visible: children.length > 0 - - Layout.margins: drawer.padding - Layout.fillWidth: true - } - - ListView { - currentIndex: -1 - spacing: 0 - - model: drawer.actions - - delegate: ListItem { - iconName: modelData.iconName - text: modelData.text - onClicked: modelData.triggered(drawer) - } - - visible: count > 0 - - Layout.fillWidth: true - Layout.fillHeight: true - - ScrollBar.vertical: ScrollBar {} - } - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/NoiseBackground.qml b/prototype_2016/third_party/fluid/controls/NoiseBackground.qml deleted file mode 100644 index 0e48503..0000000 --- a/prototype_2016/third_party/fluid/controls/NoiseBackground.qml +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Fluid and is derived from NoisyGradient.qml -** from the Qt 5 launch demo. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company 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 - -/*! - \qmltype NoiseBackground - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Background with noise. -*/ -ShaderEffect { - property alias gradient: rect.gradient - property alias color: rect.color - - Rectangle { - id: rect - anchors.fill: parent - layer.enabled: true - layer.smooth: true - visible: false - } - - readonly property variant source: rect - - blending: false - fragmentShader: " - #ifdef GL_ES - precision lowp float; - #endif - - uniform sampler2D source; - varying highp vec2 qt_TexCoord0; - uniform lowp float qt_Opacity; - - // Noise function from: http://stackoverflow.com/questions/4200224/random-noise-functions-for-glsl - float rand(vec2 n) { - return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233))) * 43758.5453); - } - - void main() { - lowp float len = clamp(length(vec2(0.5, 0.0) - qt_TexCoord0), 0.0, 1.0); - gl_FragColor = texture2D(source, vec2(0, len)) * qt_Opacity + rand(qt_TexCoord0) * 0.05; - } - " -} diff --git a/prototype_2016/third_party/fluid/controls/Page.qml b/prototype_2016/third_party/fluid/controls/Page.qml deleted file mode 100644 index cce4e85..0000000 --- a/prototype_2016/third_party/fluid/controls/Page.qml +++ /dev/null @@ -1,139 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Page - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Represents a page on the navigation page stack. - - Example: - - \qml - import QtQuick 2.4 - import Fluid.Controls 1.0 - - Page { - title: "Application Name" - - actions: [ - Action { - name: "Print" - - // Icon name from the Google Material Design icon pack - iconName: "action/print" - } - ] - } - \endqml - */ -Page { - id: page - - /* - \qmlproperty ActionBar actionBar - - The action bar for this page. Use it as a group property to customize - this page's action bar. See the \l Page example for details on how to use - this property. - */ - property alias appBar: appBar - - /*! - The page's actions shown in the action bar. - */ - property alias actions: appBar.actions - - /*! - The action shown to the left of the title in the action bar. By default, - this is a back button which shows when there is a page behind the current - page in the page stack. However, you can replace it with your own action, - for example, an icon to open a navigation drawer when on your root page. - */ - property alias leftAction: appBar.leftAction - - /*! - \internal - Set by the page stack to true if there is a page behind this page on the - page stack. - */ - property bool canGoBack: false - - /*! - This signal is emitted when the back action is triggered or back key is released. - - By default, the page will be popped from the page stack. To change the default - behavior, for example to show a confirmation dialog, listen for this signal using - \c onGoBack and set \c event.accepted to \c true. To dismiss the page from your - dialog without triggering this signal and re-showing the dialog, call - \c page.forcePop(). - */ - signal goBack(var event) - - /*! - Pop this page from the page stack. This does nothing if this page is not - the current page on the page stack. - - Use \c force to avoid calling the \l goBack signal. This is useful if you - use the \l goBack signal to show a confirmation dialog, and want to close - the page from your dialog without showing the dialog again. You can also - use \c forcePop() as a shortcut to this behavior. - */ - function pop(event, force) { - if (StackView.view.currentItem !== page) - return false - - if (!event) - event = {accepted: false} - - if (!force) - goBack(event) - - if (event.accepted) { - return true - } else { - return StackView.view.pop() - } - } - - function forcePop() { - pop(null, true) - } - - /*! - Push the specified component onto the page stack. - */ - function push(component, properties) { - return StackView.view.push({item: component, properties: properties}); - } - - AppBar { - id: appBar - - title: page.title - parent: null - - leftAction: Action { - text: "Back" - iconName: "navigation/arrow_back" - onTriggered: page.pop() - visible: page.canGoBack - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/PageStack.qml b/prototype_2016/third_party/fluid/controls/PageStack.qml deleted file mode 100644 index d629fb9..0000000 --- a/prototype_2016/third_party/fluid/controls/PageStack.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 - -/*! - \qmltype PageStack - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Manages the page stack used for navigation. -*/ -StackView { - id: stackView - - signal pushed(Item page) - signal popped(Item page) - signal replaced(Item page) - - property int __lastDepth: 0 - property Item __oldItem: null - - onCurrentItemChanged: { - if (stackView.currentItem) { - stackView.currentItem.canGoBack = stackView.depth > 1; - stackView.currentItem.forceActiveFocus() - - if (__lastDepth > stackView.depth) { - popped(stackView.currentItem); - } else if (__lastDepth < stackView.depth) { - pushed(stackView.currentItem); - } else { - replaced(stackView.currentItem); - } - } - - __lastDepth = stackView.depth; - } -} diff --git a/prototype_2016/third_party/fluid/controls/Placeholder.qml b/prototype_2016/third_party/fluid/controls/Placeholder.qml deleted file mode 100644 index 89ebfff..0000000 --- a/prototype_2016/third_party/fluid/controls/Placeholder.qml +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.2 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Placeholder - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Placeholder. -*/ -Item { - property alias iconName: icon.name - property alias iconSource: icon.source - property alias text: textLabel.text - property alias subText: subTextLabel.text - - ColumnLayout { - anchors.centerIn: parent - - width: parent.width - 2 * Units.mediumSpacing - - Icon { - id: icon - size: 96 - - Layout.alignment: Qt.AlignHCenter - } - - Label { - id: textLabel - font: FluidStyle.titleFont - color: Material.secondaryTextColor - horizontalAlignment: Qt.AlignHCenter - - Layout.fillWidth: true - } - - Label { - id: subTextLabel - font: FluidStyle.subheadingFont - color: Material.secondaryTextColor - horizontalAlignment: Qt.AlignHCenter - wrapMode: Text.Wrap - visible: text !== "" - - Layout.fillWidth: true - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/Showable.qml b/prototype_2016/third_party/fluid/controls/Showable.qml deleted file mode 100644 index c14d65b..0000000 --- a/prototype_2016/third_party/fluid/controls/Showable.qml +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype Showable - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Showtable component. -*/ -FocusScope { - property var showAnimation - property var hideAnimation - - id: root - visible: false - onHideAnimationChanged: { - // Automatically set animation target when it's possible - if (showAnimation && showAnimation.target != undefined) - showAnimation.target = root; - if (hideAnimation && hideAnimation.target != undefined) - hideAnimation.target = root; - - // Hide the item when the animation is over - if (hideAnimation) { - hideAnimation.runningChanged.connect(function() { - if (!hideAnimation.running) - root.visible = false; - }); - } - } - - function show() { - // Stop hide animation if it's still running - if (hideAnimation != undefined && hideAnimation.running) - hideAnimation.stop(); - - // Show the item otherwise we won't see the animation - visible = true; - - // Restart show animation if available - if (showAnimation != undefined && !showAnimation.running) - showAnimation.restart(); - } - - function hide() { - // Stop show animation if it's still running - if (showAnimation != undefined && showAnimation.running) - showAnimation.stop(); - - // Restart hide animation if available - if (hideAnimation != undefined && !hideAnimation.running) - hideAnimation.restart(); - } -} diff --git a/prototype_2016/third_party/fluid/controls/Sidebar.qml b/prototype_2016/third_party/fluid/controls/Sidebar.qml deleted file mode 100644 index b4e104e..0000000 --- a/prototype_2016/third_party/fluid/controls/Sidebar.qml +++ /dev/null @@ -1,168 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Sidebar - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief A sidebar component for use in adaptive layouts - - To use, simply add an instance to your code, and anchor other components to it. - - To show or hide, set the expanded property. - - By default, the sidebar has a flickable built in, and whatever contents are added - will be placed in the flickable. When you want this disabled, or want to fill the - entire sidebar, set the autoFill property to false. - - Examples: - \code - Item { - property bool wideAspect: width > Units.gu(80) - - Sidebar { - expanded: wideAspect - - // Anchoring is automatic - } - } - \endcode - */ -Pane { - id: sidebar - - default property alias contents: contents.data - - /*! - The text displayed for the action. - */ - property int edge: Qt.LeftEdge - - /*! - Show or hide the sidebar. - */ - property bool expanded: true - - /*! - Flick automatically. - */ - property bool autoFlick: true - - /*! - The text displayed as header. - */ - property alias header: headerItem.text - - Behavior on anchors.leftMargin { - NumberAnimation { duration: 200 } - } - - Behavior on anchors.rightMargin { - NumberAnimation { duration: 200 } - } - - Material.background: Material.theme === Material.Light ? "white" : "#333" - Material.elevation: 1 - - anchors { - left: edge === Qt.LeftEdge ? parent.left : undefined - top: parent.top - right: edge === Qt.RightEdge ? parent.right : undefined - bottom: parent.bottom - leftMargin: expanded ? 0 : -width - rightMargin: expanded ? 0 : -width - } - - width: 250 - - padding: 0 - - Rectangle { - color: Material.dividerColor - width: 1 - - anchors { - left: edge === Qt.RightEdge ? parent.left : undefined - top: parent.top - right: edge === Qt.LeftEdge ? parent.right : undefined - bottom: parent.bottom - //rightMargin: -1 - } - } - - Item { - clip: true - - anchors { - fill: parent - leftMargin: edge === Qt.RightEdge ? 1 : 0 - rightMargin: edge === Qt.LeftEdge ? 1 : 0 - } - - Subheader { - id: headerItem - - Material.elevation: flickable.atYBeginning ? 0 : 1 - - visible: text !== "" - z: 2 - } - - Flickable { - id: flickable - - clip: true - - ScrollBar.vertical: ScrollBar {} - - anchors { - left: parent.left - top: headerItem.visible ? headerItem.bottom : parent.top - right: parent.right - bottom: parent.bottom - } - - contentWidth: width - contentHeight: autoFlick ? contents.height : height - interactive: contentHeight > height - - Item { - id: contents - - width: flickable.width - height: autoFlick ? childrenRect.height : flickable.height - } - - function getFlickableChild(item) { - if (item && item.hasOwnProperty("children")) { - for (var i = 0; i < item.children.length; i++) { - var child = item.children[i] - if (internal.isVerticalFlickable(child)) { - if (child.anchors.top === page.top || child.anchors.fill === page) - return item.children[i] - } - } - } - return null - } - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/SmoothFadeImage.qml b/prototype_2016/third_party/fluid/controls/SmoothFadeImage.qml deleted file mode 100644 index 5345e2c..0000000 --- a/prototype_2016/third_party/fluid/controls/SmoothFadeImage.qml +++ /dev/null @@ -1,309 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype SmoothFadeImage - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Displays an image and smoothly fade when the source is changed. - - This component can be used in place of an Image when a smooth fade animation - between two sources is needed. - - When the source is changed and the fade animation ends, the image loaded before - is unloaded; this means that only one image at a time is loaded. - - Images are loaded asynchronously and are not cache, so unlike the Image - component the \c asynchronous and \c cache properties are not available. - - Example of usage: - \code - import QtQuick 2.0 - import Fluid.Controls 1.0 - - Item { - width: 128 - height: 128 - - SmoothFadeImage { - anchors.fill: parent - source: "http://www.maui-project.org/images/logos/m.png" - fillMode: Image.PreserveAspectFit - smooth: true - fadeDuration: 400 - - MouseArea { - anchors.fill: parent - onClicked: parent.source = "http://www.maui-project.org/images/logos/qt.png" - } - } - } - \endcode -*/ -Item { - id: root - - /*! - The image being displayed. - SmoothFadeImage can handle any image format supported by Qt, loaded - from any URL scheme supported by Qt. - - \sa Image::source - */ - property url source - - /*! - \qmlproperty enumeration fillMode - - Set this property to define what happens when the source image has a - different size than the item. - - \list - \li Image.Stretch - the image is scaled to fit (default) - \li Image.PreserveAspectFit - the image is scaled uniformly to fit without cropping - \li Image.PreserveAspectCrop - the image is scaled uniformly to fill, cropping if necessary - \li Image.Tile - the image is duplicated horizontally and vertically - \li Image.TileVertically - the image is stretched horizontally and tiled vertically - \li Image.TileHorizontally - the image is stretched vertically and tiled horizontally - \li Image.Pad - the image is not transformed - \endlist - - Defaults to \c Image.Stretch. - - Note that \c clip is false by default which means that the item might - paint outside its bounding rectangle even if the fillMode is set to PreserveAspectCrop. - */ - property int fillMode : Image.Stretch - - /*! - Set this to change the fade animation time (in milliseconds). - Default value is 250 ms. - */ - property int fadeDuration: 250 - - /*! - This property holds whether the fade animation is running or not. - */ - readonly property bool running: animation.running - - /*! - Set this property to false to disable the fade animation. - If the animation is disable, SmoothFadeImage behaves like a normal Image. - - The fade animation is enabled by default. - */ - property bool animationEnabled: true - - /*! - This property holds the actual width and height of the loaded image. - - Unlike the \c width and \c height properties, which scale the painting of the - image, this property sets the actual number of pixels stored for the - loaded image so that large images do not use more memory than necessary. - - For example, this ensures the image in memory is no larger than - 1024x1024 pixels, regardless of the SmoothFadeImage's width and height values: - - \code - Rectangle { - width: ... - height: ... - - Image { - anchors.fill: parent - source: "reallyBigImage.jpg" - sourceSize.width: 1024 - sourceSize.height: 1024 - } - } - \endcode - - If the image's actual size is larger than the sourceSize, the image is - scaled down. If only one dimension of the size is set to greater than 0, - the other dimension is set in proportion to preserve the source image's - aspect ratio. (The \c fillMode is independent of this.) - - If both the sourceSize.width and sourceSize.height are set the image - will be scaled down to fit within the specified size, maintaining the - image's aspect ratio. The actual size of the image after scaling is - available via \c Item::implicitWidth and \c Item::implicitHeight. - - If the source is an intrinsically scalable image (eg. SVG), this property - determines the size of the loaded image regardless of intrinsic size. - Avoid changing this property dynamically; rendering an SVG is slow compared - to an image. - - If the source is a non-scalable image (eg. JPEG), the loaded image will be - no greater than this property specifies. For some formats (currently only - JPEG), the whole image will never actually be loaded into memory. - - sourceSize can be cleared to the natural size of the image by setting - sourceSize to undefined. - - Note: Changing this property dynamically causes the image source to be - reloaded, potentially even from the network, if it is not in the disk cache. - */ - property alias sourceSize: __priv.sourceSize - - /*! - \qmlproperty enumeration status - - This property holds the status of image loading. It can be one of: - - \list - \li Image.Null - no image has been set - \li Image.Ready - the image has been loaded - \li Image.Loading - the image is currently being loaded - \li Image.Error - an error occurred while loading the image - \endlist - */ - readonly property int status: __priv.loadingImage ? __priv.loadingImage.status : Image.Null - - /*! - This property holds whether the image is smoothly filtered when scaled or - transformed. Smooth filtering gives better visual quality, but it may be - slower on some hardware. - - If the image is displayed at its natural size, this property has no - visual or performance effect. - - By default, this property is set to \c true. - */ - property bool smooth: true - - /*! - This signal is emitted when the swap between the old source and the new - one has happened. - */ - signal imageSwapped() - - QtObject { - id: __priv - - property size sourceSize: undefined - - property Image currentImage: image1 - property Image nextImage: image2 - property Image loadingImage: currentImage - - onSourceSizeChanged: { - // Change source size for both images - image1.sourceSize = sourceSize; - image2.sourceSize = sourceSize; - } - - function swapImages() { - // Swap images stacking order and start fading animation - __priv.currentImage.z = 0; - __priv.nextImage.z = 1; - if (root.animationEnabled) - animation.start(); - - // Swap images pointers - var oldImage = __priv.currentImage; - __priv.currentImage = __priv.nextImage; - __priv.nextImage = oldImage; - } - } - - onSourceChanged: { - // Set image pointers at creation time - if (__priv.currentImage === null) { - __priv.currentImage = image1; - __priv.nextImage = image2; - } - - // Stop the animation if the source is changed while - // it's still running - animation.stop(); - - // Unload both images - if (root.source == "") { - __priv.currentImage.source = ""; - __priv.nextImage.source = ""; - __priv.loadingImage = null; - return; - } - - if (__priv.currentImage.source == "") { - // Assign the source to the current image for the first time - __priv.currentImage.source = root.source; - __priv.loadingImage = __priv.currentImage; - } else { - // Image source is changed, make sure the animation is not running - animation.stop(); - - // Prepare the next image - __priv.nextImage.opacity = 0.0; - __priv.nextImage.source = root.source; - __priv.loadingImage = __priv.nextImage; - - // If the next image is still cached the status will already be Ready - // otherwise it's not loaded, either way we need to swap - if (__priv.nextImage.status === Image.Ready || __priv.nextImage.source === "") - __priv.swapImages(); - } - } - - Connections { - target: __priv.nextImage - onOpacityChanged: { - if (__priv.nextImage.opacity == 1.0) - root.imageSwapped(); - } - onStatusChanged: { - if (__priv.nextImage.status === Image.Ready) - __priv.swapImages(); - } - } - - Image { - id: image1 - anchors.fill: parent - cache: false - asynchronous: true - fillMode: root.fillMode - smooth: root.smooth - clip: root.clip - z: 1 - } - - Image { - id: image2 - anchors.fill: parent - cache: false - asynchronous: true - fillMode: root.fillMode - smooth: root.smooth - clip: root.clip - z: 0 - } - - NumberAnimation { - id: animation - target: __priv.nextImage - property: "opacity" - to: 1.0 - duration: root.fadeDuration - onRunningChanged: { - // When the fade animation stops, we unload the second image in - // order to save some memory (only one image will be load at a time) - if (!running) - __priv.nextImage.source = ""; - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/SmoothFadeLoader.qml b/prototype_2016/third_party/fluid/controls/SmoothFadeLoader.qml deleted file mode 100644 index 2f419a5..0000000 --- a/prototype_2016/third_party/fluid/controls/SmoothFadeLoader.qml +++ /dev/null @@ -1,137 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype SmoothFadeLoader - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Displays an item and smoothly fade when the source is changed. - - This component loads an item with a Loader and smoothly fade to another item when - the source URL is changed. - - Items are loaded synchronously, also the item being hidden is not unloaded to - avoid an unpleasant "flash" after the transition. - - Example of usage: - \code - import QtQuick 2.0 - import Fluid.Controls 1.0 - - Item { - width: 640 - height: 480 - - SmoothFadeLoader { - anchors.fill: parent - source: "MyComponent.qml" - fadeDuration: 400 - - MouseArea { - anchors.fill: parent - onClicked: parent.source = "AnotherComponent.qml" - } - } - } - \endcode -*/ -Item { - /*! - The item being displayed. - - \sa Loader::source - */ - property url source - - /*! - Set this to change the fade animation time (in milliseconds). - Default value is 250 ms. - */ - property int fadeDuration: 250 - - /*! - This property holds whether the fade animation is running or not. - */ - readonly property bool running: animation.running - - id: root - onSourceChanged: { - animation.running = false; - - if (__priv.currentLoader == loader1) { - __priv.currentLoader = loader2; - __priv.nextLoader = loader1; - } else { - __priv.currentLoader = loader1; - __priv.nextLoader = loader2; - } - - __priv.currentLoader.source = sourceUrl; - __priv.currentLoader.opacity = 0; - __priv.currentLoader.z = 1; - __priv.nextLoader.z = 0; - - if (__priv.firstTime) { - __priv.currentLoader.opacity = 1.0; - __priv.nextLoader.opacity = 0.0; - __priv.firstTime = false; - } else { - animation.running = true; - } - } - - QtObject { - id: __priv - - property bool firstTime: true - property Loader currentLoader: loader1 - property Loader nextLoader: loader2 - } - - SequentialAnimation { - id: animation - running: false - - NumberAnimation { - target: __priv.currentLoader - properties: "opacity" - from: 0.0 - to: 1.0 - duration: root.fadeDuration - easing.type: Easing.OutQuad - } - - ScriptAction { - script: { - __priv.nextLoader.opacity = 0; - //__priv.nextLoader.source = ""; - } - } - } - - Loader { - id: loader1 - anchors.fill: parent - z: 1 - } - - Loader { - id: loader2 - anchors.fill: parent - z: 0 - } -} diff --git a/prototype_2016/third_party/fluid/controls/Subheader.qml b/prototype_2016/third_party/fluid/controls/Subheader.qml deleted file mode 100644 index d9252b0..0000000 --- a/prototype_2016/third_party/fluid/controls/Subheader.qml +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Controls 1.0 - -/*! - \qmltype Subheader - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Subheaders are special list tiles that delineate distinct sections of a list or grid list. - */ -BaseListItem { - id: listItem - - implicitHeight: 48 - interactive: false - - property alias textColor: label.color - - contentItem: Label { - id: label - - font: FluidStyle.subheaderFont - text: listItem.text - - verticalAlignment: Text.AlignVCenter - - color: Material.secondaryTextColor - } -} diff --git a/prototype_2016/third_party/fluid/controls/SubheadingLabel.qml b/prototype_2016/third_party/fluid/controls/SubheadingLabel.qml deleted file mode 100644 index c524048..0000000 --- a/prototype_2016/third_party/fluid/controls/SubheadingLabel.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype SubheadingLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to subheading. - - \code - SubheadingLabel { - text: qsTr("A translatable subheading") - } - \endcode -*/ -T.Label { - /*! - \qmlproperty int level - - This property holds the label level that controls - font style and size. - - Only values between 1 and 4 are allowed. - - Default value is 1. - */ - property int level: 1 - - font.pixelSize: 14 - color: "#26282a" - linkColor: "#45a7d7" - onLevelChanged: { - if (level < 1 || level > 2) - console.error("BodyLabel level must be either 1 or 2") - } -} diff --git a/prototype_2016/third_party/fluid/controls/Tab.qml b/prototype_2016/third_party/fluid/controls/Tab.qml deleted file mode 100644 index 2db624f..0000000 --- a/prototype_2016/third_party/fluid/controls/Tab.qml +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import Fluid.Core 1.0 - -Item { - id: tab - - /*! - The title of this tab. - */ - property string title - - /*! - The icon displayed for this tab. This can be a Material Design icon or an icon from - FontAwesome. See \l Icon from more details. - */ - property string iconName - - /*! - A URL pointing to an image to display as the icon of this tab. By default, this is - a special URL representing the icon named by \l iconName from the Material Design - icon collection. The icon will be colorized using the specificed \l color, - unless you put ".color." in the filename, for example, "app-icon.color.svg". - - \sa iconName - \sa Icon - */ - property string iconSource: Utils.getSourceForIconName(iconName) - - /*! - * Controls whether a close button will be shown for this tab. - */ - property bool canRemove: false -} diff --git a/prototype_2016/third_party/fluid/controls/TabbedPage.qml b/prototype_2016/third_party/fluid/controls/TabbedPage.qml deleted file mode 100644 index 20a494c..0000000 --- a/prototype_2016/third_party/fluid/controls/TabbedPage.qml +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 as FluidControls - -FluidControls.Page { - id: page - - default property alias contents: swipeView.contentChildren - - property alias count: swipeView.count - - readonly property int currentIndex: appBar.currentTabIndex - - /*! - The currently selected tab. - */ - readonly property Tab selectedTab: count > 0 - ? swipeView.contentChildren[currentIndex] : null - - onCurrentIndexChanged: swipeView.currentIndex = currentIndex - - appBar.tabs: Repeater { - model: swipeView.contentChildren - delegate: TabButton { - text: modelData.title - - // TODO: Add icon and optional close button - } - } - - SwipeView { - id: swipeView - anchors.fill: parent - currentIndex: appBar.currentTabIndex - - onCurrentIndexChanged: appBar.currentTabIndex = currentIndex - } - - function addTab(tab) { - // TODO: Instantiate tab if it's a component - appBar.currentTabIndex = swipeView.count - 1 - } -} diff --git a/prototype_2016/third_party/fluid/controls/ThinDivider.qml b/prototype_2016/third_party/fluid/controls/ThinDivider.qml deleted file mode 100644 index 5c43227..0000000 --- a/prototype_2016/third_party/fluid/controls/ThinDivider.qml +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 - -/*! - \qmltype ThinDivider - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief A 1px high divider for use in lists and other columns of content. - */ -Rectangle { - color: "#999" - width: parent.width - height: 1 -} diff --git a/prototype_2016/third_party/fluid/controls/TitleLabel.qml b/prototype_2016/third_party/fluid/controls/TitleLabel.qml deleted file mode 100644 index 97295b1..0000000 --- a/prototype_2016/third_party/fluid/controls/TitleLabel.qml +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Templates 2.0 as T - -/*! - \qmltype TitleLabel - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Text label with standard font and styling suitable to titles. - - \code - Title { - text: qsTr("Translatable title") - } - \endcode -*/ -T.Label { - font.pixelSize: 18 - font.bold: true - color: "#26282a" - linkColor: "#45a7d7" -} diff --git a/prototype_2016/third_party/fluid/controls/Units.qml b/prototype_2016/third_party/fluid/controls/Units.qml deleted file mode 100644 index ca62918..0000000 --- a/prototype_2016/third_party/fluid/controls/Units.qml +++ /dev/null @@ -1,125 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -pragma Singleton - -import QtQuick 2.4 -import Fluid.Core 1.0 - -/*! - \qmltype Units - \inqmlmodule Fluid.Controls - \ingroup fluidcontrols - - \brief Units. -*/ -Item { - /* - \qmlproperty int gridUnit - Fundamental unit of space for sizes depending on the current font. - It correspond to the capital letter M width in pixel. - */ - readonly property int gridUnit: textMetrics.height - - /*! - \qmlproperty real smallSpacing - The amount of spacing that should be used around smaller UI - elements. It can be used as margin around button box and - spacing between buttons. - */ - readonly property real smallSpacing: 8 - - /*! - \qmlproperty real mediumSpacing - The amount of spacing that should be used inside medium UI - elements such as padding between title and body text in a dialog box. - */ - readonly property real mediumSpacing: 20 - - /*! - \qmlproperty real largeSpacing - The amount of spacing that should be used inside bigger UI - elements such as padding in a dialog box. - */ - readonly property real largeSpacing: 24 - - /*! - \qmlproperty int shortDuration - Duration for short animations to make UI events noticeable. - */ - readonly property int shortDuration: 100 - - /*! - \qmlproperty int mediumDuration - Duration for medium length animations. - */ - readonly property int mediumDuration: 200 - - /*! - \qmlproperty int longDuration - Duration for long animations such as windows opening or closing. - */ - readonly property int longDuration: 400 - - /*! - \qmlproperty object iconSizes - Standard icon sizes. - */ - readonly property QtObject iconSizes: QtObject { - readonly property int tiny: 8 - readonly property int small: 16 - readonly property int smallMedium: 22 - readonly property int medium: 32 - readonly property int large: 48 - readonly property int huge: 64 - readonly property int enormous: 128 - } - - TextMetrics { - id: textMetrics - text: "M" - } - - /*! - Returns a round size in pixels multiplied by grid unit. - */ - function gu(x) { - return Math.round(x * gridUnit); - } - - /*! - Returns the size in pixel closes to the icon size. - */ - function roundToIconSize(x) { - // Find the size closest to icon size - if (x <= 0) - return 0; - else if (x < 8) - return 8; - else if (x < 16) - return 16; - else if (x < 22) - return 22; - else if (x < 32) - return 32; - else if (x < 48) - return 48; - else if (x < 64) - return 64; - else if (x < 128) - return 128; - - return x; - } -} diff --git a/prototype_2016/third_party/fluid/controls/controls.pri b/prototype_2016/third_party/fluid/controls/controls.pri deleted file mode 100644 index db09cef..0000000 --- a/prototype_2016/third_party/fluid/controls/controls.pri +++ /dev/null @@ -1,4 +0,0 @@ -HEADERS += $$PWD/iconthemeimageprovider.h -SOURCES += $$PWD/iconthemeimageprovider.cpp -INCLUDEPATH += $$PWD -RESOURCES += $$PWD/controls.qrc diff --git a/prototype_2016/third_party/fluid/controls/controls.qrc b/prototype_2016/third_party/fluid/controls/controls.qrc deleted file mode 100644 index 8f0c46c..0000000 --- a/prototype_2016/third_party/fluid/controls/controls.qrc +++ /dev/null @@ -1,46 +0,0 @@ - - - Action.qml - AppBar.qml - AppToolBar.qml - BaseListItem.qml - BodyLabel.qml - CaptionLabel.qml - Card.qml - CircleImage.qml - Dialog.qml - DisplayLabel.qml - FluidStyle.qml - FluidWindow.qml - HeadlineLabel.qml - Icon.qml - IconButton.qml - InfoBar.qml - ListItem.qml - ListItemDelegate.qml - Loadable.qml - NavigationDrawer.qml - NoiseBackground.qml - Page.qml - PageStack.qml - Placeholder.qml - Showable.qml - Sidebar.qml - SmoothFadeImage.qml - SmoothFadeLoader.qml - Subheader.qml - SubheadingLabel.qml - ThinDivider.qml - TitleLabel.qml - Units.qml - +material/BaseListItem.qml - +material/BodyLabel.qml - +material/CaptionLabel.qml - +material/DisplayLabel.qml - +material/HeadlineLabel.qml - +material/SubheadingLabel.qml - +material/ThinDivider.qml - +material/TitleLabel.qml - qmldir_noplugin - - diff --git a/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.cpp b/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.cpp deleted file mode 100644 index aab74c9..0000000 --- a/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include - -#include "iconthemeimageprovider.h" - -IconThemeImageProvider::IconThemeImageProvider() - : QQuickImageProvider(QQuickImageProvider::Pixmap) -{ -} - -QPixmap IconThemeImageProvider::requestPixmap(const QString &id, QSize *realSize, - const QSize &requestedSize) -{ - // Sanitize requested size - QSize size(requestedSize); - if (size.width() < 1) - size.setWidth(1); - if (size.height() < 1) - size.setHeight(1); - - // Return real size - if (realSize) - *realSize = size; - - // Is it a path? - if (id.startsWith('/')) - return QPixmap(id).scaled(size); - - // Return icon from theme or fallback to a generic icon - QIcon icon = QIcon::fromTheme(id); - if (icon.isNull()) - icon = QIcon::fromTheme(QLatin1String("application-x-executable")); - return icon.pixmap(size); -} diff --git a/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.h b/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.h deleted file mode 100644 index 675586c..0000000 --- a/prototype_2016/third_party/fluid/controls/iconthemeimageprovider.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#include - -class IconThemeImageProvider : public QQuickImageProvider -{ -public: - IconThemeImageProvider(); - - QPixmap requestPixmap(const QString &id, QSize *realSize, const QSize &requestedSize); -}; diff --git a/prototype_2016/third_party/fluid/controls/plugin.cpp b/prototype_2016/third_party/fluid/controls/plugin.cpp deleted file mode 100644 index 7c3c2ce..0000000 --- a/prototype_2016/third_party/fluid/controls/plugin.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include - -#include "iconthemeimageprovider.h" - -class FluidCorePlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") -public: - void initializeEngine(QQmlEngine *engine, const char *uri); - void registerTypes(const char *uri); -}; - -void FluidCorePlugin::initializeEngine(QQmlEngine *engine, const char *uri) -{ - Q_ASSERT(QByteArray(uri) == QByteArrayLiteral("Fluid.Controls")); - - engine->addImageProvider(QLatin1String("fluidicontheme"), new IconThemeImageProvider()); -} - -void FluidCorePlugin::registerTypes(const char *uri) -{ - Q_ASSERT(QByteArray(uri) == QByteArrayLiteral("Fluid.Controls")); - - // @uri Fluid.Controls -} - -#include "plugin.moc" diff --git a/prototype_2016/third_party/fluid/controls/plugins.qmltypes b/prototype_2016/third_party/fluid/controls/plugins.qmltypes deleted file mode 100644 index 29ef846..0000000 --- a/prototype_2016/third_party/fluid/controls/plugins.qmltypes +++ /dev/null @@ -1,569 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump-qt5 -nonrelocatable Fluid.Controls 1.0' - -Module { - dependencies: [ - "Fluid.Core 1.0", - "Fluid.Effects 1.0", - "Fluid.Material 1.0", - "QtGraphicalEffects 1.0", - "QtQml 2.2", - "QtQuick 2.7", - "QtQuick.Controls 2.0", - "QtQuick.Controls.Material 2.0", - "QtQuick.Controls.Material.impl 2.0", - "QtQuick.Controls.Universal 2.0", - "QtQuick.Controls.Universal.impl 2.0", - "QtQuick.Controls.impl 2.0", - "QtQuick.Layouts 1.1", - "QtQuick.Templates 2.0", - "QtQuick.Window 2.2" - ] - Component { - prototype: "QQuickApplicationWindow" - name: "QtQuick.Controls/ApplicationWindow 2.0" - exports: ["QtQuick.Controls/ApplicationWindow 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/BoxShadow 2.0" - exports: ["QtQuick.Controls.Material.impl/BoxShadow 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "offsetX"; type: "int" } - Property { name: "offsetY"; type: "int" } - Property { name: "blurRadius"; type: "int" } - Property { name: "spreadRadius"; type: "int" } - Property { name: "source"; type: "QQuickItem"; isPointer: true } - Property { name: "fullWidth"; type: "bool" } - Property { name: "fullHeight"; type: "bool" } - Property { name: "glowRadius"; type: "double" } - Property { name: "spread"; type: "double" } - Property { name: "color"; type: "QColor" } - Property { name: "cornerRadius"; type: "double" } - Property { name: "cached"; type: "bool" } - } - Component { - prototype: "QQuickBusyIndicator" - name: "QtQuick.Controls/BusyIndicator 2.0" - exports: ["QtQuick.Controls/BusyIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickButton" - name: "QtQuick.Controls/Button 2.0" - exports: ["QtQuick.Controls/Button 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickCheckBox" - name: "QtQuick.Controls/CheckBox 2.0" - exports: ["QtQuick.Controls/CheckBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickCheckDelegate" - name: "QtQuick.Controls/CheckDelegate 2.0" - exports: ["QtQuick.Controls/CheckDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Material.impl/CheckIndicator 2.0" - exports: ["QtQuick.Controls.Material.impl/CheckIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.impl/CheckIndicator 2.0" - exports: ["QtQuick.Controls.impl/CheckIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickComboBox" - name: "QtQuick.Controls/ComboBox 2.0" - exports: ["QtQuick.Controls/ComboBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickDial" - name: "QtQuick.Controls/Dial 2.0" - exports: ["QtQuick.Controls/Dial 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickDrawer" - name: "QtQuick.Controls/Drawer 2.0" - exports: ["QtQuick.Controls/Drawer 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/ElevationEffect 2.0" - exports: ["QtQuick.Controls.Material.impl/ElevationEffect 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "source"; type: "QVariant" } - Property { name: "elevation"; type: "int" } - Property { name: "fullWidth"; type: "bool" } - Property { name: "fullHeight"; type: "bool" } - Property { name: "sourceItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } - Property { name: "_shadows"; type: "QVariant"; isReadonly: true } - Property { name: "_shadow"; type: "QVariant"; isReadonly: true } - } - Component { - prototype: "QObject" - name: "FluidStyle 1.0" - exports: ["FluidStyle 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - Property { name: "iconColorLight"; type: "QColor"; isReadonly: true } - Property { name: "iconColorDark"; type: "QColor"; isReadonly: true } - Property { name: "display4Font"; type: "QFont"; isReadonly: true } - Property { name: "display3Font"; type: "QFont"; isReadonly: true } - Property { name: "display2Font"; type: "QFont"; isReadonly: true } - Property { name: "display1Font"; type: "QFont"; isReadonly: true } - Property { name: "headlineFont"; type: "QFont"; isReadonly: true } - Property { name: "titleFont"; type: "QFont"; isReadonly: true } - Property { name: "subheadingFont"; type: "QFont"; isReadonly: true } - Property { name: "body2Font"; type: "QFont"; isReadonly: true } - Property { name: "body1Font"; type: "QFont"; isReadonly: true } - Property { name: "captionFont"; type: "QFont"; isReadonly: true } - Property { name: "buttonFont"; type: "QFont"; isReadonly: true } - Property { name: "subheaderFont"; type: "QFont"; isReadonly: true } - Property { name: "dialogFont"; type: "QFont"; isReadonly: true } - } - Component { - prototype: "QQuickFrame" - name: "QtQuick.Controls/Frame 2.0" - exports: ["QtQuick.Controls/Frame 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickGroupBox" - name: "QtQuick.Controls/GroupBox 2.0" - exports: ["QtQuick.Controls/GroupBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickItemDelegate" - name: "QtQuick.Controls/ItemDelegate 2.0" - exports: ["QtQuick.Controls/ItemDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickLabel" - name: "QtQuick.Controls/Label 2.0" - exports: ["QtQuick.Controls/Label 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickMenu" - name: "QtQuick.Controls/Menu 2.0" - exports: ["QtQuick.Controls/Menu 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickMenuItem" - name: "QtQuick.Controls/MenuItem 2.0" - exports: ["QtQuick.Controls/MenuItem 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickPage" - name: "QtQuick.Controls/Page 2.0" - exports: ["QtQuick.Controls/Page 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickPageIndicator" - name: "QtQuick.Controls/PageIndicator 2.0" - exports: ["QtQuick.Controls/PageIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickPane" - name: "QtQuick.Controls/Pane 2.0" - exports: ["QtQuick.Controls/Pane 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickPopup" - name: "QtQuick.Controls/Popup 2.0" - exports: ["QtQuick.Controls/Popup 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickProgressBar" - name: "QtQuick.Controls/ProgressBar 2.0" - exports: ["QtQuick.Controls/ProgressBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRadioButton" - name: "QtQuick.Controls/RadioButton 2.0" - exports: ["QtQuick.Controls/RadioButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRadioDelegate" - name: "QtQuick.Controls/RadioDelegate 2.0" - exports: ["QtQuick.Controls/RadioDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.impl/RadioIndicator 2.0" - exports: ["QtQuick.Controls.impl/RadioIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Universal.impl/RadioIndicator 2.0" - exports: ["QtQuick.Controls.Universal.impl/RadioIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QVariant" } - } - Component { - prototype: "QQuickRangeSlider" - name: "QtQuick.Controls/RangeSlider 2.0" - exports: ["QtQuick.Controls/RangeSlider 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Material.impl/Ripple 2.0" - exports: ["QtQuick.Controls.Material.impl/Ripple 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - Property { name: "colored"; type: "bool" } - } - Component { - prototype: "QQuickScrollBar" - name: "QtQuick.Controls/ScrollBar 2.0" - exports: ["QtQuick.Controls/ScrollBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickScrollIndicator" - name: "QtQuick.Controls/ScrollIndicator 2.0" - exports: ["QtQuick.Controls/ScrollIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSlider" - name: "QtQuick.Controls/Slider 2.0" - exports: ["QtQuick.Controls/Slider 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/SliderHandle 2.0" - exports: ["QtQuick.Controls.Material.impl/SliderHandle 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "value"; type: "double" } - Property { name: "handleHasFocus"; type: "bool" } - Property { name: "handlePressed"; type: "bool" } - Property { name: "initialSize"; type: "int"; isReadonly: true } - Property { name: "horizontal"; type: "bool"; isReadonly: true } - Property { name: "control"; type: "QVariant"; isReadonly: true } - } - Component { - prototype: "QQuickSpinBox" - name: "QtQuick.Controls/SpinBox 2.0" - exports: ["QtQuick.Controls/SpinBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickStackView" - name: "QtQuick.Controls/StackView 2.0" - exports: ["QtQuick.Controls/StackView 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwipeDelegate" - name: "QtQuick.Controls/SwipeDelegate 2.0" - exports: ["QtQuick.Controls/SwipeDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwipeView" - name: "QtQuick.Controls/SwipeView 2.0" - exports: ["QtQuick.Controls/SwipeView 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickSwitch" - name: "QtQuick.Controls/Switch 2.0" - exports: ["QtQuick.Controls/Switch 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwitchDelegate" - name: "QtQuick.Controls/SwitchDelegate 2.0" - exports: ["QtQuick.Controls/SwitchDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Universal.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.Universal.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.Material.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickTabBar" - name: "QtQuick.Controls/TabBar 2.0" - exports: ["QtQuick.Controls/TabBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickTabButton" - name: "QtQuick.Controls/TabButton 2.0" - exports: ["QtQuick.Controls/TabButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickTextArea" - name: "QtQuick.Controls/TextArea 2.0" - exports: ["QtQuick.Controls/TextArea 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickTextField" - name: "QtQuick.Controls/TextField 2.0" - exports: ["QtQuick.Controls/TextField 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickToolBar" - name: "QtQuick.Controls/ToolBar 2.0" - exports: ["QtQuick.Controls/ToolBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickToolButton" - name: "QtQuick.Controls/ToolButton 2.0" - exports: ["QtQuick.Controls/ToolButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickToolTip" - name: "QtQuick.Controls/ToolTip 2.0" - exports: ["QtQuick.Controls/ToolTip 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickTumbler" - name: "QtQuick.Controls/Tumbler 2.0" - exports: ["QtQuick.Controls/Tumbler 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "Units 1.0" - exports: ["Units 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - defaultProperty: "data" - Property { name: "gridUnit"; type: "int"; isReadonly: true } - Property { name: "smallSpacing"; type: "double"; isReadonly: true } - Property { name: "mediumSpacing"; type: "double"; isReadonly: true } - Property { name: "largeSpacing"; type: "double"; isReadonly: true } - Property { name: "shortDuration"; type: "int"; isReadonly: true } - Property { name: "mediumDuration"; type: "int"; isReadonly: true } - Property { name: "longDuration"; type: "int"; isReadonly: true } - Property { name: "iconSizes"; type: "QObject"; isReadonly: true; isPointer: true } - Method { - name: "gu" - type: "QVariant" - Parameter { name: "x"; type: "QVariant" } - } - Method { - name: "roundToIconSize" - type: "QVariant" - Parameter { name: "x"; type: "QVariant" } - } - } - Component { - prototype: "QObject" - name: "Utils 1.0" - exports: ["Utils 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - Method { - name: "asColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "alpha" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - Parameter { name: "alpha"; type: "QVariant" } - } - Method { - name: "blendColors" - type: "QVariant" - Parameter { name: "color1"; type: "QVariant" } - Parameter { name: "color2"; type: "QVariant" } - Parameter { name: "a"; type: "QVariant" } - } - Method { - name: "luminance" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "lightDark" - type: "QVariant" - Parameter { name: "background"; type: "QVariant" } - Parameter { name: "lightColor"; type: "QVariant" } - Parameter { name: "darkColor"; type: "QVariant" } - } - Method { - name: "isDarkColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "getSourceForIconName" - type: "QVariant" - Parameter { name: "name"; type: "QVariant" } - } - Method { - name: "scale" - type: "QVariant" - Parameter { name: "percent"; type: "QVariant" } - Parameter { name: "start"; type: "QVariant" } - Parameter { name: "end"; type: "QVariant" } - } - } -} diff --git a/prototype_2016/third_party/fluid/controls/qmldir b/prototype_2016/third_party/fluid/controls/qmldir deleted file mode 100644 index 74d619d..0000000 --- a/prototype_2016/third_party/fluid/controls/qmldir +++ /dev/null @@ -1,40 +0,0 @@ -module Fluid.Controls -plugin fluidcontrols -class FluidControlsPlugin -typeinfo plugins.qmltypes - -Action 1.0 Action.qml -AppBar 1.0 AppBar.qml -AppToolBar 1.0 AppToolBar.qml -BaseListItem 1.0 BaseListItem.qml -BodyLabel 1.0 BodyLabel.qml -CaptionLabel 1.0 CaptionLabel.qml -Card 1.0 Card.qml -CircleImage 1.0 CircleImage.qml -Dialog 1.0 Dialog.qml -DisplayLabel 1.0 DisplayLabel.qml -FluidWindow 1.0 FluidWindow.qml -HeadlineLabel 1.0 HeadlineLabel.qml -IconButton 1.0 IconButton.qml -Icon 1.0 Icon.qml -InfoBar 1.0 InfoBar.qml -ListItemDelegate 1.0 ListItemDelegate.qml -ListItem 1.0 ListItem.qml -Loadable 1.0 Loadable.qml -NavigationDrawer 1.0 NavigationDrawer.qml -NoiseBackground 1.0 NoiseBackground.qml -Page 1.0 Page.qml -PageStack 1.0 PageStack.qml -Placeholder 1.0 Placeholder.qml -Showable 1.0 Showable.qml -Sidebar 1.0 Sidebar.qml -SmoothFadeImage 1.0 SmoothFadeImage.qml -SmoothFadeLoader 1.0 SmoothFadeLoader.qml -Subheader 1.0 Subheader.qml -SubheadingLabel 1.0 SubheadingLabel.qml -Tab 1.0 Tab.qml -TabbedPage 1.0 TabbedPage.qml -ThinDivider 1.0 ThinDivider.qml -TitleLabel 1.0 TitleLabel.qml -singleton FluidStyle 1.0 FluidStyle.qml -singleton Units 1.0 Units.qml diff --git a/prototype_2016/third_party/fluid/controls/qmldir_noplugin b/prototype_2016/third_party/fluid/controls/qmldir_noplugin deleted file mode 100644 index 89a7fde..0000000 --- a/prototype_2016/third_party/fluid/controls/qmldir_noplugin +++ /dev/null @@ -1,36 +0,0 @@ -module Fluid.Controls -typeinfo plugins.qmltypes - -Action 1.0 Action.qml -AppBar 1.0 AppBar.qml -AppToolBar 1.0 AppToolBar.qml -BaseListItem 1.0 BaseListItem.qml -BodyLabel 1.0 BodyLabel.qml -CaptionLabel 1.0 CaptionLabel.qml -Card 1.0 Card.qml -CircleImage 1.0 CircleImage.qml -Dialog 1.0 Dialog.qml -DisplayLabel 1.0 DisplayLabel.qml -FluidWindow 1.0 FluidWindow.qml -HeadlineLabel 1.0 HeadlineLabel.qml -IconButton 1.0 IconButton.qml -Icon 1.0 Icon.qml -InfoBar 1.0 InfoBar.qml -ListItemDelegate 1.0 ListItemDelegate.qml -ListItem 1.0 ListItem.qml -Loadable 1.0 Loadable.qml -NavigationDrawer 1.0 NavigationDrawer.qml -NoiseBackground 1.0 NoiseBackground.qml -Page 1.0 Page.qml -PageStack 1.0 PageStack.qml -Placeholder 1.0 Placeholder.qml -Showable 1.0 Showable.qml -Sidebar 1.0 Sidebar.qml -SmoothFadeImage 1.0 SmoothFadeImage.qml -SmoothFadeLoader 1.0 SmoothFadeLoader.qml -Subheader 1.0 Subheader.qml -SubheadingLabel 1.0 SubheadingLabel.qml -ThinDivider 1.0 ThinDivider.qml -TitleLabel 1.0 TitleLabel.qml -singleton FluidStyle 1.0 FluidStyle.qml -singleton Units 1.0 Units.qml diff --git a/prototype_2016/third_party/fluid/core/CMakeLists.txt b/prototype_2016/third_party/fluid/core/CMakeLists.txt deleted file mode 100644 index 21bd974..0000000 --- a/prototype_2016/third_party/fluid/core/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -include_directories( - "${CMAKE_CURRENT_BINARY_DIR}/../src" - "${CMAKE_CURRENT_BINARY_DIR}/../src/Fluid" -) - -add_definitions(-DQT_PLUGIN) - -set(SOURCES - plugin.cpp - clipboard.cpp - qmldateutils.cpp - device.cpp - iconsimageprovider.cpp - qqmlsortfilterproxymodel.cpp - standardpaths.cpp -) - -add_library(fluidcore SHARED ${SOURCES}) -target_link_libraries(fluidcore Qt5::Svg Qt5::Gui Qt5::Quick Fluid) - -set(FILES - plugins.qmltypes - qmldir - Object.qml - PlatformExtensions.qml - Utils.qml -) - -install(TARGETS fluidcore LIBRARY - DESTINATION ${QML_INSTALL_DIR}/Fluid/Core) -install(FILES ${FILES} - DESTINATION ${QML_INSTALL_DIR}/Fluid/Core) diff --git a/prototype_2016/third_party/fluid/core/Object.qml b/prototype_2016/third_party/fluid/core/Object.qml deleted file mode 100644 index f50c8f8..0000000 --- a/prototype_2016/third_party/fluid/core/Object.qml +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype Object - \inqmlmodule Fluid.Core - \ingroup fluidcore - - \brief A QtObject with children. - - The \l Object type is a non-visual element that extends \l QtObject - with the ability to hold children objects. -*/ -QtObject { - default property alias children: object.__children - - /*! - \qmlproperty list Object::children - - Children objects. - */ - property list __children: [QtObject {}] - - id: object -} diff --git a/prototype_2016/third_party/fluid/core/PlatformExtensions.qml b/prototype_2016/third_party/fluid/core/PlatformExtensions.qml deleted file mode 100644 index ba9dcdb..0000000 --- a/prototype_2016/third_party/fluid/core/PlatformExtensions.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2015-2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import Fluid.Core 1.0 - -Object { - id: platform - - property var platformExtensions - - property color decorationColor - property var window: null - - onDecorationColorChanged: { - if (platformExtensions && color != "#000000") { - platformExtensions.decorationColor = decorationColor - } - } - - onWindowChanged: { - if (platformExtensions) { - platformExtensions.window = window - } - } - - Component.onCompleted: { - try { - var code = 'import Liri.Platform 1.0; PlatformExtensions {}' - platformExtensions = Qt.createQmlObject(code, platform, "LiriExtensions"); - - platformExtensions.window = window - if (decorationColor != "#000000") - platformExtensions.decorationColor = decorationColor - } catch (error) { - // Ignore the error; it only means that the Papyros - // platform extensions are not available - } - } -} diff --git a/prototype_2016/third_party/fluid/core/Utils.qml b/prototype_2016/third_party/fluid/core/Utils.qml deleted file mode 100644 index 41b6e7b..0000000 --- a/prototype_2016/third_party/fluid/core/Utils.qml +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -pragma Singleton - -/*! - \qmltype Utils - \inqmlmodule Fluid.Core - \ingroup fluidcore - - \brief A collection of helpful utility methods. - - Currently the only utility methods are for working with colors. -*/ -QtObject { - /*! - Make sure we have a real \l color object to work with (versus a string like "#ccc") - */ - function asColor(color) { - return Qt.darker(color, 1) - } - - /*! - A utility method for changing the alpha on colors. Returns a new object, and does not - modify the original color at all. - */ - function alpha(color, alpha) { - color = asColor(color) - - color.a = alpha - - return color - } - - /*! - Blend \a color1 and \a color2 together and set alpha to \a a. - */ - function blendColors(color1, color2, a) { - return alpha(Qt.tint(color1, color2), a) - } - - /*! - Calculate luminance of \a color. - */ - function luminance(color) { - color = asColor(color) - return (color.r * 0.2126) + (color.g * 0.7152) + (color.b * 0.0722) - } - - /*! - Select a color depending on whether \a background color is light or dark. - Returns \a lightColor if \a background is a light color, otherwise - returns \a darkColor. - */ - function lightDark(background, lightColor, darkColor) { - return isDarkColor(background) ? darkColor : lightColor - } - - /*! - Returns \c true if \a color is dark and should have light content on top. - */ - function isDarkColor(color) { - color = asColor(color) - - var a = 1 - (0.299 * color.r + 0.587 * color.g + 0.114 * color.b) - - return color.a > 0 && a >= 0.3 - } - - /*! - Returns a source suitable for an \l Image from an icon name. - If \a name is an URL it will be returned verbatim, instead if it - contains a slash character an icon relative to Fluid icons/ directory - will be returned, otherwise an image://fluidicontheme/\a name URL. - */ - function getSourceForIconName(name) { - return name ? name.indexOf("/") === 0 || name.indexOf("file://") === 0 || name.indexOf("qrc") === 0 - ? name - : name.indexOf("/") !== -1 ? "image://fluidicons/" + name - : "image://fluidicontheme/" + name - : "" - } - - /*! - Scale \a percent in the range between \a start and \a end. - */ - function scale(percent, start, end) { - var diff = end - start - - return start + percent * diff - } -} diff --git a/prototype_2016/third_party/fluid/core/clipboard.cpp b/prototype_2016/third_party/fluid/core/clipboard.cpp deleted file mode 100644 index 8e92062..0000000 --- a/prototype_2016/third_party/fluid/core/clipboard.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include "clipboard.h" - -#include - -/*! - \qmltype Clipboard - \inqmlmodule Fluid.Core - \ingroup fluidcore - - \brief Clipboard. -*/ - -Clipboard::Clipboard(QObject *parent) - : QObject(parent) - , m_clipboard(QGuiApplication::clipboard()) -{ - connect(m_clipboard, &QClipboard::dataChanged, this, &Clipboard::textChanged); -} - -/*! - \qmlproperty string Clipboard::text - - This property holds the clipboard text. -*/ - -QString Clipboard::text() const -{ - return m_clipboard->text(); -} - -void Clipboard::clear() -{ - m_clipboard->clear(); -} - -void Clipboard::setText(const QString &text) -{ - m_clipboard->setText(text); -} diff --git a/prototype_2016/third_party/fluid/core/clipboard.h b/prototype_2016/third_party/fluid/core/clipboard.h deleted file mode 100644 index e59b7cb..0000000 --- a/prototype_2016/third_party/fluid/core/clipboard.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#include -#include - -class Clipboard : public QObject -{ - Q_OBJECT - - Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) - -public: - explicit Clipboard(QObject *parent = nullptr); - - QString text() const; - - Q_INVOKABLE void clear(); - -public Q_SLOTS: - void setText(const QString &text); - -Q_SIGNALS: - void textChanged(); - -private: - QClipboard *m_clipboard = nullptr; -}; diff --git a/prototype_2016/third_party/fluid/core/core.pri b/prototype_2016/third_party/fluid/core/core.pri deleted file mode 100644 index 16b7b9d..0000000 --- a/prototype_2016/third_party/fluid/core/core.pri +++ /dev/null @@ -1,19 +0,0 @@ -HEADERS += \ - $$PWD/clipboard.h \ - $$PWD/device.h \ - $$PWD/iconsimageprovider.h \ - $$PWD/qmldateutils.h \ - $$PWD/qqmlsortfilterproxymodel.h \ - $$PWD/standardpaths.h - -SOURCES += \ - $$PWD/clipboard.cpp \ - $$PWD/device.cpp \ - $$PWD/iconsimageprovider.cpp \ - $$PWD/plugin.cpp \ - $$PWD/qmldateutils.cpp \ - $$PWD/qqmlsortfilterproxymodel.cpp \ - $$PWD/standardpaths.cpp - -RESOURCES += \ - $$PWD/core.qrc diff --git a/prototype_2016/third_party/fluid/core/core.qrc b/prototype_2016/third_party/fluid/core/core.qrc deleted file mode 100644 index 3b17685..0000000 --- a/prototype_2016/third_party/fluid/core/core.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - Object.qml - PlatformExtensions.qml - Utils.qml - qmldir_noplugin - - diff --git a/prototype_2016/third_party/fluid/core/device.cpp b/prototype_2016/third_party/fluid/core/device.cpp deleted file mode 100644 index 2e627ce..0000000 --- a/prototype_2016/third_party/fluid/core/device.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include "device.h" - -Device::Device(QObject *parent) - : QObject(parent) -{ - m_screen = qGuiApp->primaryScreen(); - - connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &Device::screenChanged); -} - -Device::FormFactor Device::formFactor() const -{ - float diagonal = calculateDiagonal(); - - if (diagonal >= 3.5 && diagonal < 5) { - // iPhone 1st generation to phablet - return Device::Phone; - } else if (diagonal >= 5 && diagonal < 6.5) { - return Device::Phablet; - } else if (diagonal >= 6.5 && diagonal < 10.1) { - return Device::Tablet; - } else if (diagonal >= 10.1 && diagonal < 29) { - return Device::Computer; - } else if (diagonal >= 29 && diagonal < 92) { - return Device::TV; - } else { - return Device::Unknown; - } -} - -QString Device::name() const -{ - switch (formFactor()) { - case Phone: - return tr("phone"); - case Phablet: - return tr("phablet"); - case Tablet: - return tr("tablet"); - case Computer: - return tr("computer"); - case TV: - return tr("TV"); - case Unknown: - return tr("device"); - default: - return tr("unknown"); - } -} - -QString Device::iconName() const -{ - switch (formFactor()) { - case Phone: - return "hardware/smartphone"; - case Phablet: - return "hardware/tablet"; - case Tablet: - return "hardware/tablet"; - case Computer: - return "hardware/desktop_windows"; - case TV: - return "hardware/tv"; - case Unknown: - default: - return "hardware/computer"; - } -} - -bool Device::isPortrait() const -{ - return m_screen->physicalSize().height() > m_screen->physicalSize().width(); -} - -bool Device::hasTouchScreen() const -{ -// QTBUG-36007 -#if defined(Q_OS_ANDROID) - return true; -#else - const auto devices = QTouchDevice::devices(); - foreach (const QTouchDevice *dev, devices) { - if (dev->type() == QTouchDevice::TouchScreen) - return true; - } - return false; -#endif -} - -bool Device::isMobile() const -{ -#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID) || defined(Q_OS_BLACKBERRY) || defined(Q_OS_QNX) \ - || defined(Q_OS_WINRT) - return true; -#else - if (qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_MOBILE")) { - return true; - } - return false; -#endif -} - -bool Device::hoverEnabled() const -{ - return !isMobile() || !hasTouchScreen(); -} - -int Device::gridUnit() const -{ - Device::FormFactor formFactor = this->formFactor(); - - if (formFactor == Device::Phone || formFactor == Device::Phablet) { - return isPortrait() ? 56 : 48; - } else if (formFactor == Device::Tablet) { - return 64; - } else { - return hasTouchScreen() ? 64 : 48; - } -} - -void Device::screenChanged() -{ - if (m_screen) - m_screen->disconnect(this); - - m_screen = qGuiApp->primaryScreen(); - - connect(m_screen, &QScreen::geometryChanged, this, &Device::geometryChanged); - - emit geometryChanged(); -} - -float Device::calculateDiagonal() const -{ - return sqrt(pow((m_screen->physicalSize().width()), 2) - + pow((m_screen->physicalSize().height()), 2)) - * 0.039370; -} diff --git a/prototype_2016/third_party/fluid/core/device.h b/prototype_2016/third_party/fluid/core/device.h deleted file mode 100644 index be99599..0000000 --- a/prototype_2016/third_party/fluid/core/device.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#include - -#include -#include -#include -#include -#include - -class Device : public QObject -{ - Q_OBJECT - - Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY geometryChanged) - Q_PROPERTY(QString name READ name NOTIFY geometryChanged) - Q_PROPERTY(QString iconName READ iconName NOTIFY geometryChanged) - - Q_PROPERTY(bool isPortrait READ isPortrait NOTIFY geometryChanged) - Q_PROPERTY(bool isMobile READ isMobile CONSTANT) - Q_PROPERTY(bool hasTouchScreen READ hasTouchScreen CONSTANT) - Q_PROPERTY(bool hoverEnabled READ hoverEnabled CONSTANT) - - Q_PROPERTY(int gridUnit READ gridUnit NOTIFY geometryChanged) - -public: - enum FormFactor { Phone, Phablet, Tablet, Computer, TV, Unknown }; - Q_ENUM(FormFactor) - - Device(QObject *parent = nullptr); - - FormFactor formFactor() const; - QString name() const; - QString iconName() const; - - bool isPortrait() const; - bool hasTouchScreen() const; - bool isMobile() const; - bool hoverEnabled() const; - - int gridUnit() const; - -Q_SIGNALS: - void geometryChanged(); - -private Q_SLOTS: - void screenChanged(); - -private: - float calculateDiagonal() const; - - QScreen *m_screen; -}; diff --git a/prototype_2016/third_party/fluid/core/doc/fluidcore.qdocconf b/prototype_2016/third_party/fluid/core/doc/fluidcore.qdocconf deleted file mode 100644 index ffeb2b0..0000000 --- a/prototype_2016/third_party/fluid/core/doc/fluidcore.qdocconf +++ /dev/null @@ -1,47 +0,0 @@ -include(../../doc/defaults.qdocconf) - -project = FluidCore -description = Fluid Core Reference Documentation -version = $FLUID_VERSION - -qhp.projects = FluidCore - -qhp.Fluid.file = fluidcore.qhp -qhp.Fluid.namespace = io.liri.fluidcore.$FLUID_VERSION_TAG -qhp.Fluid.virtualFolder = fluidcore -qhp.Fluid.indexTitle = Fluid Core -qhp.Fluid.indexRoot = - -qhp.Fluid.filterAttributes = fluidcore $FLUID_VERSION qtrefdoc -qhp.Fluid.customFilters.Qt.name = FluidCore $FLUID_VERSION -qhp.Fluid.customFilters.Qt.filterAttributes = fluidcore $FLUID_VERSION - -qhp.Fluid.subprojects = qmltypes classes examples -qhp.Fluid.subprojects.qmltypes.title = QML Types -qhp.Fluid.subprojects.qmltypes.indexTitle = Fluid Core QML Types -qhp.Fluid.subprojects.qmltypes.selectors = qmlclass -qhp.Fluid.subprojects.qmltypes.sortPages = true -qhp.Fluid.subprojects.classes.title = C++ Classes -qhp.Fluid.subprojects.classes.indexTitle = Fluid Core C++ Classes -qhp.Fluid.subprojects.classes.selectors = class fake:headerfile -qhp.Fluid.subprojects.classes.sortPages = true -qhp.Fluid.subprojects.examples.title = Examples -qhp.Fluid.subprojects.examples.indexTitle = Fluid Core Examples -qhp.Fluid.subprojects.examples.selectors = fake:example - -# Specify the install path under QT_INSTALL_EXAMPLES -# Note: paths passed to \example command must contain the parent directory, e.g. -# \example controls/tabs -#exampledirs += snippets - -#examplesinstallpath = fluid - -headerdirs += . - -sourcedirs += . src - -imagedirs += images - -navigation.landingpage = "Fluid Core" -navigation.qmltypespage = "Fluid Core QML Types" -navigation.cppclassespage = "Fluid Core C++ Classes" diff --git a/prototype_2016/third_party/fluid/core/iconsimageprovider.cpp b/prototype_2016/third_party/fluid/core/iconsimageprovider.cpp deleted file mode 100644 index 65df104..0000000 --- a/prototype_2016/third_party/fluid/core/iconsimageprovider.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -#include -#include -#include - -#include "iconsimageprovider.h" - -IconsImageProvider::IconsImageProvider() - : QQuickImageProvider(QQuickImageProvider::Image) -{ -} - -QImage IconsImageProvider::requestImage(const QString &id, QSize *realSize, - const QSize &requestedSize) -{ - // Sanitize requested size - QSize size(requestedSize); - if (size.width() < 1) - size.setWidth(1); - if (size.height() < 1) - size.setHeight(1); - - // Return real size - if (realSize) - *realSize = size; - -#ifdef FLUID_LOCAL - QSvgRenderer renderer(QLatin1String("qrc:/Fluid/Controls/") + id + QLatin1String(".svg")); - QImage image(size, QImage::Format_ARGB32); - image.fill(Qt::transparent); - QPainter painter(&image); - renderer.render(&painter); - return image; -#else - const QString targetPath = QStringLiteral("Fluid/Controls/icons"); - const QStringList importPaths = QQmlEngine().importPathList(); - - for (const QString &importPath: importPaths) { - QDir dir(importPath); - if (dir.exists(targetPath)) { - QDir targetDir(dir.absoluteFilePath(targetPath)); - QSvgRenderer renderer(targetDir.absoluteFilePath(id + QLatin1String(".svg"))); - QImage image(size, QImage::Format_ARGB32); - image.fill(Qt::transparent); - QPainter painter(&image); - renderer.render(&painter); - return image; - } - } - - return QImage(); -#endif -} diff --git a/prototype_2016/third_party/fluid/core/iconsimageprovider.h b/prototype_2016/third_party/fluid/core/iconsimageprovider.h deleted file mode 100644 index 0dc9530..0000000 --- a/prototype_2016/third_party/fluid/core/iconsimageprovider.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#include - -class IconsImageProvider : public QQuickImageProvider -{ -public: - IconsImageProvider(); - - QImage requestImage(const QString &id, QSize *realSize, const QSize &requestedSize); -}; diff --git a/prototype_2016/third_party/fluid/core/plugin.cpp b/prototype_2016/third_party/fluid/core/plugin.cpp deleted file mode 100644 index 5de9a30..0000000 --- a/prototype_2016/third_party/fluid/core/plugin.cpp +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -#include - -#include "clipboard.h" -#include "device.h" -#include "iconsimageprovider.h" -#include "qmldateutils.h" -#include "qqmlsortfilterproxymodel.h" -#include "standardpaths.h" - -static QObject *dateUtilsProvider(QQmlEngine *engine, QJSEngine *jsEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(jsEngine); - - return new DateUtils(); -} - -static QObject *deviceProvider(QQmlEngine *engine, QJSEngine *jsEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(jsEngine); - - return new Device(); -} - -static QObject *standardPathsProvider(QQmlEngine *engine, QJSEngine *jsEngine) -{ - Q_UNUSED(engine); - Q_UNUSED(jsEngine); - - return new StandardPaths(); -} - -class FluidCorePlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") -public: - void initializeEngine(QQmlEngine *engine, const char *uri); - void registerTypes(const char *uri); -}; - -void FluidCorePlugin::initializeEngine(QQmlEngine *engine, const char *uri) -{ - Q_ASSERT(QByteArray(uri) == QByteArrayLiteral("Fluid.Core")); - - engine->addImageProvider(QLatin1String("fluidicons"), new IconsImageProvider()); -} - -void FluidCorePlugin::registerTypes(const char *uri) -{ - Q_ASSERT(QByteArray("Fluid.Core") == QByteArray(uri)); - - // @uri Fluid.Core - - qmlRegisterType(uri, 1, 0, "Clipboard"); - - qmlRegisterType(); - qmlRegisterType(uri, 1, 0, "SortFilterProxyModel"); - - qmlRegisterSingletonType(uri, 1, 0, "DateUtils", dateUtilsProvider); - qmlRegisterSingletonType(uri, 1, 0, "Device", deviceProvider); - qmlRegisterSingletonType(uri, 1, 0, "StandardPaths", standardPathsProvider); -} - -#ifdef FLUID_LOCAL -static void registerFluidCoreTypes() { - FluidCorePlugin fluidCore; - fluidCore.registerTypes("Fluid.Core"); -} - -Q_COREAPP_STARTUP_FUNCTION(registerFluidCoreTypes) -#endif - -#include "plugin.moc" diff --git a/prototype_2016/third_party/fluid/core/plugins.qmltypes b/prototype_2016/third_party/fluid/core/plugins.qmltypes deleted file mode 100644 index f8f71ef..0000000 --- a/prototype_2016/third_party/fluid/core/plugins.qmltypes +++ /dev/null @@ -1,268 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump-qt5 -nonrelocatable Fluid.Core 1.0' - -Module { - dependencies: ["QtQuick 2.0"] - Component { - name: "Clipboard" - prototype: "QObject" - exports: ["Fluid.Core/Clipboard 1.0"] - exportMetaObjectRevisions: [0] - Property { name: "text"; type: "string" } - Method { - name: "setText" - Parameter { name: "text"; type: "string" } - } - Method { name: "clear" } - } - Component { - name: "DateUtils" - prototype: "QObject" - exports: ["Fluid.Core/DateUtils 1.0"] - isCreatable: false - isSingleton: true - exportMetaObjectRevisions: [0] - Enum { - name: "DurationFormat" - values: { - "Long": 0, - "Short": 1 - } - } - Enum { - name: "DurationType" - values: { - "Seconds": 0, - "Minutes": 1, - "Hours": 2, - "Any": 3 - } - } - Method { - name: "formatDuration" - type: "string" - Parameter { name: "duration"; type: "qlonglong" } - Parameter { name: "format"; type: "DurationFormat" } - Parameter { name: "type"; type: "DurationType" } - } - Method { - name: "formatDuration" - type: "string" - Parameter { name: "duration"; type: "qlonglong" } - Parameter { name: "format"; type: "DurationFormat" } - } - Method { - name: "formatDuration" - type: "string" - Parameter { name: "duration"; type: "qlonglong" } - } - } - Component { - name: "Device" - prototype: "QObject" - exports: ["Fluid.Core/Device 1.0"] - isCreatable: false - isSingleton: true - exportMetaObjectRevisions: [0] - Enum { - name: "FormFactor" - values: { - "Phone": 0, - "Phablet": 1, - "Tablet": 2, - "Computer": 3, - "TV": 4, - "Unknown": 5 - } - } - Property { name: "formFactor"; type: "FormFactor"; isReadonly: true } - Property { name: "name"; type: "string"; isReadonly: true } - Property { name: "iconName"; type: "string"; isReadonly: true } - Property { name: "isPortrait"; type: "bool"; isReadonly: true } - Property { name: "isMobile"; type: "bool"; isReadonly: true } - Property { name: "hasTouchScreen"; type: "bool"; isReadonly: true } - Property { name: "hoverEnabled"; type: "bool"; isReadonly: true } - Property { name: "gridUnit"; type: "int"; isReadonly: true } - Signal { name: "geometryChanged" } - } - Component { - name: "QAbstractProxyModel" - prototype: "QAbstractItemModel" - Property { name: "sourceModel"; type: "QAbstractItemModel"; isPointer: true } - Method { - name: "mapToSource" - type: "QModelIndex" - Parameter { name: "proxyIndex"; type: "QModelIndex" } - } - Method { - name: "mapFromSource" - type: "QModelIndex" - Parameter { name: "sourceIndex"; type: "QModelIndex" } - } - Method { - name: "mapSelectionToSource" - type: "QItemSelection" - Parameter { name: "selection"; type: "QItemSelection" } - } - Method { - name: "mapSelectionFromSource" - type: "QItemSelection" - Parameter { name: "selection"; type: "QItemSelection" } - } - } - Component { - name: "QQmlSortFilterProxyModel" - prototype: "QSortFilterProxyModel" - exports: ["Fluid.Core/SortFilterProxyModel 1.0"] - exportMetaObjectRevisions: [0] - Enum { - name: "PatternSyntax" - values: { - "RegExp": 0, - "Wildcard": 1, - "FixedString": 2, - "RegExp2": 3, - "WildcardUnix": 4, - "W3CXmlSchema11": 5 - } - } - Property { name: "count"; type: "int"; isReadonly: true } - Property { name: "filterRoleName"; type: "string" } - Property { name: "filterPattern"; type: "string" } - Property { name: "filterPatternSyntax"; type: "PatternSyntax" } - Property { name: "filterValue"; type: "QVariant" } - Property { name: "filterExpression"; type: "QQmlScriptString" } - Property { name: "sortRoleName"; type: "string" } - Property { name: "sortOrder"; type: "Qt::SortOrder" } - Property { name: "sortExpression"; type: "QQmlScriptString" } - } - Component { - name: "QSortFilterProxyModel" - prototype: "QAbstractProxyModel" - Property { name: "filterRegExp"; type: "QRegExp" } - Property { name: "filterKeyColumn"; type: "int" } - Property { name: "dynamicSortFilter"; type: "bool" } - Property { name: "filterCaseSensitivity"; type: "Qt::CaseSensitivity" } - Property { name: "sortCaseSensitivity"; type: "Qt::CaseSensitivity" } - Property { name: "isSortLocaleAware"; type: "bool" } - Property { name: "sortRole"; type: "int" } - Property { name: "filterRole"; type: "int" } - Method { - name: "setFilterRegExp" - Parameter { name: "pattern"; type: "string" } - } - Method { - name: "setFilterWildcard" - Parameter { name: "pattern"; type: "string" } - } - Method { - name: "setFilterFixedString" - Parameter { name: "pattern"; type: "string" } - } - Method { name: "clear" } - Method { name: "invalidate" } - } - Component { - name: "StandardPaths" - prototype: "QObject" - exports: ["Fluid.Core/StandardPaths 1.0"] - isCreatable: false - isSingleton: true - exportMetaObjectRevisions: [0] - Enum { - name: "StandardLocation" - values: { - "DesktopLocation": 0, - "DocumentsLocation": 1, - "FontsLocation": 2, - "ApplicationsLocation": 3, - "MusicLocation": 4, - "MoviesLocation": 5, - "PicturesLocation": 6, - "TempLocation": 7, - "HomeLocation": 8, - "DataLocation": 9, - "CacheLocation": 10, - "GenericDataLocation": 11, - "RuntimeLocation": 12, - "ConfigLocation": 13, - "DownloadLocation": 14, - "GenericCacheLocation": 15, - "GenericConfigLocation": 16 - } - } - Method { - name: "locateFile" - type: "string" - Parameter { name: "type"; type: "StandardLocation" } - Parameter { name: "fileName"; type: "string" } - } - Method { - name: "locateDirectory" - type: "string" - Parameter { name: "type"; type: "StandardLocation" } - Parameter { name: "dirName"; type: "string" } - } - } - Component { - prototype: "QObject" - name: "Utils 1.0" - exports: ["Utils 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - Method { - name: "asColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "alpha" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - Parameter { name: "alpha"; type: "QVariant" } - } - Method { - name: "blendColors" - type: "QVariant" - Parameter { name: "color1"; type: "QVariant" } - Parameter { name: "color2"; type: "QVariant" } - Parameter { name: "a"; type: "QVariant" } - } - Method { - name: "luminance" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "lightDark" - type: "QVariant" - Parameter { name: "background"; type: "QVariant" } - Parameter { name: "lightColor"; type: "QVariant" } - Parameter { name: "darkColor"; type: "QVariant" } - } - Method { - name: "isDarkColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "getSourceForIconName" - type: "QVariant" - Parameter { name: "name"; type: "QVariant" } - } - Method { - name: "scale" - type: "QVariant" - Parameter { name: "percent"; type: "QVariant" } - Parameter { name: "start"; type: "QVariant" } - Parameter { name: "end"; type: "QVariant" } - } - } -} diff --git a/prototype_2016/third_party/fluid/core/qmldateutils.cpp b/prototype_2016/third_party/fluid/core/qmldateutils.cpp deleted file mode 100644 index e33d3b5..0000000 --- a/prototype_2016/third_party/fluid/core/qmldateutils.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include "qmldateutils.h" - -DateUtils::DateUtils(QObject *parent) - : QObject(parent) -{ -} - -QString DateUtils::formatDuration(qlonglong duration, DurationFormat format, - DurationType type) const -{ - return Fluid::DateUtils::formatDuration(duration, - static_cast(format), - static_cast(type)); -} - -QString DateUtils::friendlyTime(const QDateTime &time, bool standalone) const -{ - return Fluid::DateUtils::friendlyTime(time, standalone); -} diff --git a/prototype_2016/third_party/fluid/core/qmldateutils.h b/prototype_2016/third_party/fluid/core/qmldateutils.h deleted file mode 100644 index 255e439..0000000 --- a/prototype_2016/third_party/fluid/core/qmldateutils.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#ifdef FLUID_LOCAL - #include "../src/dateutils.h" -#else - #include -#endif -#include - -class DateUtils : public QObject -{ - Q_OBJECT - -public: - enum DurationFormat { Long, Short }; - Q_ENUM(DurationFormat) - - enum DurationType { Seconds, Minutes, Hours, Any }; - Q_ENUM(DurationType) - - DateUtils(QObject *parent = nullptr); - - Q_INVOKABLE QString formatDuration(qlonglong duration, - DurationFormat format = DurationFormat::Short, - DurationType type = DurationType::Any) const; - Q_INVOKABLE QString friendlyTime(const QDateTime &time, bool standalone) const; -}; diff --git a/prototype_2016/third_party/fluid/core/qmldir b/prototype_2016/third_party/fluid/core/qmldir deleted file mode 100644 index 07b5022..0000000 --- a/prototype_2016/third_party/fluid/core/qmldir +++ /dev/null @@ -1,8 +0,0 @@ -module Fluid.Core -plugin fluidcore -class FluidCorePlugin -typeinfo plugins.qmltypes - -Object 1.0 Object.qml -PlatformExtensions 1.0 PlatformExtensions.qml -singleton Utils 1.0 Utils.qml diff --git a/prototype_2016/third_party/fluid/core/qmldir_noplugin b/prototype_2016/third_party/fluid/core/qmldir_noplugin deleted file mode 100644 index c22216e..0000000 --- a/prototype_2016/third_party/fluid/core/qmldir_noplugin +++ /dev/null @@ -1,5 +0,0 @@ -module Fluid.Core -typeinfo plugins.qmltypes - -Object 1.0 Object.qml -singleton Utils 1.0 Utils.qml diff --git a/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.cpp b/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.cpp deleted file mode 100644 index 6917155..0000000 --- a/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.cpp +++ /dev/null @@ -1,283 +0,0 @@ -/**************************************************************************** - * This file is part of Fluid. - * - * Copyright (C) 2016 Pierre-Yves Siret - * - * $BEGIN_LICENSE:MIT$ - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * $END_LICENSE$ - ***************************************************************************/ - -#include "qqmlsortfilterproxymodel.h" -#include - -QQmlSortFilterProxyModel::QQmlSortFilterProxyModel(QObject *parent) - : QSortFilterProxyModel(parent) - , m_filterExpression(0) - , m_compareExpression(0) -{ - connect(this, &QAbstractProxyModel::sourceModelChanged, this, - &QQmlSortFilterProxyModel::updateRoles); - connect(this, &QAbstractItemModel::modelReset, this, &QQmlSortFilterProxyModel::updateRoles); - connect(this, &QAbstractItemModel::rowsInserted, this, &QQmlSortFilterProxyModel::countChanged); - connect(this, &QAbstractItemModel::rowsRemoved, this, &QQmlSortFilterProxyModel::countChanged); - connect(this, &QAbstractItemModel::modelReset, this, &QQmlSortFilterProxyModel::countChanged); - connect(this, &QAbstractItemModel::layoutChanged, this, - &QQmlSortFilterProxyModel::countChanged); - setDynamicSortFilter(true); -} - -int QQmlSortFilterProxyModel::count() const -{ - return rowCount(); -} - -const QString &QQmlSortFilterProxyModel::filterRoleName() const -{ - return m_filterRoleName; -} - -void QQmlSortFilterProxyModel::setFilterRoleName(const QString &filterRoleName) -{ - if (m_filterRoleName == filterRoleName) - return; - - m_filterRoleName = filterRoleName; - updateFilterRole(); - emit filterRoleNameChanged(); -} - -QString QQmlSortFilterProxyModel::filterPattern() const -{ - return filterRegExp().pattern(); -} - -void QQmlSortFilterProxyModel::setFilterPattern(const QString &filterPattern) -{ - QRegExp regExp = filterRegExp(); - if (regExp.pattern() == filterPattern) - return; - - regExp.setPattern(filterPattern); - QSortFilterProxyModel::setFilterRegExp(regExp); - emit filterPatternChanged(); -} - -QQmlSortFilterProxyModel::PatternSyntax QQmlSortFilterProxyModel::filterPatternSyntax() const -{ - return static_cast(filterRegExp().patternSyntax()); -} - -void QQmlSortFilterProxyModel::setFilterPatternSyntax( - QQmlSortFilterProxyModel::PatternSyntax patternSyntax) -{ - QRegExp regExp = filterRegExp(); - QRegExp::PatternSyntax patternSyntaxTmp = static_cast(patternSyntax); - if (regExp.patternSyntax() == patternSyntaxTmp) - return; - - regExp.setPatternSyntax(patternSyntaxTmp); - QSortFilterProxyModel::setFilterRegExp(regExp); - emit filterPatternSyntaxChanged(); -} - -const QVariant &QQmlSortFilterProxyModel::filterValue() const -{ - return m_filterValue; -} - -void QQmlSortFilterProxyModel::setFilterValue(const QVariant &filterValue) -{ - if (m_filterValue == filterValue) - return; - - m_filterValue = filterValue; - invalidateFilter(); - emit filterValueChanged(); -} - -const QQmlScriptString &QQmlSortFilterProxyModel::filterExpression() const -{ - return m_filterScriptString; -} - -void QQmlSortFilterProxyModel::setFilterExpression(const QQmlScriptString &filterScriptString) -{ - if (m_filterScriptString == filterScriptString) - return; - - m_filterScriptString = filterScriptString; - QQmlContext *context = new QQmlContext(qmlContext(this)); - - QVariantMap map; - Q_FOREACH (const QByteArray &roleName, roleNames().values()) - map.insert(roleName, QVariant()); - - context->setContextProperty("model", map); - context->setContextProperty("index", -1); - - delete (m_filterExpression); - m_filterExpression = new QQmlExpression(m_filterScriptString, context, 0, this); - connect(m_filterExpression, &QQmlExpression::valueChanged, this, - &QQmlSortFilterProxyModel::invalidateFilter); - m_filterExpression->setNotifyOnValueChanged(true); - m_filterExpression->evaluate(); - - emit filterExpressionChanged(); -} - -const QString &QQmlSortFilterProxyModel::sortRoleName() const -{ - return m_sortRoleName; -} - -void QQmlSortFilterProxyModel::setSortRoleName(const QString &sortRoleName) -{ - if (m_sortRoleName == sortRoleName) - return; - - m_sortRoleName = sortRoleName; - updateSortRole(); - emit sortRoleNameChanged(); -} - -void QQmlSortFilterProxyModel::setSortOrder(Qt::SortOrder sortOrder) -{ - if (!m_sortRoleName.isEmpty()) - sort(0, sortOrder); -} - -const QQmlScriptString &QQmlSortFilterProxyModel::sortExpression() const -{ - return m_compareScriptString; -} - -void QQmlSortFilterProxyModel::setSortExpression(const QQmlScriptString &compareScriptString) -{ - if (m_compareScriptString == compareScriptString) - return; - - m_compareScriptString = compareScriptString; - QQmlContext *context = new QQmlContext(qmlContext(this)); - - QVariantMap map; - Q_FOREACH (const QByteArray &roleName, roleNames().values()) - map.insert(roleName, QVariant()); - - context->setContextProperty("modelLeft", map); - context->setContextProperty("indexLeft", -1); - context->setContextProperty("modelRight", map); - context->setContextProperty("indexRight", -1); - - delete (m_compareExpression); - m_compareExpression = new QQmlExpression(m_compareScriptString, context, 0, this); - connect(m_compareExpression, &QQmlExpression::valueChanged, this, - &QQmlSortFilterProxyModel::invalidate); - m_compareExpression->setNotifyOnValueChanged(true); - m_compareExpression->evaluate(); - - emit sortExpressionChanged(); -} - -bool QQmlSortFilterProxyModel::filterAcceptsRow(int source_row, - const QModelIndex &source_parent) const -{ - QModelIndex modelIndex = sourceModel()->index(source_row, 0, source_parent); - bool valueAccepted = !m_filterValue.isValid() - || (m_filterValue == sourceModel()->data(modelIndex, filterRole())); - bool baseAcceptsRow = - valueAccepted && QSortFilterProxyModel::filterAcceptsRow(source_row, source_parent); - if (baseAcceptsRow && !m_filterScriptString.isEmpty()) { - QVariantMap map = modelDataMap(modelIndex); - - QQmlContext context(qmlContext(this)); - context.setContextProperty("model", map); - context.setContextProperty("index", source_row); - QQmlExpression expression(m_filterScriptString, &context, 0); - QVariant result = expression.evaluate(); - - if (!expression.hasError()) - return result.toBool(); - else - qWarning() << expression.error(); - } - return baseAcceptsRow; -} - -bool QQmlSortFilterProxyModel::lessThan(const QModelIndex &source_left, - const QModelIndex &source_right) const -{ - if (!m_compareScriptString.isEmpty()) { - QQmlContext context(qmlContext(this)); - context.setContextProperty("modelLeft", modelDataMap(source_left)); - context.setContextProperty("indexLeft", source_left.row()); - context.setContextProperty("modelRight", modelDataMap(source_right)); - context.setContextProperty("indexRight", source_right.row()); - - QQmlExpression expression(m_compareScriptString, &context, 0); - QVariant result = expression.evaluate(); - - if (!expression.hasError()) - return result.toBool(); - else - qWarning() << expression.error(); - } - return QSortFilterProxyModel::lessThan(source_left, source_right); -} - -void QQmlSortFilterProxyModel::invalidateFilter() -{ - QSortFilterProxyModel::invalidateFilter(); -} - -void QQmlSortFilterProxyModel::updateFilterRole() -{ - QList filterRoles = roleNames().keys(m_filterRoleName.toUtf8()); - if (!filterRoles.empty()) { - setFilterRole(filterRoles.first()); - } -} - -void QQmlSortFilterProxyModel::updateSortRole() -{ - QList sortRoles = roleNames().keys(m_sortRoleName.toUtf8()); - if (!sortRoles.empty()) { - setSortRole(sortRoles.first()); - sort(0, sortOrder()); - } -} - -void QQmlSortFilterProxyModel::updateRoles() -{ - updateFilterRole(); - updateSortRole(); -} - -QVariantMap QQmlSortFilterProxyModel::modelDataMap(const QModelIndex &modelIndex) const -{ - QVariantMap map; - QHash roles = roleNames(); - for (QHash::const_iterator it = roles.begin(); it != roles.end(); ++it) - map.insert(it.value(), sourceModel()->data(modelIndex, it.key())); - return map; -} - -#include "moc_qqmlsortfilterproxymodel.cpp" diff --git a/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.h b/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.h deleted file mode 100644 index d38fcb0..0000000 --- a/prototype_2016/third_party/fluid/core/qqmlsortfilterproxymodel.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - * This file is part of Fluid. - * - * Copyright (C) 2016 Pierre-Yves Siret - * - * $BEGIN_LICENSE:MIT$ - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * $END_LICENSE$ - ***************************************************************************/ - -#ifndef QQMLSORTFILTERPROXYMODEL_H -#define QQMLSORTFILTERPROXYMODEL_H - -#include -#include - -class QQmlSortFilterProxyModel : public QSortFilterProxyModel -{ - Q_OBJECT - Q_PROPERTY(int count READ count NOTIFY countChanged) - Q_PROPERTY(QString filterRoleName READ filterRoleName WRITE setFilterRoleName NOTIFY - filterRoleNameChanged) - Q_PROPERTY( - QString filterPattern READ filterPattern WRITE setFilterPattern NOTIFY filterPatternChanged) - Q_PROPERTY(PatternSyntax filterPatternSyntax READ filterPatternSyntax WRITE - setFilterPatternSyntax NOTIFY filterPatternSyntaxChanged) - Q_PROPERTY(QVariant filterValue READ filterValue WRITE setFilterValue NOTIFY filterValueChanged) - Q_PROPERTY(QQmlScriptString filterExpression READ filterExpression WRITE setFilterExpression - NOTIFY filterExpressionChanged) - - Q_PROPERTY( - QString sortRoleName READ sortRoleName WRITE setSortRoleName NOTIFY sortRoleNameChanged) - Q_PROPERTY(Qt::SortOrder sortOrder READ sortOrder WRITE setSortOrder) - Q_PROPERTY(QQmlScriptString sortExpression READ sortExpression WRITE setSortExpression NOTIFY - sortExpressionChanged) - -public: - enum PatternSyntax { - RegExp = QRegExp::RegExp, - Wildcard = QRegExp::Wildcard, - FixedString = QRegExp::FixedString, - RegExp2 = QRegExp::RegExp2, - WildcardUnix = QRegExp::WildcardUnix, - W3CXmlSchema11 = QRegExp::W3CXmlSchema11 - }; - Q_ENUM(PatternSyntax) - - QQmlSortFilterProxyModel(QObject *parent = 0); - - int count() const; - - const QString &filterRoleName() const; - void setFilterRoleName(const QString &filterRoleName); - - QString filterPattern() const; - void setFilterPattern(const QString &filterPattern); - - PatternSyntax filterPatternSyntax() const; - void setFilterPatternSyntax(PatternSyntax patternSyntax); - - const QVariant &filterValue() const; - void setFilterValue(const QVariant &filterValue); - - const QQmlScriptString &filterExpression() const; - void setFilterExpression(const QQmlScriptString &filterScriptString); - - const QString &sortRoleName() const; - void setSortRoleName(const QString &sortRoleName); - - void setSortOrder(Qt::SortOrder sortOrder); - - const QQmlScriptString &sortExpression() const; - void setSortExpression(const QQmlScriptString &compareScriptString); - -signals: - void countChanged(); - - void filterRoleNameChanged(); - void filterPatternSyntaxChanged(); - void filterPatternChanged(); - void filterValueChanged(); - void filterExpressionChanged(); - - void sortRoleNameChanged(); - void sortExpressionChanged(); - -protected: - bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; - bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; - -private slots: - void invalidateFilter(); - void updateFilterRole(); - void updateSortRole(); - void updateRoles(); - -private: - QVariantMap modelDataMap(const QModelIndex &modelIndex) const; - - QString m_filterRoleName; - QString m_sortRoleName; - - QQmlScriptString m_filterScriptString; - QQmlExpression *m_filterExpression; - - QQmlScriptString m_compareScriptString; - QQmlExpression *m_compareExpression; - QVariant m_filterValue; -}; - -#endif // QQMLSORTFILTERPROXYMODEL_H diff --git a/prototype_2016/third_party/fluid/core/standardpaths.cpp b/prototype_2016/third_party/fluid/core/standardpaths.cpp deleted file mode 100644 index d0cddbf..0000000 --- a/prototype_2016/third_party/fluid/core/standardpaths.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include - -#include "standardpaths.h" - -StandardPaths::StandardPaths(QObject *parent) - : QObject(parent) -{ -} - -QString StandardPaths::locateFile(StandardLocation type, const QString &fileName) -{ - QStandardPaths::StandardLocation qtype = static_cast(type); - return QStandardPaths::locate(qtype, fileName); -} - -QString StandardPaths::locateDirectory(StandardLocation type, const QString &dirName) -{ - QStandardPaths::StandardLocation qtype = static_cast(type); - return QStandardPaths::locate(qtype, dirName, QStandardPaths::LocateDirectory); -} - -#include "moc_standardpaths.cpp" diff --git a/prototype_2016/third_party/fluid/core/standardpaths.h b/prototype_2016/third_party/fluid/core/standardpaths.h deleted file mode 100644 index 6832d0b..0000000 --- a/prototype_2016/third_party/fluid/core/standardpaths.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#ifndef STANDARDPATHS_H -#define STANDARDPATHS_H - -#include - -class StandardPaths : public QObject -{ - Q_OBJECT -public: - enum StandardLocation { - DesktopLocation, - DocumentsLocation, - FontsLocation, - ApplicationsLocation, - MusicLocation, - MoviesLocation, - PicturesLocation, - TempLocation, - HomeLocation, - DataLocation, - CacheLocation, - GenericDataLocation, - RuntimeLocation, - ConfigLocation, - DownloadLocation, - GenericCacheLocation, - GenericConfigLocation - }; - Q_ENUM(StandardLocation) - - StandardPaths(QObject *parent = 0); - - Q_INVOKABLE QString locateFile(StandardLocation type, const QString &fileName); - Q_INVOKABLE QString locateDirectory(StandardLocation type, const QString &dirName); -}; - -#endif // STANDARDPATHS_H diff --git a/prototype_2016/third_party/fluid/demo/+material/StyledRectangle.qml b/prototype_2016/third_party/fluid/demo/+material/StyledRectangle.qml deleted file mode 100644 index b433b92..0000000 --- a/prototype_2016/third_party/fluid/demo/+material/StyledRectangle.qml +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls.Material 2.0 - -Rectangle { - color: Material.background - - Material.theme: index == 0 ? Material.Light : Material.Dark -} diff --git a/prototype_2016/third_party/fluid/demo/+universal/StyledRectangle.qml b/prototype_2016/third_party/fluid/demo/+universal/StyledRectangle.qml deleted file mode 100644 index 39bfe0d..0000000 --- a/prototype_2016/third_party/fluid/demo/+universal/StyledRectangle.qml +++ /dev/null @@ -1,22 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls.Universal 2.0 - -Rectangle { - color: Universal.background - - Universal.theme: index == 0 ? Universal.Light : Universal.Dark -} diff --git a/prototype_2016/third_party/fluid/demo/BasicComponents.qml b/prototype_2016/third_party/fluid/demo/BasicComponents.qml deleted file mode 100644 index 895b95b..0000000 --- a/prototype_2016/third_party/fluid/demo/BasicComponents.qml +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import Fluid.Controls 1.0 -import "Pages/Basic" - -Tab { - title: qsTr("Basic Components") - - Pane { - id: listPane - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: 200 - padding: 0 - z: 2 - - Material.background: "white" - Material.elevation: 1 - - Universal.background: Universal.accent - - ListView { - id: listView - anchors.fill: parent - currentIndex: 0 - model: ListModel { - ListElement { title: qsTr("Button"); source: "qrc:/Pages/Basic/ButtonPage.qml" } - ListElement { title: qsTr("CheckBox"); source: "qrc:/Pages/Basic/CheckBoxPage.qml" } - ListElement { title: qsTr("RadioButton"); source: "qrc:/Pages/Basic/RadioButtonPage.qml" } - ListElement { title: qsTr("Switch"); source: "qrc:/Pages/Basic/SwitchPage.qml" } - ListElement { title: qsTr("ProgressBar"); source: "qrc:/Pages/Basic/ProgressBarPage.qml" } - ListElement { title: qsTr("BusyIndicator"); source: "qrc:/Pages/Basic/BusyIndicatorPage.qml" } - ListElement { title: qsTr("Slider"); source: "qrc:/Pages/Basic/SliderPage.qml" } - } - header: Subheader { - text: qsTr("Demos") - } - delegate: ListItem { - text: model.title - highlighted: ListView.isCurrentItem - onClicked: { - listView.currentIndex = index - stackView.push(model.source) - } - } - - ScrollBar.vertical: ScrollBar {} - } - } - - StackView { - id: stackView - anchors { - left: listPane.right - top: parent.top - right: parent.right - bottom: parent.bottom - } - initialItem: ButtonPage {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/CMakeLists.txt b/prototype_2016/third_party/fluid/demo/CMakeLists.txt deleted file mode 100644 index a4f9ab6..0000000 --- a/prototype_2016/third_party/fluid/demo/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(SOURCES main.cpp demo.qrc) -file(GLOB_RECURSE QML_SOURCES - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.qml") - -add_executable(fluid-demo ${SOURCES} ${QML_SOURCES}) -target_link_libraries(fluid-demo Qt5::Gui Qt5::Qml Qt5::QuickControls2) - -install(TARGETS fluid-demo - BUNDLE DESTINATION . - RUNTIME DESTINATION ${BIN_INSTALL_DIR}) diff --git a/prototype_2016/third_party/fluid/demo/CompoundComponents.qml b/prototype_2016/third_party/fluid/demo/CompoundComponents.qml deleted file mode 100644 index 2cea4a5..0000000 --- a/prototype_2016/third_party/fluid/demo/CompoundComponents.qml +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import Fluid.Controls 1.0 -import "Pages/Compound" - -Tab { - title: qsTr("Compound Components") - - Pane { - id: listPane - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: 200 - padding: 0 - z: 2 - - Material.background: "white" - Material.elevation: 1 - - Universal.background: Universal.accent - - ListView { - id: listView - anchors.fill: parent - currentIndex: 0 - model: ListModel { - ListElement { title: qsTr("ListItem"); source: "qrc:/Pages/Compound/ListItemPage.qml" } - ListElement { title: qsTr("Card"); source: "qrc:/Pages/Compound/CardPage.qml" } - ListElement { title: qsTr("InfoBar"); source: "qrc:/Pages/Compound/InfoBarPage.qml" } - } - header: Subheader { - text: qsTr("Demos") - } - delegate: ListItem { - text: model.title - highlighted: ListView.isCurrentItem - onClicked: { - listView.currentIndex = index - stackView.push(model.source) - } - } - - ScrollBar.vertical: ScrollBar {} - } - } - - StackView { - id: stackView - anchors { - left: listPane.right - top: parent.top - right: parent.right - bottom: parent.bottom - } - initialItem: ListItemPage {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/MaterialComponents.qml b/prototype_2016/third_party/fluid/demo/MaterialComponents.qml deleted file mode 100644 index 2c72424..0000000 --- a/prototype_2016/third_party/fluid/demo/MaterialComponents.qml +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import Fluid.Controls 1.0 -import "Pages/Material" - -Tab { - title: qsTr("Material Components") - - Pane { - id: listPane - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: 200 - padding: 0 - z: 2 - - Material.background: "white" - Material.elevation: 1 - - Universal.background: Universal.accent - - ListView { - id: listView - anchors.fill: parent - currentIndex: 0 - model: ListModel { - ListElement { title: qsTr("ActionButton"); source: "qrc:/Pages/Material/ActionButtonPage.qml" } - } - header: Subheader { - text: qsTr("Demos") - } - delegate: ListItem { - text: model.title - highlighted: ListView.isCurrentItem - onClicked: { - listView.currentIndex = index - stackView.push(model.source) - } - } - - ScrollBar.vertical: ScrollBar {} - } - } - - StackView { - id: stackView - anchors { - left: listPane.right - top: parent.top - right: parent.right - bottom: parent.bottom - } - initialItem: ActionButtonPage {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/NavigationComponents.qml b/prototype_2016/third_party/fluid/demo/NavigationComponents.qml deleted file mode 100644 index 9958bf9..0000000 --- a/prototype_2016/third_party/fluid/demo/NavigationComponents.qml +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import Fluid.Controls 1.0 -import "Pages/Navigation" - -Tab { - title: qsTr("Nagitation Components") - - Pane { - id: listPane - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: 200 - padding: 0 - z: 2 - - Material.background: "white" - Material.elevation: 1 - - Universal.background: Universal.accent - - ListView { - id: listView - anchors.fill: parent - currentIndex: 0 - model: ListModel { - ListElement { title: qsTr("NavigationDrawer"); source: "qrc:/Pages/Navigation/NavDrawerPage.qml" } - } - header: Subheader { - text: qsTr("Demos") - } - delegate: ListItem { - text: model.title - highlighted: ListView.isCurrentItem - onClicked: { - listView.currentIndex = index - stackView.push(model.source) - } - } - - ScrollBar.vertical: ScrollBar {} - } - } - - StackView { - id: stackView - anchors { - left: listPane.right - top: parent.top - right: parent.right - bottom: parent.bottom - } - initialItem: NavDrawerPage {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/BusyIndicatorPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/BusyIndicatorPage.qml deleted file mode 100644 index 13c206f..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/BusyIndicatorPage.qml +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - - BusyIndicator { - anchors.centerIn: parent - running: true - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/ButtonPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/ButtonPage.qml deleted file mode 100644 index dbe22d6..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/ButtonPage.qml +++ /dev/null @@ -1,105 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 2 - rows: 4 - - // Row 1 - - TitleLabel { - text: qsTr("Enabled") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Disabled") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Button { - text: qsTr("Button") - } - - Button { - text: qsTr("Button") - enabled: false - } - - // Row 3 - - Button { - text: qsTr("Checked") - checkable: false - checked: true - } - - Button { - text: qsTr("Checked") - checkable: false - checked: true - enabled: false - } - - // Row 4 - - Button { - text: qsTr("Flat") - flat: true - } - - Button { - text: qsTr("Flat") - flat: true - enabled: false - } - - // Row 5 - - Button { - text: qsTr("Highlighted") - highlighted: true - } - - Button { - text: qsTr("Highlighted") - highlighted: true - enabled: false - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml deleted file mode 100644 index bf5c96a..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 3 - rows: 3 - - // Row 1 - - Item { - width: 1 - height: 1 - } - - TitleLabel { - text: qsTr("Enabled") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Disabled") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Label { - text: qsTr("On") - } - - CheckBox { - checked: true - text: qsTr("CheckBox") - } - - CheckBox { - checked: true - enabled: false - text: qsTr("CheckBox") - } - - // Row 3 - - Label { - text: qsTr("Off") - } - - CheckBox { - text: qsTr("CheckBox") - } - - CheckBox { - text: qsTr("CheckBox") - enabled: false - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/ProgressBarPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/ProgressBarPage.qml deleted file mode 100644 index 77267fe..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/ProgressBarPage.qml +++ /dev/null @@ -1,117 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 3 - - // Row 1 - - Item { - width: 1 - height: 1 - } - - TitleLabel { - text: qsTr("Determinate") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Indeterminate") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Label { - text: qsTr("Static") - } - - ProgressBar { - from: 0.0 - to: 1.0 - value: 0.5 - indeterminate: false - } - - ProgressBar { - from: 0.0 - to: 1.0 - value: 0.5 - indeterminate: true - } - - // Row 3 - - Label { - text: qsTr("Animated") - } - - ProgressBar { - from: 0.0 - to: 1.0 - indeterminate: false - - SequentialAnimation on value { - running: true - loops: NumberAnimation.Infinite - - NumberAnimation { - from: 0.0 - to: 1.0 - duration: 3000 - } - } - } - - ProgressBar { - from: 0.0 - to: 1.0 - indeterminate: true - - SequentialAnimation on value { - running: true - loops: NumberAnimation.Infinite - - NumberAnimation { - from: 0.0 - to: 1.0 - duration: 3000 - } - } - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/RadioButtonPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/RadioButtonPage.qml deleted file mode 100644 index 90c187f..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/RadioButtonPage.qml +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 3 - rows: 3 - - // Row 1 - - Item { - width: 1 - height: 1 - } - - TitleLabel { - text: qsTr("Enabled") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Disabled") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Label { - text: qsTr("On") - } - - RadioButton { - checked: true - text: qsTr("RadioButton") - } - - RadioButton { - checked: true - enabled: false - text: qsTr("RadioButton") - } - - // Row 3 - - Label { - text: qsTr("Off") - } - - RadioButton { - text: qsTr("RadioButton") - } - - RadioButton { - text: qsTr("RadioButton") - enabled: false - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/SliderPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/SliderPage.qml deleted file mode 100644 index 840e3b8..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/SliderPage.qml +++ /dev/null @@ -1,142 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 3 - rows: 3 - - // Row 1 - - Item { - width: 1 - height: 1 - } - - TitleLabel { - text: qsTr("Enabled") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Disabled") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Label { - text: qsTr("Horizontal / Single") - } - - Slider { - from: 0.0 - to: 1.0 - value: 0.5 - } - - Slider { - from: 0.0 - to: 1.0 - value: 0.5 - enabled: false - } - - // Row 3 - - Label { - text: qsTr("Horizontal / Range") - } - - RangeSlider { - from: 0.0 - to: 1.0 - first.value: 0.4 - second.value: 0.6 - } - - RangeSlider { - from: 0.0 - to: 1.0 - first.value: 0.4 - second.value: 0.6 - enabled: false - } - - // Row 4 - - Label { - text: qsTr("Vertical / Single") - } - - Slider { - from: 0.0 - to: 1.0 - value: 0.5 - orientation: Qt.Vertical - } - - Slider { - from: 0.0 - to: 1.0 - value: 0.5 - enabled: false - orientation: Qt.Vertical - } - - // Row 5 - - Label { - text: qsTr("Vertical / Range") - } - - RangeSlider { - from: 0.0 - to: 1.0 - first.value: 0.4 - second.value: 0.6 - orientation: Qt.Vertical - } - - RangeSlider { - from: 0.0 - to: 1.0 - first.value: 0.4 - second.value: 0.6 - enabled: false - orientation: Qt.Vertical - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/SwitchPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/SwitchPage.qml deleted file mode 100644 index abbd9ac..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Basic/SwitchPage.qml +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Controls 1.0 -import "../.." - -ColumnLayout { - Repeater { - model: 2 - - StyledRectangle { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumWidth: grid.width + 80 - Layout.minimumHeight: grid.height + 80 - - GridLayout { - id: grid - anchors.centerIn: parent - columns: 3 - rows: 3 - - // Row 1 - - Item { - width: 1 - height: 1 - } - - TitleLabel { - text: qsTr("Enabled") - - Layout.alignment: Qt.AlignHCenter - } - - TitleLabel { - text: qsTr("Disabled") - - Layout.alignment: Qt.AlignHCenter - } - - // Row 2 - - Label { - text: qsTr("On") - } - - Switch { - checked: true - text: qsTr("Switch") - } - - Switch { - checked: true - enabled: false - text: qsTr("Switch") - } - - // Row 3 - - Label { - text: qsTr("Off") - } - - Switch { - text: qsTr("Switch") - } - - Switch { - text: qsTr("Switch") - enabled: false - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Compound/CardPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Compound/CardPage.qml deleted file mode 100644 index e7be3e6..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Compound/CardPage.qml +++ /dev/null @@ -1,77 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 - -Page { - title: qsTr("Cards") - - Card { - anchors.centerIn: parent - width: 400 - height: 400 - - Image { - id: picture - anchors { - left: parent.left - top: parent.top - right: parent.right - } - height: 200 - source: "https://www.nps.gov/yose/planyourvisit/images/glacier-point-people-960web.jpg" - } - - Column { - id: column - anchors { - left: parent.left - top: picture.bottom - right: parent.right - margins: Units.smallSpacing * 2 - } - spacing: Units.smallSpacing * 2 - - TitleLabel { - text: qsTr("Yosemite National Park") - } - - BodyLabel { - text: qsTr("First protected in 1864, Yosemite National Park " + - "is best known for its waterfalls, but within its " + - "nearly 1,200 square miles, you can find deep " + - "valleys, grand meadows, ancient giant sequoias, " + - "a vast wilderness area, and much more.") - wrapMode: Text.WordWrap - width: parent.width - } - - Row { - spacing: Units.smallSpacing - - Button { - text: qsTr("Share") - flat: true - } - - Button { - text: qsTr("Explore") - flat: true - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Compound/InfoBarPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Compound/InfoBarPage.qml deleted file mode 100644 index f383549..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Compound/InfoBarPage.qml +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 - -Page { - title: qsTr("InfoBar") - - Button { - anchors.centerIn: parent - text: qsTr("Open") - onClicked: infoBar.open(qsTr("Message sent")) - } - - InfoBar { - id: infoBar - buttonText: qsTr("OK") - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Compound/ListItemPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Compound/ListItemPage.qml deleted file mode 100644 index b35f863..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Compound/ListItemPage.qml +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 -import "../.." - -Page { - ListView { - anchors.fill: parent - model: ListModel { - ListElement { title: "List Item 1"; source: "qrc:/Pages/Compound/SubPage.qml" } - ListElement { title: "List Item 2"; source: "qrc:/Pages/Compound/SubPage.qml" } - ListElement { title: "List Item 3"; source: "qrc:/Pages/Compound/SubPage.qml" } - ListElement { title: "List Item 4"; source: "qrc:/Pages/Compound/SubPage.qml" } - ListElement { title: "List Item 5"; source: "qrc:/Pages/Compound/SubPage.qml" } - } - header: Subheader { - text: "Header" - } - delegate: ListItem { - text: model.title - onClicked: pageStack.push(model.source) - } - - ScrollIndicator.vertical: ScrollIndicator {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Compound/SubPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Compound/SubPage.qml deleted file mode 100644 index 2367508..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Compound/SubPage.qml +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 - -Page { - title: "Sub page demo" - - actions: [ - Action { - iconName: "action/settings" - } - ] - - Label { - anchors.centerIn: parent - text: "Testing" - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Material/ActionButtonPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Material/ActionButtonPage.qml deleted file mode 100644 index ff0b801..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Material/ActionButtonPage.qml +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Material 1.0 -import "../.." - -Page { - title: qsTr("Action button") - - Repeater { - model: 2 - - StyledRectangle { - y: height * index - width: parent.width - height: parent.height / 2 - - Column { - anchors.centerIn: parent - - ActionButton { - iconName: "device/airplanemode_active" - } - - ActionButton { - iconName: "navigation/check" - - Material.elevation: 1 - } - - ActionButton { - iconName: "device/airplanemode_active" - - Material.background: Material.primaryColor - } - - ActionButton { - iconName: "navigation/check" - - Material.elevation: 1 - Material.background: Material.primaryColor - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Material/WavePage.qml b/prototype_2016/third_party/fluid/demo/Pages/Material/WavePage.qml deleted file mode 100644 index 85b969f..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Material/WavePage.qml +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Controls 1.0 -import "../.." - -Page { - title: qsTr("Wave transition") - - Wave { - id: wave - initialX: parent.width - size - initialY: parent.height - size - size: 48 - color: Material.accentColor - } - - Button { - anchors.centerIn: parent - text: qsTr("Toggle") - onClicked: { - if (wave.opened) - wave.close(parent.width - wave.size, parent.height - wave.size) - else - wave.open(0, 0) - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Navigation/NavDrawerPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Navigation/NavDrawerPage.qml deleted file mode 100644 index 2d81f2e..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Navigation/NavDrawerPage.qml +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 -import "../.." - -Page { - title: qsTr("Navigation drawer") - - Button { - anchors.centerIn: parent - text: qsTr("Open") - onClicked: navDrawer.open() - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Style/PalettePage.qml b/prototype_2016/third_party/fluid/demo/Pages/Style/PalettePage.qml deleted file mode 100644 index deecca5..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Style/PalettePage.qml +++ /dev/null @@ -1,121 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Layouts 1.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 -import "../.." - -GridLayout { - id: grid - - property color whiteColor: Qt.rgba(255, 255, 255, 1) - property color blackColor: Qt.rgba(0, 0, 0, 1) - - anchors.centerIn: parent - columns: width / 300 - width: parent.width - rowSpacing: Units.smallSpacing - columnSpacing: Units.smallSpacing - - Repeater { - model: ListModel { - ListElement { - paletteIndex: Material.Red - name: "Red" - } - ListElement { - paletteIndex: Material.Pink - name: "Pink" - } - ListElement { - paletteIndex: Material.Purple - name: "Purple" - } - ListElement { - paletteIndex: Material.DeepPurple - name: "DeepPurple" - } - ListElement { - paletteIndex: Material.Indigo - name: "Indigo" - } - ListElement { - paletteIndex: Material.Blue - name: "Blue" - } - ListElement { - paletteIndex: Material.LightBlue - name: "LightBlue" - } - ListElement { - paletteIndex: Material.Cyan - name: "Cyan" - } - ListElement { - paletteIndex: Material.Teal - name: "Teal" - } - ListElement { - paletteIndex: Material.Green - name: "Green" - } - ListElement { - paletteIndex: Material.LightGreen - name: "LightGreen" - } - ListElement { - paletteIndex: Material.Lime - name: "Lime" - } - ListElement { - paletteIndex: Material.Yellow - name: "Yellow" - } - ListElement { - paletteIndex: Material.Amber - name: "Amber" - } - ListElement { - paletteIndex: Material.Orange - name: "Orange" - } - ListElement { - paletteIndex: Material.DeepOrange - name: "DeepOrange" - } - ListElement { - paletteIndex: Material.Grey - name: "Grey" - } - ListElement { - paletteIndex: Material.BlueGrey - name: "BlueGrey" - } - ListElement { - paletteIndex: Material.Brown - name: "Brown" - } - } - - PaletteSwatch { - paletteIndex: model.paletteIndex - paletteName: model.name - paletteColor: Material.color(model.paletteIndex, Material.Shade500) - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Style/PaletteSwatch.qml b/prototype_2016/third_party/fluid/demo/Pages/Style/PaletteSwatch.qml deleted file mode 100644 index fb74886..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Style/PaletteSwatch.qml +++ /dev/null @@ -1,173 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 -import "../.." - -Column { - id: mainLayout - - property int paletteIndex - property string paletteName - property color paletteColor - - spacing: 0 - - Rectangle { - width: 300 - height: 80 - color: paletteColor - - Label { - anchors { - top: parent.top - left: parent.left - margins: Units.smallSpacing * 2 - } - font.bold: true - color: Utils.lightDark(parent.color, blackColor, whiteColor) - text: paletteName - } - } - - Column { - spacing: 0 - - Repeater { - model: ListModel { - ListElement { - shadeIndex: Material.Shade100 - name: "100" - } - ListElement { - shadeIndex: Material.Shade200 - name: "200" - } - ListElement { - shadeIndex: Material.Shade300 - name: "300" - } - ListElement { - shadeIndex: Material.Shade400 - name: "400" - } - ListElement { - shadeIndex: Material.Shade500 - name: "500" - } - ListElement { - shadeIndex: Material.Shade600 - name: "600" - } - ListElement { - shadeIndex: Material.Shade700 - name: "700" - } - ListElement { - shadeIndex: Material.Shade800 - name: "800" - } - ListElement { - shadeIndex: Material.Shade900 - name: "900" - } - } - - Rectangle { - width: 300 - height: 40 - color: Material.color(paletteIndex, model.shadeIndex) - - Label { - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - margins: Units.smallSpacing * 2 - } - font.bold: true - color: Utils.lightDark(parent.color, blackColor, whiteColor) - text: model.name - } - - Label { - anchors { - right: parent.right - verticalCenter: parent.verticalCenter - margins: Units.smallSpacing * 2 - } - font.bold: true - color: Utils.lightDark(parent.color, blackColor, whiteColor) - text: parent.color - } - } - } - } - - Column { - spacing: 0 - - Repeater { - model: ListModel { - ListElement { - shadeIndex: Material.ShadeA100 - name: "A100" - } - ListElement { - shadeIndex: Material.ShadeA200 - name: "A200" - } - ListElement { - shadeIndex: Material.ShadeA400 - name: "A400" - } - ListElement { - shadeIndex: Material.ShadeA700 - name: "A700" - } - } - - Rectangle { - width: 300 - height: 40 - color: Material.color(paletteIndex, model.shadeIndex) - - Label { - anchors { - left: parent.left - verticalCenter: parent.verticalCenter - margins: Units.smallSpacing * 2 - } - font.bold: true - color: Utils.lightDark(parent.color, blackColor, whiteColor) - text: model.name - } - - Label { - anchors { - right: parent.right - verticalCenter: parent.verticalCenter - margins: Units.smallSpacing * 2 - } - font.bold: true - color: Utils.lightDark(parent.color, blackColor, whiteColor) - text: parent.color - } - } - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Pages/Style/TypographyPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Style/TypographyPage.qml deleted file mode 100644 index 8cf47ff..0000000 --- a/prototype_2016/third_party/fluid/demo/Pages/Style/TypographyPage.qml +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Layouts 1.0 -import QtQuick.Controls 2.0 -import Fluid.Controls 1.0 -import "../.." - -Item { - ColumnLayout { - anchors.fill: parent - anchors.margins: Units.mediumSpacing - spacing: Units.smallSpacing - - DisplayLabel { - level: 4 - text: "Display 4" - } - - DisplayLabel { - level: 3 - text: "Display 3" - } - - DisplayLabel { - level: 2 - text: "Display 2" - } - - DisplayLabel { - level: 1 - text: "Display 1" - } - - HeadlineLabel { - text: "Headline" - } - - TitleLabel { - text: "Title" - } - - SubheadingLabel { - text: "Subheading" - } - - BodyLabel { - level: 2 - text: "Body 2" - } - - BodyLabel { - level: 1 - text: "Body 1" - } - - CaptionLabel { - text: "Caption" - } - - Label { - text: "Label" - } - - Item { - Layout.fillHeight: true - } - } -} diff --git a/prototype_2016/third_party/fluid/demo/Style.qml b/prototype_2016/third_party/fluid/demo/Style.qml deleted file mode 100644 index 8de8d3f..0000000 --- a/prototype_2016/third_party/fluid/demo/Style.qml +++ /dev/null @@ -1,75 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import Fluid.Controls 1.0 -import "Pages/Style" - -Tab { - title: qsTr("Style") - - Pane { - id: listPane - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - } - width: 200 - padding: 0 - z: 2 - - Material.background: "white" - Material.elevation: 1 - - Universal.background: Universal.accent - - ListView { - id: listView - anchors.fill: parent - currentIndex: 0 - model: ListModel { - ListElement { title: qsTr("Palette"); source: "qrc:/Pages/Style/PalettePage.qml" } - ListElement { title: qsTr("Typography"); source: "qrc:/Pages/Style/TypographyPage.qml" } - } - header: Subheader { - text: qsTr("Demos") - } - delegate: ListItem { - text: model.title - highlighted: ListView.isCurrentItem - onClicked: { - listView.currentIndex = index - stackView.push(model.source) - } - } - - ScrollBar.vertical: ScrollBar {} - } - } - - StackView { - id: stackView - anchors { - left: listPane.right - top: parent.top - right: parent.right - bottom: parent.bottom - } - initialItem: PalettePage {} - } -} diff --git a/prototype_2016/third_party/fluid/demo/StyledRectangle.qml b/prototype_2016/third_party/fluid/demo/StyledRectangle.qml deleted file mode 100644 index 9d3937c..0000000 --- a/prototype_2016/third_party/fluid/demo/StyledRectangle.qml +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -Rectangle { - // Default styled rectangle is red to spot errors - // related to how styles are loaded - color: "red" -} diff --git a/prototype_2016/third_party/fluid/demo/demo.pro b/prototype_2016/third_party/fluid/demo/demo.pro deleted file mode 100644 index 7f6c2ba..0000000 --- a/prototype_2016/third_party/fluid/demo/demo.pro +++ /dev/null @@ -1,9 +0,0 @@ -TEMPLATE = app - -QT += qml quick quickcontrols2 -CONFIG += c++11 - -SOURCES += main.cpp -RESOURCES += demo.qrc - -include(../fluid.pri) diff --git a/prototype_2016/third_party/fluid/demo/demo.qrc b/prototype_2016/third_party/fluid/demo/demo.qrc deleted file mode 100644 index b447c47..0000000 --- a/prototype_2016/third_party/fluid/demo/demo.qrc +++ /dev/null @@ -1,30 +0,0 @@ - - - main.qml - BasicComponents.qml - CompoundComponents.qml - MaterialComponents.qml - NavigationComponents.qml - Style.qml - StyledRectangle.qml - +material/StyledRectangle.qml - +universal/StyledRectangle.qml - Pages/Basic/BusyIndicatorPage.qml - Pages/Basic/ButtonPage.qml - Pages/Basic/CheckBoxPage.qml - Pages/Basic/ProgressBarPage.qml - Pages/Basic/RadioButtonPage.qml - Pages/Basic/SliderPage.qml - Pages/Basic/SwitchPage.qml - Pages/Compound/ListItemPage.qml - Pages/Compound/SubPage.qml - Pages/Compound/CardPage.qml - Pages/Compound/InfoBarPage.qml - Pages/Style/PalettePage.qml - Pages/Style/PaletteSwatch.qml - Pages/Style/TypographyPage.qml - Pages/Material/ActionButtonPage.qml - Pages/Material/WavePage.qml - Pages/Navigation/NavDrawerPage.qml - - diff --git a/prototype_2016/third_party/fluid/demo/main.cpp b/prototype_2016/third_party/fluid/demo/main.cpp deleted file mode 100644 index d6aaf9d..0000000 --- a/prototype_2016/third_party/fluid/demo/main.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app(argc, argv); - - if (QQuickStyle::name().isEmpty()) - QQuickStyle::setStyle("Material"); - - QQmlApplicationEngine engine; -#ifdef FLUID_LOCAL - engine.addImportPath(QStringLiteral("qrc:/")); -#endif - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - return app.exec(); -} diff --git a/prototype_2016/third_party/fluid/demo/main.qml b/prototype_2016/third_party/fluid/demo/main.qml deleted file mode 100644 index 44ae1a4..0000000 --- a/prototype_2016/third_party/fluid/demo/main.qml +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.6 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 -import QtQuick.Layouts 1.3 -import Fluid.Controls 1.0 - -FluidWindow { - id: window - - visible: true - - width: 1024 - height: 800 - - title: qsTr("Fluid Demo") - - Material.primary: Material.LightBlue - Material.accent: Material.Blue - - Universal.accent: Universal.Cobalt - - NavigationDrawer { - id: navDrawer - - //width: Math.min(window.width, window.height) / 3 * 2 - height: window.height - - topContent: [ - Rectangle { - color: Material.primary - height: 48 - - Label { - anchors.centerIn: parent - text: qsTr("Top Content") - } - - Layout.fillWidth: true - } - ] - - actions: [ - Action { - text: qsTr("Action 1") - onTriggered: console.log("action1 triggered") - }, - Action { - text: qsTr("Action 2") - onTriggered: console.log("action2 triggered") - }, - Action { - text: qsTr("Action 3") - onTriggered: console.log("action3 triggered") - } - ] - } - - initialPage: TabbedPage { - title: window.title - - BasicComponents {} - CompoundComponents {} - MaterialComponents {} - NavigationComponents {} - Style {} - } -} diff --git a/prototype_2016/third_party/fluid/doc/defaults.qdocconf b/prototype_2016/third_party/fluid/doc/defaults.qdocconf deleted file mode 100644 index 39c8491..0000000 --- a/prototype_2016/third_party/fluid/doc/defaults.qdocconf +++ /dev/null @@ -1,23 +0,0 @@ -include($QT_INSTALL_DOCS/global/macros.qdocconf) -include($QT_INSTALL_DOCS/global/qt-cpp-defines.qdocconf) -include($QT_INSTALL_DOCS/global/compat.qdocconf) -include($QT_INSTALL_DOCS/global/fileextensions.qdocconf) -include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) -include(html-footer-offline.qdocconf) - -outputdir = $FLUID_BUILD_DIR/doc/html - -dist.metadata.default.author = Fluid -dist.metadata.default.permissions = all -dist.metadata.default.publisher = Fluid -dist.metadata.default.copyryear = 2016 -dist.metadata.default.copyrholder = Fluid -dist.metadata.default.audience = programmer - -navigation.homepage = "Fluid $FLUID_VERSION" - -#sourcedirs += includes - -url = http://doc.liri.io/sdk - -buildversion = "Fluid $FLUID_VERSION Reference Documentation" diff --git a/prototype_2016/third_party/fluid/doc/fluid.qdocconf b/prototype_2016/third_party/fluid/doc/fluid.qdocconf deleted file mode 100644 index 1fee46d..0000000 --- a/prototype_2016/third_party/fluid/doc/fluid.qdocconf +++ /dev/null @@ -1,59 +0,0 @@ -include(defaults.qdocconf) - -project = Fluid -description = Fluid Reference Documentation -version = $FLUID_VERSION - -qhp.projects = Fluid - -qhp.Fluid.file = fluid.qhp -qhp.Fluid.namespace = io.liri.fluid.$FLUID_VERSION_TAG -qhp.Fluid.virtualFolder = fluid -qhp.Fluid.indexTitle = Fluid $FLUID_VERSION Reference Documentation -qhp.Fluid.indexRoot = - -qhp.Fluid.filterAttributes = fluid $FLUID_VERSION qtrefdoc -qhp.Fluid.customFilters.Qt.name = Fluid $FLUID_VERSION -qhp.Fluid.customFilters.Qt.filterAttributes = fluid $FLUID_VERSION - -qhp.Fluid.subprojects = fluidcore fluidcontrols fluideffects fluidmaterial -qhp.Fluid.subproject.fluidcore.title = Fluid Core -qhp.Fluid.subproject.fluidcore.indexTitle = Fluid Core QML Types -qhp.Fluid.subprojects.fluidcore.selectors = qmlclass -qhp.Fluid.subprojects.fluidcore.sortPages = true -qhp.Fluid.subproject.fluidcontrols.title = Fluid Controls -qhp.Fluid.subproject.fluidcontrols.indexTitle = Fluid Controls QML Types -qhp.Fluid.subprojects.fluidcontrols.selectors = qmlclass -qhp.Fluid.subprojects.fluidcontrols.sortPages = true -qhp.Fluid.subproject.fluideffects.title = Fluid Controls -qhp.Fluid.subproject.fluideffects.indexTitle = Fluid Effects QML Types -qhp.Fluid.subprojects.fluideffects.selectors = qmlclass -qhp.Fluid.subprojects.fluideffects.sortPages = true -qhp.Fluid.subproject.fluidmaterial.title = Fluid Controls -qhp.Fluid.subproject.fluidmaterial.indexTitle = Fluid Controls QML Types -qhp.Fluid.subprojects.fluidmaterial.selectors = qmlclass -qhp.Fluid.subprojects.fluidmaterial.sortPages = true - -indexes += $QT_INSTALL_DOCS/qtcore/qtcore.index -indexes += $QT_INSTALL_DOCS/qtgui/qtgui.index -indexes += $QT_INSTALL_DOCS/qtqml/qtqml.index -indexes += $QT_INSTALL_DOCS/qtquick/qtquick.index -indexes += $QT_INSTALL_DOCS/qtquickcontrols2/qtquickcontrols2.index - -depends += qtcore qtgui qtqml qtquick qtquickcontrols2 - -# Specify the install path under QT_INSTALL_EXAMPLES -# Note: paths passed to \example command must contain the parent directory, e.g. -# \example controls/tabs -#exampledirs += snippets - -#examplesinstallpath = fluid - -sourcedirs += ../core ../controls ../effects ../material src - -headerdirs += ../core ../controls ../effects ../material src - -imagedirs += images - -navigation.landingpage = "Fluid" -navigation.homepage = "Fluid Documentation" diff --git a/prototype_2016/third_party/fluid/doc/html-footer-offline.qdocconf b/prototype_2016/third_party/fluid/doc/html-footer-offline.qdocconf deleted file mode 100644 index 26f4557..0000000 --- a/prototype_2016/third_party/fluid/doc/html-footer-offline.qdocconf +++ /dev/null @@ -1,18 +0,0 @@ -HTML.footer = \ - " \n" \ - " \n" \ - " \n" \ - " \n" \ - "\n" \ - "
\n" \ - "

\n" \ - " © 2016 Liri.\n" \ - " Documentation contributions included herein are the copyrights of\n" \ - " their respective owners.
" \ - " The documentation provided herein is licensed under the terms of the" \ - " GNU Free Documentation" \ - " License version 1.3 as published by the Free Software Foundation.
" \ - " Qt and respective logos are trademarks of The Qt Company Ltd. " \ - " in Finland and/or other countries worldwide. All other trademarks are property\n" \ - " of their respective owners.

\n" \ - "
\n" \ diff --git a/prototype_2016/third_party/fluid/doc/src/fluidcontrols.qdoc b/prototype_2016/third_party/fluid/doc/src/fluidcontrols.qdoc deleted file mode 100644 index cde0ed5..0000000 --- a/prototype_2016/third_party/fluid/doc/src/fluidcontrols.qdoc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/*! - \qmlmodule Fluid.Controls 1.0 - \title Fluid Controls QML Types - \ingroup fluidcontrols - - \brief Provides additional controls to extend Qt Quick Controls 2. - - \section1 References - - Fluid Controls extends \l[QtQuickControls2]{Qt Quick Controls 2}. -*/ diff --git a/prototype_2016/third_party/fluid/doc/src/fluidcore.qdoc b/prototype_2016/third_party/fluid/doc/src/fluidcore.qdoc deleted file mode 100644 index 82294bd..0000000 --- a/prototype_2016/third_party/fluid/doc/src/fluidcore.qdoc +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/*! - \qmlmodule Fluid.Core 1.0 - \title Fluid Core QML Types - \ingroup fluidcore - - \brief Provides basic QML types for Qt applications. - - Basic QML types for Qt applications. - - The Fluid Core QML Types can be imported into your application - using the following import statement: - - \code - import Fluid.Core 1.0 - \endcode -*/ diff --git a/prototype_2016/third_party/fluid/doc/src/fluideffects.qdoc b/prototype_2016/third_party/fluid/doc/src/fluideffects.qdoc deleted file mode 100644 index 751be11..0000000 --- a/prototype_2016/third_party/fluid/doc/src/fluideffects.qdoc +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/*! - \qmlmodule Fluid.Effects 1.0 - \title Fluid Effects QML Types - \ingroup fluideffects - - \brief Provides effects for Qt applications. -*/ diff --git a/prototype_2016/third_party/fluid/doc/src/fluidmaterial.qdoc b/prototype_2016/third_party/fluid/doc/src/fluidmaterial.qdoc deleted file mode 100644 index 4423b7b..0000000 --- a/prototype_2016/third_party/fluid/doc/src/fluidmaterial.qdoc +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/*! - \qmlmodule Fluid.Material 1.0 - \title Fluid Material QML Types - \ingroup fluidmaterial - - \brief Provides QML types specific to Material Design. -*/ diff --git a/prototype_2016/third_party/fluid/doc/src/index.qdoc b/prototype_2016/third_party/fluid/doc/src/index.qdoc deleted file mode 100644 index 0d87196..0000000 --- a/prototype_2016/third_party/fluid/doc/src/index.qdoc +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -/*! - \page index.html - \keyword Fluid Reference Documentation - - A collection of cross-platform QtQuick components for building fluid and dynamic applications. - - \section1 QML Modules - - Fluid is comprised of several QML modules. - - \list - \li \l[FluidCore]{Fluid Core QML Types} - \li \l[FluidControls]{Fluid Controls QML Types} - \li \l[FluidEffects]{Fluid Effects QML Types} - \li \l[FluidMaterial]{Fluid Material QML Types} - \endlist -*/ diff --git a/prototype_2016/third_party/fluid/effects/BoxShadow.qml b/prototype_2016/third_party/fluid/effects/BoxShadow.qml deleted file mode 100644 index 5169a95..0000000 --- a/prototype_2016/third_party/fluid/effects/BoxShadow.qml +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 -import QtGraphicalEffects 1.0 - -/*! - \qmltype BoxShadow - \inqmlmodule Fluid.Effects - \ingroup fluideffects - - \brief A implementation of CSS's box-shadow. - - A implementation of CSS's box-shadow, used by ElevationEffect for a Material Design - elevation shadow effect. -*/ -RectangularGlow { - // The 4 properties from CSS box-shadow, plus the inherited color property - property int offsetX - property int offsetY - property int blurRadius - property int spreadRadius - - // The source item the shadow is being applied to, used for correctly - // calculating the corner radius - property Item source - - property bool fullWidth - property bool fullHeight - - x: (parent.width - width)/2 + offsetX - y: (parent.height - height)/2 + offsetY - - implicitWidth: source ? source.width : parent.width - implicitHeight: source ? source.height : parent.height - - width: implicitWidth + 2 * spreadRadius + (fullWidth ? 2 * cornerRadius : 0) - height: implicitHeight + 2 * spreadRadius + (fullHeight ? 2 * cornerRadius : 0) - glowRadius: blurRadius/2 - spread: 0.05 - cornerRadius: blurRadius + (source && source.radius || 0) -} diff --git a/prototype_2016/third_party/fluid/effects/CMakeLists.txt b/prototype_2016/third_party/fluid/effects/CMakeLists.txt deleted file mode 100644 index 86ab09d..0000000 --- a/prototype_2016/third_party/fluid/effects/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(FILES - plugins.qmltypes - qmldir - BoxShadow.qml - CircleMask.qml - Vignette.qml -) - -install(FILES ${FILES} - DESTINATION ${QML_INSTALL_DIR}/Fluid/Effects) diff --git a/prototype_2016/third_party/fluid/effects/CircleMask.qml b/prototype_2016/third_party/fluid/effects/CircleMask.qml deleted file mode 100644 index 03091a4..0000000 --- a/prototype_2016/third_party/fluid/effects/CircleMask.qml +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtGraphicalEffects 1.0 - -/*! - \qmltype CircleMask - \inqmlmodule Fluid.Effects - \ingroup fluideffects - - \brief Circular mask. -*/ -Item { - id: item - - property alias source: mask.source - - Rectangle { - id: circleMask - - width: parent.width - height: parent.height - - smooth: true - visible: false - - radius: Math.max(width/2, height/2) - } - - OpacityMask { - id: mask - - width: parent.width - height: parent.height - - maskSource: circleMask - } -} diff --git a/prototype_2016/third_party/fluid/effects/Vignette.qml b/prototype_2016/third_party/fluid/effects/Vignette.qml deleted file mode 100644 index d01174e..0000000 --- a/prototype_2016/third_party/fluid/effects/Vignette.qml +++ /dev/null @@ -1,77 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.0 - -/*! - \qmltype Vignette - \inqmlmodule Fluid.Effects - \ingroup fluideffects - - \brief Vignette effect. -*/ -Item { - id: root - - /*! - This property defines the source item that is going to be used as source - for the generated effect. - */ - property variant source - - /*! - This property defines the vignette radius. - */ - property alias radius: effect.radius - - /*! - This property defines how much brightness will be used. - */ - property alias brightness: effect.brightness - - ShaderEffect { - id: effect - anchors.fill: parent - - property variant source: ShaderEffectSource { - sourceItem: root.source - sourceRect: Qt.rect(0, 0, 0, 0) - hideSource: false - smooth: true - visible: false - } - - property real radius: 16 - property real brightness: 0.1 - - fragmentShader: " - varying highp vec2 qt_TexCoord0; - uniform highp float qt_Opacity; - uniform highp float radius; - uniform highp float brightness; - uniform lowp sampler2D source; - - void main() { - highp vec2 uv = qt_TexCoord0.xy; - highp vec2 coord = qt_TexCoord0 - 0.5; - lowp vec4 orig = texture2D(source, uv); - - highp float vignette = 1.0 - dot(coord, coord); - - lowp vec3 col = orig.rgb * clamp(pow(vignette, radius) + brightness, 0.0, 1.0); - - gl_FragColor = vec4(col, 1.0); - }" - } -} diff --git a/prototype_2016/third_party/fluid/effects/effects.pri b/prototype_2016/third_party/fluid/effects/effects.pri deleted file mode 100644 index afb9022..0000000 --- a/prototype_2016/third_party/fluid/effects/effects.pri +++ /dev/null @@ -1 +0,0 @@ -RESOURCES += $$PWD/effects.qrc diff --git a/prototype_2016/third_party/fluid/effects/effects.qrc b/prototype_2016/third_party/fluid/effects/effects.qrc deleted file mode 100644 index 1331e4f..0000000 --- a/prototype_2016/third_party/fluid/effects/effects.qrc +++ /dev/null @@ -1,9 +0,0 @@ - - - BoxShadow.qml - CircleMask.qml - plugins.qmltypes - qmldir - Vignette.qml - - diff --git a/prototype_2016/third_party/fluid/effects/plugins.qmltypes b/prototype_2016/third_party/fluid/effects/plugins.qmltypes deleted file mode 100644 index 85c0289..0000000 --- a/prototype_2016/third_party/fluid/effects/plugins.qmltypes +++ /dev/null @@ -1,15 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump-qt5 -nonrelocatable Fluid.Effects 1.0' - -Module { - dependencies: [ - "QtGraphicalEffects 1.0", - "QtQuick 2.4", - "QtQuick.Window 2.1" - ] -} diff --git a/prototype_2016/third_party/fluid/effects/qmldir b/prototype_2016/third_party/fluid/effects/qmldir deleted file mode 100644 index 225a435..0000000 --- a/prototype_2016/third_party/fluid/effects/qmldir +++ /dev/null @@ -1,6 +0,0 @@ -module Fluid.Effects -typeinfo plugins.qmltypes - -BoxShadow 1.0 BoxShadow.qml -CircleMask 1.0 CircleMask.qml -Vignette 1.0 Vignette.qml diff --git a/prototype_2016/third_party/fluid/fluid.pri b/prototype_2016/third_party/fluid/fluid.pri deleted file mode 100644 index af7e52a..0000000 --- a/prototype_2016/third_party/fluid/fluid.pri +++ /dev/null @@ -1,8 +0,0 @@ -DEFINES += FLUID_LOCAL -include(src/src.pri) -include(core/core.pri) -include(controls/controls.pri) -include(effects/effects.pri) -include(material/material.pri) - -RESOURCES += $$PWD/icons/icons.qrc diff --git a/prototype_2016/third_party/fluid/material/ActionButton.qml b/prototype_2016/third_party/fluid/material/ActionButton.qml deleted file mode 100644 index fa7c53e..0000000 --- a/prototype_2016/third_party/fluid/material/ActionButton.qml +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 -import QtGraphicalEffects 1.0 - -/*! - \qmltype ActionButton - \inqmlmodule Fluid.Material - - \brief A floating action button. - - An ActionButton is a floating action button that provides a primary action - on the current page. - */ -Button { - id: button - - /*! - The name of the icon to display in the action button, selected from the Material - Design icon collection by Google. - */ - property alias iconName: icon.name - - /*! - Floating action buttons come in two sizes: - - \list - \li \b {Default size} - for most use cases - \li \b {Mini size} - only used to create visual continuity with other screen elements - \endlist - */ - property bool isMiniSize: false - - padding: 0 - - width: 76 - height: 76 - - contentItem: Item { - implicitHeight: isMiniSize ? 40 : 56 - implicitWidth: implicitHeight - - Icon { - id: icon - - anchors.centerIn: parent - color: Utils.lightDark(button.Material.background, "black", "white") - size: 24 - } - } - - background: Rectangle { - implicitWidth: 64 - implicitHeight: 64 - - x: 6 - y: 6 - - width: parent.width - 12 - height: parent.height - 12 - - radius: width/2 - - color: button.Material.background - - RectangularGlow { - anchors.centerIn: parent - anchors.verticalCenterOffset: button.Material.elevation === 1 ? 1.5 : 1 - - width: parent.width - height: parent.height - - z: -1 - - glowRadius: button.Material.elevation === 1 ? 0.75 : 0.3 - opacity: button.Material.elevation === 1 ? 0.6 : 0.3 - spread: button.Material.elevation === 1 ? 0.7 : 0.85 - color: "black" - cornerRadius: height/2 - } - - Ripple { - anchors.fill: parent - control: button - - circular: true - } - } -} diff --git a/prototype_2016/third_party/fluid/material/CMakeLists.txt b/prototype_2016/third_party/fluid/material/CMakeLists.txt deleted file mode 100644 index 04be30a..0000000 --- a/prototype_2016/third_party/fluid/material/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -set(FLUID_FILES - plugins.qmltypes - qmldir - ActionButton.qml - ElevationEffect.qml - Ripple.qml - Wave.qml -) - -install(FILES ${FLUID_FILES} - DESTINATION ${QML_INSTALL_DIR}/Fluid/Material) diff --git a/prototype_2016/third_party/fluid/material/ElevationEffect.qml b/prototype_2016/third_party/fluid/material/ElevationEffect.qml deleted file mode 100644 index 7a36ca6..0000000 --- a/prototype_2016/third_party/fluid/material/ElevationEffect.qml +++ /dev/null @@ -1,251 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.6 -import Fluid.Effects 1.0 - -/*! - An effect for standard Material Design elevation shadows. Useful for using as \c layer.effect. - */ -Item { - id: effect - - /*! - The source the effect is applied to. - */ - property var source - - /*! - The elevation of the \l source Item. - */ - property int elevation: 0 - - /*! - Set to \c true if the \l source Item is the same width as its parent and the shadow - should be full width instead of rounding around the corner of the Item. - \sa fullHeight - */ - property bool fullWidth: false - - /*! - Set to \c true if the \l source Item is the same height as its parent and the shadow - should be full height instead of rounding around the corner of the Item. - \sa fullWidth - */ - property bool fullHeight: false - - /*! - \internal - The actual source Item the effect is applied to. - */ - readonly property Item sourceItem: source.sourceItem - - /* - * The following shadow values are taken from Angular Material - * - * The MIT License (MIT) - * - * Copyright (c) 2014-2016 Google, Inc. http://angularjs.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - /*! - \internal - The shadows to use for each possible elevation. There are three shadows that when combined - make up the elevation. - */ - readonly property var _shadows: [ - [{offset: 0, blur: 0, spread: 0}, - {offset: 0, blur: 0, spread: 0}, - {offset: 0, blur: 0, spread: 0}], - - [{offset: 1, blur: 3, spread: 0}, - {offset: 1, blur: 1, spread: 0}, - {offset: 2, blur: 1, spread: -1}], - - [{offset: 1, blur: 5, spread: 0}, - {offset: 2, blur: 2, spread: 0}, - {offset: 3, blur: 1, spread: -2}], - - [{offset: 1, blur: 8, spread: 0}, - {offset: 3, blur: 4, spread: 0}, - {offset: 3, blur: 3, spread: -2}], - - [{offset: 2, blur: 4, spread: -1}, - {offset: 4, blur: 5, spread: 0}, - {offset: 1, blur: 10, spread: 0}], - - [{offset: 3, blur: 5, spread: -1}, - {offset: 5, blur: 8, spread: 0}, - {offset: 1, blur: 14, spread: 0}], - - [{offset: 3, blur: 5, spread: -1}, - {offset: 6, blur: 10, spread: 0}, - {offset: 1, blur: 18, spread: 0}], - - [{offset: 4, blur: 5, spread: -2}, - {offset: 7, blur: 10, spread: 1}, - {offset: 2, blur: 16, spread: 1}], - - [{offset: 5, blur: 5, spread: -3}, - {offset: 8, blur: 10, spread: 1}, - {offset: 3, blur: 14, spread: 2}], - - [{offset: 5, blur: 6, spread: -3}, - {offset: 9, blur: 12, spread: 1}, - {offset: 3, blur: 16, spread: 2}], - - [{offset: 6, blur: 6, spread: -3}, - {offset: 10, blur: 14, spread: 1}, - {offset: 4, blur: 18, spread: 3}], - - [{offset: 6, blur: 7, spread: -4}, - {offset: 11, blur: 15, spread: 1}, - {offset: 4, blur: 20, spread: 3}], - - [{offset: 7, blur: 8, spread: -4}, - {offset: 12, blur: 17, spread: 2}, - {offset: 5, blur: 22, spread: 4}], - - [{offset: 7, blur: 8, spread: -4}, - {offset: 13, blur: 19, spread: 2}, - {offset: 5, blur: 24, spread: 4}], - - [{offset: 7, blur: 9, spread: -4}, - {offset: 14, blur: 21, spread: 2}, - {offset: 5, blur: 26, spread: 4}], - - [{offset: 8, blur: 9, spread: -5}, - {offset: 15, blur: 22, spread: 2}, - {offset: 6, blur: 28, spread: 5}], - - [{offset: 8, blur: 10, spread: -5}, - {offset: 16, blur: 24, spread: 2}, - {offset: 6, blur: 30, spread: 5}], - - [{offset: 8, blur: 11, spread: -5}, - {offset: 17, blur: 26, spread: 2}, - {offset: 6, blur: 32, spread: 5}], - - [{offset: 9, blur: 11, spread: -5}, - {offset: 18, blur: 28, spread: 2}, - {offset: 7, blur: 34, spread: 6}], - - [{offset: 9, blur: 12, spread: -6}, - {offset: 19, blur: 29, spread: 2}, - {offset: 7, blur: 36, spread: 6}], - - [{offset: 10, blur: 13, spread: -6}, - {offset: 20, blur: 31, spread: 3}, - {offset: 8, blur: 38, spread: 7}], - - [{offset: 10, blur: 13, spread: -6}, - {offset: 21, blur: 33, spread: 3}, - {offset: 8, blur: 40, spread: 7}], - - [{offset: 10, blur: 14, spread: -6}, - {offset: 22, blur: 35, spread: 3}, - {offset: 8, blur: 42, spread: 7}], - - [{offset: 11, blur: 14, spread: -7}, - {offset: 23, blur: 36, spread: 3}, - {offset: 9, blur: 44, spread: 8}], - - [{offset: 11, blur: 15, spread: -7}, - {offset: 24, blur: 38, spread: 3}, - {offset: 9, blur: 46, spread: 8}] - ] - - /*! - \internal - The current shadow based on the elevation. - */ - readonly property var _shadow: _shadows[elevation] - - // Nest the shadows and source view in two items rendered as a layer - // so the shadow is not clipped by the bounds of the source view - Item { - property int margin: -100 - - x: margin - y: margin - width: parent.width - 2 * margin - height: parent.height - 2 * margin - - // By rendering as a layer, the shadow will never show through the source item, - // even when the source item's opacity is less than 1 - layer.enabled: true - - // The box shadows automatically pick up the size of the source Item and not - // the size of the parent, so we don't need to worry about the extra padding - // in the parent Item - BoxShadow { - offsetY: _shadow[0].offset - blurRadius: _shadow[0].blur - spreadRadius: _shadow[0].spread - color: Qt.rgba(0,0,0, 0.2) - - fullWidth: effect.fullWidth - fullHeight: effect.fullHeight - source: effect.sourceItem - } - - BoxShadow { - offsetY: _shadow[1].offset - blurRadius: _shadow[1].blur - spreadRadius: _shadow[1].spread - color: Qt.rgba(0,0,0, 0.14) - - fullWidth: effect.fullWidth - fullHeight: effect.fullHeight - source: effect.sourceItem - } - - BoxShadow { - offsetY: _shadow[2].offset - blurRadius: _shadow[2].blur - spreadRadius: _shadow[2].spread - color: Qt.rgba(0,0,0, 0.12) - - fullWidth: effect.fullWidth - fullHeight: effect.fullHeight - source: effect.sourceItem - } - - ShaderEffect { - property alias source: effect.source - - x: (parent.width - width)/2 - y: (parent.height - height)/2 - width: sourceItem.width - height: sourceItem.height - } - } -} diff --git a/prototype_2016/third_party/fluid/material/Ripple.qml b/prototype_2016/third_party/fluid/material/Ripple.qml deleted file mode 100644 index fff7482..0000000 --- a/prototype_2016/third_party/fluid/material/Ripple.qml +++ /dev/null @@ -1,290 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import Fluid.Core 1.0 -import Fluid.Effects 1.0 - -/*! - \qmltype Ripple - \inqmlmodule Fluid.UI 1.0 - \brief Represents a Material Design ripple ink animation used in various touchable components. - - This component is useful for including in Material Design-specific components, which should be implemented using the +material file selector. Eventually this should be upstreamed to QtQuick - Controls 2. - */ -MouseArea { - id: ripple - - /*! - The color of the ripple. Defaults to black with 12% opacity. - */ - property color color: Qt.rgba(0,0,0,0.12) - - /*! - Set to \c true if the ripple is used on a circular component, such as a button in an - action bar or a floating action button. - */ - property bool circular: false - - /*! - Set to \c true if the ripple should be centered regardless of where the mouse/touch - input came from. - */ - property bool centered: false - - /*! - Set to \c true if the component is focused and should display a focus ripple. - */ - property bool focused - - /*! - The color of the focus ripple. Also used to determine the color of the focus background - behind the ripple. - \sa focused - */ - property color focusColor: "transparent" - - /*! - The width of the focus ripple. - \sa focused - */ - property int focusWidth: width - 32 - - property Item control - - clip: true - hoverEnabled: Device.hoverEnabled - - Connections { - target: control - - onPressedChanged: { - if (!control.pressed) - __private.removeLastCircle() - } - } - - onPressed: { - __private.createTapCircle(mouse.x, mouse.y) - - if (control) - mouse.accepted = false - } - - onReleased: __private.removeLastCircle() - onCanceled: __private.removeLastCircle() - - QtObject { - id: __private - - property int startRadius: circular ? width/10 : width/6 - property int endRadius - property bool showFocus: true - - property Item lastCircle - - function createTapCircle(x, y) { - endRadius = centered ? width/2 : radius(x, y) + 5 - showFocus = false - - lastCircle = tapCircle.createObject(ripple, { - "circleX": centered ? width/2 : x, - "circleY": centered ? height/2 : y - }) - } - - function removeLastCircle() { - if (lastCircle) - lastCircle.removeCircle() - } - - function radius(x, y) { - var dist1 = Math.max(dist(x, y, 0, 0), dist(x, y, width, height)) - var dist2 = Math.max(dist(x, y, width, 0), dist(x, y, 0, height)) - - return Math.max(dist1, dist2) - } - - function dist(x1, y1, x2, y2) { - var distX = x2 - x1 - var distY = y2 - y1 - - return Math.sqrt(distX * distX + distY * distY) - } - } - - Rectangle { - id: focusBackground - objectName: "focusBackground" - - width: parent.width - height: parent.height - - color: Utils.isDarkColor(focusColor) && focusColor.a > 0 - ? Qt.rgba(0,0,0,0.2) : Qt.rgba(0,0,0,0.1) - - opacity: __private.showFocus && focused ? 1 : 0 - - Behavior on opacity { - NumberAnimation { duration: 500; easing.type: Easing.InOutQuad } - } - } - - Rectangle { - id: focusCircle - objectName: "focusRipple" - - property bool focusedState - - x: (parent.width - width)/2 - y: (parent.height - height)/2 - - width: focused - ? focusedState ? focusWidth - : Math.min(parent.width - 8, focusWidth + 12) - : parent.width/5 - height: width - - radius: width/2 - - opacity: __private.showFocus && focused ? 1 : 0 - - color: focusColor.a === 0 ? Qt.rgba(1,1,1,0.4) : focusColor - - Behavior on opacity { - NumberAnimation { duration: 500; easing.type: Easing.InOutQuad } - } - - Behavior on width { - NumberAnimation { duration: focusTimer.interval; } - } - - Timer { - id: focusTimer - running: focused - repeat: true - interval: 800 - - onTriggered: focusCircle.focusedState = !focusCircle.focusedState - } - } - - Component { - id: tapCircle - - Item { - id: circleItem - objectName: "tapRipple" - - property bool done - - property real circleX - property real circleY - - property bool closed - - width: parent.width - height: parent.height - - function removeCircle() { - done = true - - if (fillSizeAnimation.running) { - fillOpacityAnimation.stop() - closeAnimation.start() - - circleItem.destroy(500); - } else { - __private.showFocus = true - fadeAnimation.start(); - - circleItem.destroy(300); - } - } - - Item { - id: circleParent - - width: parent.width - height: parent.height - - visible: !circular - - Rectangle { - id: circleRectangle - - x: circleItem.circleX - radius - y: circleItem.circleY - radius - - width: radius * 2 - height: radius * 2 - - opacity: 0 - color: ripple.color - - NumberAnimation { - id: fillSizeAnimation - running: true - - target: circleRectangle; property: "radius"; duration: 500; - from: __private.startRadius; to: __private.endRadius; - easing.type: Easing.InOutQuad - - onStopped: { - if (done) - __private.showFocus = true - } - } - - NumberAnimation { - id: fillOpacityAnimation - running: true - - target: circleRectangle; property: "opacity"; duration: 300; - from: 0; to: 1; easing.type: Easing.InOutQuad - } - - NumberAnimation { - id: fadeAnimation - - target: circleRectangle; property: "opacity"; duration: 300; - from: 1; to: 0; easing.type: Easing.InOutQuad - } - - SequentialAnimation { - id: closeAnimation - - NumberAnimation { - target: circleRectangle; property: "opacity"; duration: 250; - to: 1; easing.type: Easing.InOutQuad - } - - NumberAnimation { - target: circleRectangle; property: "opacity"; duration: 250; - from: 1; to: 0; easing.type: Easing.InOutQuad - } - } - } - } - - CircleMask { - anchors.fill: parent - source: circleParent - visible: circular - } - } - } -} diff --git a/prototype_2016/third_party/fluid/material/Wave.qml b/prototype_2016/third_party/fluid/material/Wave.qml deleted file mode 100644 index 2e426d2..0000000 --- a/prototype_2016/third_party/fluid/material/Wave.qml +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * Copyright (C) 2014 Bogdan Cuza - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 - -/*! - \qmltype Wave - \inqmlmodule Fluid.Material 1.0 - \brief Provides a wave animation for transitioning between views of content. - */ -Rectangle { - id: wave - - property bool opened - property real size - property real initialX - property real initialY - property real abstractWidth: parent.width - property real abstractHeight: parent.height - property real diameter: 2 * Math.sqrt(Math.pow(Math.max(initialX, abstractWidth - initialX), 2) - + Math.pow(Math.max(initialY, abstractHeight - initialY), 2)) - - signal finished(bool opened) - - function open(x, y) { - wave.initialX = x || parent.width/2; - wave.initialY = y || parent.height/2; - wave.opened = true; - } - - function close(x, y) { - wave.initialX = x || parent.width/2; - wave.initialY = y || parent.height/2; - wave.opened = false; - } - - width: size - height: size - radius: size/2 - x: initialX - size/2 - y: initialY - size/2 - - states: State { - name: "opened" - when: wave.opened - - PropertyChanges { - target: wave - size: wave.diameter - } - } - - transitions: Transition { - from: "" - to: "opened" - reversible: true - - SequentialAnimation { - NumberAnimation { - property: "size" - easing.type: Easing.OutCubic - } - ScriptAction { - script: wave.finished(wave.opened) - } - } - } -} diff --git a/prototype_2016/third_party/fluid/material/material.pri b/prototype_2016/third_party/fluid/material/material.pri deleted file mode 100644 index 6016f5f..0000000 --- a/prototype_2016/third_party/fluid/material/material.pri +++ /dev/null @@ -1,2 +0,0 @@ -RESOURCES += \ - $$PWD/material.qrc diff --git a/prototype_2016/third_party/fluid/material/material.qrc b/prototype_2016/third_party/fluid/material/material.qrc deleted file mode 100644 index 7ea8ecb..0000000 --- a/prototype_2016/third_party/fluid/material/material.qrc +++ /dev/null @@ -1,10 +0,0 @@ - - - ActionButton.qml - ElevationEffect.qml - plugins.qmltypes - qmldir - Ripple.qml - Wave.qml - - diff --git a/prototype_2016/third_party/fluid/material/plugins.qmltypes b/prototype_2016/third_party/fluid/material/plugins.qmltypes deleted file mode 100644 index 238ccfe..0000000 --- a/prototype_2016/third_party/fluid/material/plugins.qmltypes +++ /dev/null @@ -1,569 +0,0 @@ -import QtQuick.tooling 1.2 - -// This file describes the plugin-supplied types contained in the library. -// It is used for QML tooling purposes only. -// -// This file was auto-generated by: -// 'qmlplugindump-qt5 -nonrelocatable Fluid.Material 1.0' - -Module { - dependencies: [ - "Fluid.Controls 1.0", - "Fluid.Core 1.0", - "Fluid.Effects 1.0", - "QtGraphicalEffects 1.0", - "QtQml 2.2", - "QtQuick 2.7", - "QtQuick.Controls 2.0", - "QtQuick.Controls.Material 2.0", - "QtQuick.Controls.Material.impl 2.0", - "QtQuick.Controls.Universal 2.0", - "QtQuick.Controls.Universal.impl 2.0", - "QtQuick.Controls.impl 2.0", - "QtQuick.Layouts 1.1", - "QtQuick.Templates 2.0", - "QtQuick.Window 2.2" - ] - Component { - prototype: "QQuickApplicationWindow" - name: "QtQuick.Controls/ApplicationWindow 2.0" - exports: ["QtQuick.Controls/ApplicationWindow 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/BoxShadow 2.0" - exports: ["QtQuick.Controls.Material.impl/BoxShadow 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "offsetX"; type: "int" } - Property { name: "offsetY"; type: "int" } - Property { name: "blurRadius"; type: "int" } - Property { name: "spreadRadius"; type: "int" } - Property { name: "source"; type: "QQuickItem"; isPointer: true } - Property { name: "fullWidth"; type: "bool" } - Property { name: "fullHeight"; type: "bool" } - Property { name: "glowRadius"; type: "double" } - Property { name: "spread"; type: "double" } - Property { name: "color"; type: "QColor" } - Property { name: "cornerRadius"; type: "double" } - Property { name: "cached"; type: "bool" } - } - Component { - prototype: "QQuickBusyIndicator" - name: "QtQuick.Controls/BusyIndicator 2.0" - exports: ["QtQuick.Controls/BusyIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickButton" - name: "QtQuick.Controls/Button 2.0" - exports: ["QtQuick.Controls/Button 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickCheckBox" - name: "QtQuick.Controls/CheckBox 2.0" - exports: ["QtQuick.Controls/CheckBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickCheckDelegate" - name: "QtQuick.Controls/CheckDelegate 2.0" - exports: ["QtQuick.Controls/CheckDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Material.impl/CheckIndicator 2.0" - exports: ["QtQuick.Controls.Material.impl/CheckIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.impl/CheckIndicator 2.0" - exports: ["QtQuick.Controls.impl/CheckIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickComboBox" - name: "QtQuick.Controls/ComboBox 2.0" - exports: ["QtQuick.Controls/ComboBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickDial" - name: "QtQuick.Controls/Dial 2.0" - exports: ["QtQuick.Controls/Dial 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickDrawer" - name: "QtQuick.Controls/Drawer 2.0" - exports: ["QtQuick.Controls/Drawer 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/ElevationEffect 2.0" - exports: ["QtQuick.Controls.Material.impl/ElevationEffect 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "source"; type: "QVariant" } - Property { name: "elevation"; type: "int" } - Property { name: "fullWidth"; type: "bool" } - Property { name: "fullHeight"; type: "bool" } - Property { name: "sourceItem"; type: "QQuickItem"; isReadonly: true; isPointer: true } - Property { name: "_shadows"; type: "QVariant"; isReadonly: true } - Property { name: "_shadow"; type: "QVariant"; isReadonly: true } - } - Component { - prototype: "QObject" - name: "FluidStyle 1.0" - exports: ["FluidStyle 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - Property { name: "iconColorLight"; type: "QColor"; isReadonly: true } - Property { name: "iconColorDark"; type: "QColor"; isReadonly: true } - Property { name: "display4Font"; type: "QFont"; isReadonly: true } - Property { name: "display3Font"; type: "QFont"; isReadonly: true } - Property { name: "display2Font"; type: "QFont"; isReadonly: true } - Property { name: "display1Font"; type: "QFont"; isReadonly: true } - Property { name: "headlineFont"; type: "QFont"; isReadonly: true } - Property { name: "titleFont"; type: "QFont"; isReadonly: true } - Property { name: "subheadingFont"; type: "QFont"; isReadonly: true } - Property { name: "body2Font"; type: "QFont"; isReadonly: true } - Property { name: "body1Font"; type: "QFont"; isReadonly: true } - Property { name: "captionFont"; type: "QFont"; isReadonly: true } - Property { name: "buttonFont"; type: "QFont"; isReadonly: true } - Property { name: "subheaderFont"; type: "QFont"; isReadonly: true } - Property { name: "dialogFont"; type: "QFont"; isReadonly: true } - } - Component { - prototype: "QQuickFrame" - name: "QtQuick.Controls/Frame 2.0" - exports: ["QtQuick.Controls/Frame 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickGroupBox" - name: "QtQuick.Controls/GroupBox 2.0" - exports: ["QtQuick.Controls/GroupBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickItemDelegate" - name: "QtQuick.Controls/ItemDelegate 2.0" - exports: ["QtQuick.Controls/ItemDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickLabel" - name: "QtQuick.Controls/Label 2.0" - exports: ["QtQuick.Controls/Label 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickMenu" - name: "QtQuick.Controls/Menu 2.0" - exports: ["QtQuick.Controls/Menu 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickMenuItem" - name: "QtQuick.Controls/MenuItem 2.0" - exports: ["QtQuick.Controls/MenuItem 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickPage" - name: "QtQuick.Controls/Page 2.0" - exports: ["QtQuick.Controls/Page 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickPageIndicator" - name: "QtQuick.Controls/PageIndicator 2.0" - exports: ["QtQuick.Controls/PageIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickPane" - name: "QtQuick.Controls/Pane 2.0" - exports: ["QtQuick.Controls/Pane 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickPopup" - name: "QtQuick.Controls/Popup 2.0" - exports: ["QtQuick.Controls/Popup 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickProgressBar" - name: "QtQuick.Controls/ProgressBar 2.0" - exports: ["QtQuick.Controls/ProgressBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRadioButton" - name: "QtQuick.Controls/RadioButton 2.0" - exports: ["QtQuick.Controls/RadioButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRadioDelegate" - name: "QtQuick.Controls/RadioDelegate 2.0" - exports: ["QtQuick.Controls/RadioDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.impl/RadioIndicator 2.0" - exports: ["QtQuick.Controls.impl/RadioIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Universal.impl/RadioIndicator 2.0" - exports: ["QtQuick.Controls.Universal.impl/RadioIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QVariant" } - } - Component { - prototype: "QQuickRangeSlider" - name: "QtQuick.Controls/RangeSlider 2.0" - exports: ["QtQuick.Controls/RangeSlider 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Material.impl/Ripple 2.0" - exports: ["QtQuick.Controls.Material.impl/Ripple 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - Property { name: "colored"; type: "bool" } - } - Component { - prototype: "QQuickScrollBar" - name: "QtQuick.Controls/ScrollBar 2.0" - exports: ["QtQuick.Controls/ScrollBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickScrollIndicator" - name: "QtQuick.Controls/ScrollIndicator 2.0" - exports: ["QtQuick.Controls/ScrollIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSlider" - name: "QtQuick.Controls/Slider 2.0" - exports: ["QtQuick.Controls/Slider 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/SliderHandle 2.0" - exports: ["QtQuick.Controls.Material.impl/SliderHandle 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "value"; type: "double" } - Property { name: "handleHasFocus"; type: "bool" } - Property { name: "handlePressed"; type: "bool" } - Property { name: "initialSize"; type: "int"; isReadonly: true } - Property { name: "horizontal"; type: "bool"; isReadonly: true } - Property { name: "control"; type: "QVariant"; isReadonly: true } - } - Component { - prototype: "QQuickSpinBox" - name: "QtQuick.Controls/SpinBox 2.0" - exports: ["QtQuick.Controls/SpinBox 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickStackView" - name: "QtQuick.Controls/StackView 2.0" - exports: ["QtQuick.Controls/StackView 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwipeDelegate" - name: "QtQuick.Controls/SwipeDelegate 2.0" - exports: ["QtQuick.Controls/SwipeDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwipeView" - name: "QtQuick.Controls/SwipeView 2.0" - exports: ["QtQuick.Controls/SwipeView 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickSwitch" - name: "QtQuick.Controls/Switch 2.0" - exports: ["QtQuick.Controls/Switch 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickSwitchDelegate" - name: "QtQuick.Controls/SwitchDelegate 2.0" - exports: ["QtQuick.Controls/SwitchDelegate 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickRectangle" - name: "QtQuick.Controls.Universal.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.Universal.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickItem" - name: "QtQuick.Controls.Material.impl/SwitchIndicator 2.0" - exports: ["QtQuick.Controls.Material.impl/SwitchIndicator 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - Property { name: "control"; type: "QQuickItem"; isPointer: true } - } - Component { - prototype: "QQuickTabBar" - name: "QtQuick.Controls/TabBar 2.0" - exports: ["QtQuick.Controls/TabBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickTabButton" - name: "QtQuick.Controls/TabButton 2.0" - exports: ["QtQuick.Controls/TabButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickTextArea" - name: "QtQuick.Controls/TextArea 2.0" - exports: ["QtQuick.Controls/TextArea 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickTextField" - name: "QtQuick.Controls/TextField 2.0" - exports: ["QtQuick.Controls/TextField 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickToolBar" - name: "QtQuick.Controls/ToolBar 2.0" - exports: ["QtQuick.Controls/ToolBar 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickToolButton" - name: "QtQuick.Controls/ToolButton 2.0" - exports: ["QtQuick.Controls/ToolButton 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickToolTip" - name: "QtQuick.Controls/ToolTip 2.0" - exports: ["QtQuick.Controls/ToolTip 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "contentData" - } - Component { - prototype: "QQuickTumbler" - name: "QtQuick.Controls/Tumbler 2.0" - exports: ["QtQuick.Controls/Tumbler 2.0"] - exportMetaObjectRevisions: [0] - isComposite: true - defaultProperty: "data" - } - Component { - prototype: "QQuickItem" - name: "Units 1.0" - exports: ["Units 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - defaultProperty: "data" - Property { name: "gridUnit"; type: "int"; isReadonly: true } - Property { name: "smallSpacing"; type: "double"; isReadonly: true } - Property { name: "mediumSpacing"; type: "double"; isReadonly: true } - Property { name: "largeSpacing"; type: "double"; isReadonly: true } - Property { name: "shortDuration"; type: "int"; isReadonly: true } - Property { name: "mediumDuration"; type: "int"; isReadonly: true } - Property { name: "longDuration"; type: "int"; isReadonly: true } - Property { name: "iconSizes"; type: "QObject"; isReadonly: true; isPointer: true } - Method { - name: "gu" - type: "QVariant" - Parameter { name: "x"; type: "QVariant" } - } - Method { - name: "roundToIconSize" - type: "QVariant" - Parameter { name: "x"; type: "QVariant" } - } - } - Component { - prototype: "QObject" - name: "Utils 1.0" - exports: ["Utils 1.0"] - exportMetaObjectRevisions: [0] - isComposite: true - isCreatable: false - isSingleton: true - Method { - name: "asColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "alpha" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - Parameter { name: "alpha"; type: "QVariant" } - } - Method { - name: "blendColors" - type: "QVariant" - Parameter { name: "color1"; type: "QVariant" } - Parameter { name: "color2"; type: "QVariant" } - Parameter { name: "a"; type: "QVariant" } - } - Method { - name: "luminance" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "lightDark" - type: "QVariant" - Parameter { name: "background"; type: "QVariant" } - Parameter { name: "lightColor"; type: "QVariant" } - Parameter { name: "darkColor"; type: "QVariant" } - } - Method { - name: "isDarkColor" - type: "QVariant" - Parameter { name: "color"; type: "QVariant" } - } - Method { - name: "getSourceForIconName" - type: "QVariant" - Parameter { name: "name"; type: "QVariant" } - } - Method { - name: "scale" - type: "QVariant" - Parameter { name: "percent"; type: "QVariant" } - Parameter { name: "start"; type: "QVariant" } - Parameter { name: "end"; type: "QVariant" } - } - } -} diff --git a/prototype_2016/third_party/fluid/material/qmldir b/prototype_2016/third_party/fluid/material/qmldir deleted file mode 100644 index 6aff2c1..0000000 --- a/prototype_2016/third_party/fluid/material/qmldir +++ /dev/null @@ -1,7 +0,0 @@ -module Fluid.Material -typeinfo plugins.qmltypes - -ActionButton 1.0 ActionButton.qml -ElevationEffect 1.0 ElevationEffect.qml -Ripple 1.0 Ripple.qml -Wave 1.0 Wave.qml diff --git a/prototype_2016/third_party/fluid/scripts/fetch_icons.sh b/prototype_2016/third_party/fluid/scripts/fetch_icons.sh deleted file mode 100755 index 9c452db..0000000 --- a/prototype_2016/third_party/fluid/scripts/fetch_icons.sh +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/bash - -GIT_DIR=material-design-icons -TARGET_DIR=icons -QRC_FILE=$TARGET_DIR/icons.qrc - -CATEGORIES=(action av communication device file image maps notification social toggle alert content editor hardware navigation) - -if [ -d $GIT_DIR ]; then - pushd $GIT_DIR; git pull; popd -else - git clone https://github.com/google/material-design-icons.git $GIT_DIR -fi - -mkdir -p $TARGET_DIR - -echo " - " > $QRC_FILE -for CATEGORY in ${CATEGORIES[*]}; do - if [ -d $TARGET_DIR/$CATEGORY ]; then - rm -r $TARGET_DIR/$CATEGORY - fi - - mkdir $TARGET_DIR/$CATEGORY - - ICONS=$(ls $GIT_DIR/$CATEGORY/svg/production/*48px*) - - - for FILE in $ICONS; do - ICON=$(basename $FILE) - NEW_NAME=$(echo $ICON | sed -E 's/ic_(.*)_48px.svg/\1.svg/') - cp $FILE $TARGET_DIR/$CATEGORY/$NEW_NAME - echo " $CATEGORY/$NEW_NAME" >> $QRC_FILE - done -done - -echo " - -" >> $QRC_FILE \ No newline at end of file diff --git a/prototype_2016/third_party/fluid/src/CMakeLists.txt b/prototype_2016/third_party/fluid/src/CMakeLists.txt deleted file mode 100644 index dacd2e0..0000000 --- a/prototype_2016/third_party/fluid/src/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -include(GenerateExportHeader) -include(CMakePackageConfigHelpers) -include(ECMSetupVersion) -include(ECMGenerateHeaders) - -ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX FLUID - VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/Fluid/fluid/fluidversion.h" - PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/FluidConfigVersion.cmake" - SOVERSION ${PROJECT_SOVERSION}) - -set(FLUID_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/Fluid") - -set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/Fluid") - -configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/FluidConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/FluidConfig.cmake" - INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}) - -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/FluidConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/FluidConfigVersion.cmake" - DESTINATION "${CMAKECONFIG_INSTALL_DIR}" - COMPONENT Devel) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Fluid/fluid/fluidversion.h - DESTINATION ${FLUID_INCLUDEDIR}/fluid COMPONENT Devel) - -################################### - -add_definitions(-DQT_NO_KEYWORDS) - -set(SOURCES - dateutils.cpp -) - -add_library(Fluid SHARED ${SOURCES}) - -target_link_libraries(Fluid - PUBLIC - Qt5::Core -) - -################################################## - -generate_export_header(Fluid EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/Fluid/fluid/fluid_export.h) - -target_include_directories(Fluid INTERFACE "$") - -set_target_properties(Fluid PROPERTIES - VERSION ${PROJECT_VERSION} - SOVERSION ${PROJECT_SOVERSION}) - -ecm_generate_headers(Fluid_CamelCase_HEADERS - HEADER_NAMES - DateUtils - REQUIRED_HEADERS - Fluid_HEADERS - PREFIX - Fluid - OUTPUT_DIR - ${CMAKE_CURRENT_BINARY_DIR}/Fluid -) -install(FILES ${Fluid_CamelCase_HEADERS} - DESTINATION ${FLUID_INCLUDEDIR}/Fluid - COMPONENT Devel) - -install(TARGETS Fluid EXPORT FluidTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) - -install( - FILES - ${CMAKE_CURRENT_BINARY_DIR}/Fluid/fluid/fluid_export.h - dateutils.h - DESTINATION - ${FLUID_INCLUDEDIR}/fluid - COMPONENT - Devel -) - -install(EXPORT FluidTargets - DESTINATION "${CMAKECONFIG_INSTALL_DIR}" - FILE FluidTargets.cmake NAMESPACE Fluid::) diff --git a/prototype_2016/third_party/fluid/src/FluidConfig.cmake.in b/prototype_2016/third_party/fluid/src/FluidConfig.cmake.in deleted file mode 100644 index 8cbfe85..0000000 --- a/prototype_2016/third_party/fluid/src/FluidConfig.cmake.in +++ /dev/null @@ -1,11 +0,0 @@ -@PACKAGE_INIT@ - -find_dependency(Qt5Core @REQUIRED_QT_VERSION@) -find_dependency(Qt5Gui @REQUIRED_QT_VERSION@) -find_dependency(Qt5Qml @REQUIRED_QT_VERSION@) -find_dependency(Qt5Quick @REQUIRED_QT_VERSION@) -find_dependency(Qt5QuickControls2 @REQUIRED_QT_VERSION@) - -set(FLUID_CMAKE_MODULES_DIR "${CMAKE_CURRENT_LIST_DIR}") - -include("${FLUID_CMAKE_MODULES_DIR}/FluidTargets.cmake") diff --git a/prototype_2016/third_party/fluid/src/dateutils.cpp b/prototype_2016/third_party/fluid/src/dateutils.cpp deleted file mode 100644 index 26981f5..0000000 --- a/prototype_2016/third_party/fluid/src/dateutils.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include "dateutils.h" - -using namespace Fluid; - -QString DateUtils::formatDuration(qlonglong duration, DurationFormat format, DurationType type) -{ - int hours = duration / (1000 * 60 * 60); - int minutes = duration / (1000 * 60) - 60 * hours; - int seconds = duration / 1000 - 60 * minutes - 60 * 60 * hours; - - QString string; - - if (type == Any || type == Seconds) { - if (format == Short) - string = QStringLiteral("%1").arg(seconds, 2, 10, QChar('0')); - else - string = QStringLiteral("%1s").arg(seconds); - } - - if (type == Seconds || type == Minutes || (type == Any && (minutes >= 1 || hours >= 1))) { - if (format == Short) { - if (string.length() > 0) - string = QStringLiteral("%1:%2").arg(minutes, 2, 10, QChar('0')).arg(string); - else - string = QStringLiteral("%1").arg(minutes, 2, 10, QChar('0')); - } else { - string = QStringLiteral("%1m %2").arg(minutes).arg(string); - } - } - - if (type == Seconds || type == Minutes || type == Hours || (type == Any && (hours >= 1))) { - if (format == Short) { - if (string.length() > 0) - string = QStringLiteral("%1:%2").arg(hours).arg(string); - else - string = QStringLiteral("%1").arg(hours); - } else { - string = QStringLiteral("%1h %2").arg(hours).arg(string); - } - } - - return string.trimmed(); -} - -QString DateUtils::friendlyTime(const QDateTime &time, bool standalone) -{ - QDateTime now = QDateTime::currentDateTime(); - qint64 minutes = qRound64(time.secsTo(now) / 60.0f); - if (minutes < 1) - return standalone ? tr("Now") : "now"; - else if (minutes == 1) - return tr("1 minute ago"); - else if (minutes < 60) - return tr("%1 minutes ago").arg(minutes); - qint64 hours = qRound64(minutes / 60.0f); - if (hours == 1) - return tr("1 hour ago"); - else if (hours < 24) - return tr("%1 hours ago").arg(hours); - qint64 days = qRound64(hours / 24.0f); - if (days == 1) - return tr("1 day ago"); - else if (days <= 10) - return tr("%1 days ago").arg(days); - QString string = time.toString(); - return standalone ? string : tr("on %1").arg(string); -} diff --git a/prototype_2016/third_party/fluid/src/dateutils.h b/prototype_2016/third_party/fluid/src/dateutils.h deleted file mode 100644 index 17eb234..0000000 --- a/prototype_2016/third_party/fluid/src/dateutils.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#pragma once - -#ifdef FLUID_LOCAL - #define FLUID_EXPORT -#else - #include -#endif -#include -#include - -namespace Fluid { - -class FLUID_EXPORT DateUtils : public QObject -{ - Q_OBJECT - -public: - enum DurationFormat { Long, Short }; - Q_ENUM(DurationFormat) - - enum DurationType { Seconds, Minutes, Hours, Any }; - Q_ENUM(DurationType) - - static QString formatDuration(qlonglong duration, DurationFormat format = Short, - DurationType type = Any); - static QString friendlyTime(const QDateTime &time, bool standalone); -}; - -} // namespace Fluid diff --git a/prototype_2016/third_party/fluid/src/src.pri b/prototype_2016/third_party/fluid/src/src.pri deleted file mode 100644 index 6b73833..0000000 --- a/prototype_2016/third_party/fluid/src/src.pri +++ /dev/null @@ -1,5 +0,0 @@ -HEADERS += \ - $$PWD/dateutils.h - -SOURCES += \ - $$PWD/dateutils.cpp diff --git a/prototype_2016/third_party/fluid/tests/CMakeLists.txt b/prototype_2016/third_party/fluid/tests/CMakeLists.txt deleted file mode 100644 index 0653827..0000000 --- a/prototype_2016/third_party/fluid/tests/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(auto) diff --git a/prototype_2016/third_party/fluid/tests/auto/CMakeLists.txt b/prototype_2016/third_party/fluid/tests/auto/CMakeLists.txt deleted file mode 100644 index 27e47a2..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -if(NOT USE_SUPERBUILD) - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} -VV) -endif() - -add_subdirectory(controls) -add_subdirectory(core) -add_subdirectory(material) diff --git a/prototype_2016/third_party/fluid/tests/auto/controls/CMakeLists.txt b/prototype_2016/third_party/fluid/tests/auto/controls/CMakeLists.txt deleted file mode 100644 index ee473f8..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/controls/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(SOURCES controls.cpp) - -set(CMAKE_MACOSX_BUNDLE FALSE) - -add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") - -add_executable(tst_controls ${SOURCES}) -target_link_libraries(tst_controls Qt5::Qml Qt5::Test Qt5::QuickTest) -add_test(tst_controls tst_controls) -add_dependencies(check tst_controls) diff --git a/prototype_2016/third_party/fluid/tests/auto/controls/controls.cpp b/prototype_2016/third_party/fluid/tests/auto/controls/controls.cpp deleted file mode 100644 index 5358d4a..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/controls/controls.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -QUICK_TEST_MAIN(tst_controls) diff --git a/prototype_2016/third_party/fluid/tests/auto/controls/tst_icon.qml b/prototype_2016/third_party/fluid/tests/auto/controls/tst_icon.qml deleted file mode 100644 index f5080c5..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/controls/tst_icon.qml +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtTest 1.0 -import Fluid.Controls 1.0 -import QtQuick.Controls.Material 2.0 - -Icon { - id: icon - - TestCase { - name: "IconTests" - when: windowShown - - function test_source_should_use_desktop_provider_for_freedesktop_icon() { - icon.name = 'edit-cut-symbolic' - - compare(icon.source, 'image://fluidicontheme/edit-cut-symbolic') - } - - function test_source_should_use_icon_prefix_for_material_icon() { - icon.name = 'action/settings' - - compare(icon.source, 'image://fluidicons/action/settings') - } - - function test_source_should_use_file_url_for_file_name() { - icon.name = '/path/to/icon.png' - - compare(icon.source, 'file:///path/to/icon.png') - } - - function test_source_should_use_file_url_for_file_url() { - icon.name = 'file:///path/to/icon.png' - - compare(icon.source, 'file:///path/to/icon.png') - } - - function test_colorize_should_be_true_for_material_icon() { - icon.name = 'action/settings' - - compare(icon.colorize, true) - } - - function test_colorize_should_be_true_for_symbolic_icon() { - icon.name = 'edit-cut-symbolic' - - compare(icon.colorize, true) - } - - function test_colorize_should_be_false_for_regular_icon() { - icon.name = 'gimp' - - compare(icon.colorize, false) - } - - function test_color_should_be_light_icon_color_for_light_theme() { - icon.Material.theme = Material.Light - - // Colors must be converted to strings for compare to work - compare(String(icon.color), String(FluidStyle.iconColorLight)) - } - - function test_color_should_be_dark_icon_color_for_dark_theme() { - icon.Material.theme = Material.Dark - - // Colors must be converted to strings for compare to work - compare(String(icon.color), String(FluidStyle.iconColorDark)) - } - } -} diff --git a/prototype_2016/third_party/fluid/tests/auto/controls/tst_listitem.qml b/prototype_2016/third_party/fluid/tests/auto/controls/tst_listitem.qml deleted file mode 100644 index 34807c2..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/controls/tst_listitem.qml +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtTest 1.0 -import Fluid.Controls 1.0 - -Item { - width: 400 - height: 400 - - Column { - anchors.fill: parent - - ListItem { - id: listItem - - width: 200 - - SignalSpy { - id: clickedSpy - target: listItem - signalName: "clicked" - } - } - - ListItem { - id: listItemWithSubtext1 - - maximumLineCount: 2 - subText: "Random Text" - } - - ListItem { - id: listItemWithSubtext2 - - maximumLineCount: 3 - subText: "Random Text" - } - - ListItem { - id: listItemWithSecondaryItem - - secondaryItem: Button {} - } - - ListItem { - id: listItemWithoutSecondaryItem - } - - ListItem { - id: listItemWithLeftItem - - iconName: "action/settings" - } - - ListItem { - id: listItemWithRightItem - - text: "Random Text" - rightItem: ComboBox { - anchors.centerIn: parent - textRole: "text" - model: ListModel { - ListElement { text: "One"; value: 1 } - ListElement { text: "Two"; value: 2 } - } - } - } - } - - TestCase { - name: "ListItemTests" - when: windowShown - - function test_leftItem_shows_when_iconName_is_set() { - var leftItem = findChild(listItem, "leftItem") - - compare(leftItem.showing, false) - - listItem.iconName = "action/settings" - - compare(leftItem.showing, true) - } - - function test_click_isnt_eaten_by_ripple() { - clickedSpy.clear() - - mouseClick(listItem) - - compare(clickedSpy.count, 1) - } - - function test_implicit_height() { - compare(listItemWithSubtext1.implicitHeight, 72) - - compare(listItemWithSubtext2.implicitHeight, 88) - - var secondaryItem = findChild(listItemWithSecondaryItem, "secondaryItem") - compare(listItemWithSecondaryItem.implicitHeight, secondaryItem.childrenRect.height + Units.smallSpacing * 2) - - compare(listItemWithoutSecondaryItem.implicitHeight, 48) - - var leftItem = findChild(listItemWithLeftItem, "leftItem") - compare(listItemWithLeftItem.implicitHeight, 48) - - var rightItem = findChild(listItemWithRightItem, "rightItem") - compare(listItemWithRightItem.implicitHeight, rightItem.childrenRect.height + Units.smallSpacing * 2) - } - } -} diff --git a/prototype_2016/third_party/fluid/tests/auto/core/CMakeLists.txt b/prototype_2016/third_party/fluid/tests/auto/core/CMakeLists.txt deleted file mode 100644 index dbe79a9..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/core/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -set(SOURCES core.cpp) - -set(CMAKE_MACOSX_BUNDLE FALSE) - -add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") - -add_executable(tst_core ${SOURCES}) -target_link_libraries(tst_core Qt5::Qml Qt5::Test Qt5::QuickTest) -add_test(tst_core tst_core) -add_dependencies(check tst_core) diff --git a/prototype_2016/third_party/fluid/tests/auto/core/core.cpp b/prototype_2016/third_party/fluid/tests/auto/core/core.cpp deleted file mode 100644 index c02ebe0..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/core/core.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -QUICK_TEST_MAIN(tst_core) diff --git a/prototype_2016/third_party/fluid/tests/auto/core/tst_clipboard.qml b/prototype_2016/third_party/fluid/tests/auto/core/tst_clipboard.qml deleted file mode 100644 index 5b65277..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/core/tst_clipboard.qml +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtTest 1.0 -import Fluid.Core 1.0 - -TestCase { - name: "ClipboardTests" - - Clipboard { - id: clipboard - } - - SignalSpy { - id: textChangedSpy - target: clipboard - signalName: "textChanged" - } - - function test_clipboard_works() { - var text = "Hello World" - - clipboard.text = text - - compare(clipboard.text, text) - } - - function tests_setting_text_should_fire_textChanged() { - clipboard.text = "" - - textChangedSpy.clear() - - clipboard.text = "Random Text" - - compare(textChangedSpy.count, 1) - } - - function test_clear_should_fire_textChanged() { - clipboard.text = "Non empty text" - - textChangedSpy.clear() - - clipboard.clear() - - compare(textChangedSpy.count, 1) - } -} diff --git a/prototype_2016/third_party/fluid/tests/auto/core/tst_utils.qml b/prototype_2016/third_party/fluid/tests/auto/core/tst_utils.qml deleted file mode 100644 index 31dfe3d..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/core/tst_utils.qml +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtTest 1.0 -import Fluid.Core 1.0 - -TestCase { - name: "UtilsTests" - - function test_blendColors() { - compare(Utils.blendColors("lightsteelblue", "#10FF0000", 0.5), "#80b5b8d0") - } - - function test_luminance() { - compare(Utils.luminance("lightsteelblue"), 0.7593254230563821) - } - - function test_isDarkColor_should_return_true_for_dark_color() { - compare(Utils.isDarkColor("#455A64"), true) - } - - function test_isDarkColor_should_return_false_for_light_color() { - compare(Utils.isDarkColor("#B0BEC5"), false) - } -} diff --git a/prototype_2016/third_party/fluid/tests/auto/material/CMakeLists.txt b/prototype_2016/third_party/fluid/tests/auto/material/CMakeLists.txt deleted file mode 100644 index 78db8aa..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(SOURCES material.cpp) - -set(CMAKE_MACOSX_BUNDLE FALSE) - -add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") - -qt5_add_resources(RESOURCES material.qrc) - -add_executable(tst_material ${SOURCES} ${RESOURCES}) -target_link_libraries(tst_material Qt5::Qml Qt5::QuickControls2 Qt5::Test Qt5::QuickTest) -add_test(tst_material tst_material) -add_dependencies(check tst_material) diff --git a/prototype_2016/third_party/fluid/tests/auto/material/material.cpp b/prototype_2016/third_party/fluid/tests/auto/material/material.cpp deleted file mode 100644 index a38926f..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/material.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -#include -QUICK_TEST_MAIN(tst_material) diff --git a/prototype_2016/third_party/fluid/tests/auto/material/material.qrc b/prototype_2016/third_party/fluid/tests/auto/material/material.qrc deleted file mode 100644 index e313f5e..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/material.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - qtquickcontrols2.conf - - diff --git a/prototype_2016/third_party/fluid/tests/auto/material/qtquickcontrols2.conf b/prototype_2016/third_party/fluid/tests/auto/material/qtquickcontrols2.conf deleted file mode 100644 index b6c7c87..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/qtquickcontrols2.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Controls] -Style=Material diff --git a/prototype_2016/third_party/fluid/tests/auto/material/tst_ripple.qml b/prototype_2016/third_party/fluid/tests/auto/material/tst_ripple.qml deleted file mode 100644 index 4bef828..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/tst_ripple.qml +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Michael Spencer - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtTest 1.0 -import Fluid.Material 1.0 - -Ripple { - id: ripple - - width: 100 - height: 100 - - TestCase { - name: "RippleTests" - when: windowShown - - function test_mouse_press_shows_ripple() { - compare(getRipples().length, 0) - mousePress(ripple) - compare(getRipples().length, 1) - mouseRelease(ripple) - wait(1000) - } - - function test_mouse_up_hides_ripple() { - mouseClick(ripple) - compare(getRipples().length, 1) - wait(1000) - compare(getRipples().length, 0) - } - - function test_focused_ripple_shows_focus_background() { - var focusBackground = findChild(ripple, "focusBackground") - compare(focusBackground.opacity, 0) - - ripple.focused = true - wait(1000) - - compare(focusBackground.opacity, 1) - - ripple.focused = false - wait(1000) - } - - function test_focused_ripple_shows_focus_ripple() { - var focusRipple = findChild(ripple, "focusRipple") - compare(focusRipple.opacity, 0) - - ripple.focused = true - wait(1000) - - compare(focusRipple.opacity, 1) - - ripple.focused = false - wait(1000) - } - - function getRipples() { - return filteredChildren("tapRipple") - } - - function filteredChildren(objectName) { - var filtered = [] - - for (var i = 0; i < ripple.children.length; i++) { - var child = ripple.children[i] - - if (child.objectName == objectName) { - filtered.push(child) - } - } - - return filtered - } - } -} diff --git a/prototype_2016/third_party/fluid/tests/auto/material/tst_typography.qml b/prototype_2016/third_party/fluid/tests/auto/material/tst_typography.qml deleted file mode 100644 index 54af0da..0000000 --- a/prototype_2016/third_party/fluid/tests/auto/material/tst_typography.qml +++ /dev/null @@ -1,166 +0,0 @@ -/* - * This file is part of Fluid. - * - * Copyright (C) 2016 Pier Luigi Fiorini - * - * $BEGIN_LICENSE:MPL2$ - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * $END_LICENSE$ - */ - -import QtQuick 2.4 -import QtTest 1.0 -import Fluid.Core 1.0 -import Fluid.Controls 1.0 -import QtQuick.Controls 2.0 - -TestCase { - id: testCase - name: "TypographyTests" - width: 200 - height: 200 - visible: true - when: windowShown - - Component { - id: displayLabelComponent - DisplayLabel {} - } - - Component { - id: bodyLabelComponent - BodyLabel {} - } - - Component { - id: captionLabelComponent - CaptionLabel {} - } - - Component { - id: headlineLabelComponent - HeadlineLabel {} - } - - Component { - id: subheadingLabelComponent - SubheadingLabel {} - } - - Component { - id: titleLabelComponent - TitleLabel {} - } - - function test_display_label() { - var displayLabel = displayLabelComponent.createObject(testCase) - verify(displayLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - displayLabel.level = 1 - compare(displayLabel.font.pixelSize, 34) - compare(displayLabel.font.weight, Font.Normal) - displayLabel.level = 2 - compare(displayLabel.font.pixelSize, 45) - compare(displayLabel.font.weight, Font.Normal) - displayLabel.level = 3 - compare(displayLabel.font.pixelSize, 56) - compare(displayLabel.font.weight, Font.Normal) - displayLabel.level = 4 - compare(displayLabel.font.pixelSize, 112) - compare(displayLabel.font.weight, Font.Light) - } - - function test_body_label() { - var bodyLabel = bodyLabelComponent.createObject(testCase) - verify(bodyLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - bodyLabel.level = 1 - if (Device.isMobile) - compare(bodyLabel.font.pixelSize, 14) - else - compare(bodyLabel.font.pixelSize, 13) - compare(bodyLabel.lineHeight, 20.0) - compare(bodyLabel.lineHeightMode, Text.FixedHeight) - - bodyLabel.level = 2 - if (Device.isMobile) - compare(bodyLabel.font.pixelSize, 14) - else - compare(bodyLabel.font.pixelSize, 13) - compare(bodyLabel.lineHeight, 24.0) - compare(bodyLabel.lineHeightMode, Text.FixedHeight) - } - - function test_caption_label() { - var captionLabel = captionLabelComponent.createObject(testCase) - verify(captionLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - compare(captionLabel.font.pixelSize, 12) - } - - function test_headline_label() { - var headlineLabel = headlineLabelComponent.createObject(testCase) - verify(headlineLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - compare(headlineLabel.font.pixelSize, 24) - compare(headlineLabel.lineHeight, 32.0) - compare(headlineLabel.lineHeightMode, Text.FixedHeight) - } - - function test_subheading_label() { - var subheadingLabel = subheadingLabelComponent.createObject(testCase) - verify(subheadingLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - subheadingLabel.level = 1 - if (Device.isMobile) - compare(subheadingLabel.font.pixelSize, 16) - else - compare(subheadingLabel.font.pixelSize, 15) - compare(subheadingLabel.lineHeight, 24.0) - compare(subheadingLabel.lineHeightMode, Text.FixedHeight) - - subheadingLabel.level = 2 - if (Device.isMobile) - compare(subheadingLabel.font.pixelSize, 16) - else - compare(subheadingLabel.font.pixelSize, 15) - compare(subheadingLabel.lineHeight, 28.0) - compare(subheadingLabel.lineHeightMode, Text.FixedHeight) - } - - function test_title_label() { - var titleLabel = titleLabelComponent.createObject(testCase) - verify(titleLabel) - - // FIXME: We can't apparently access +material from tests, - // hence these test will fail - return - - compare(titleLabel.font.pixelSize, 20) - compare(titleLabel.font.weight, Font.Medium) - } -} -- cgit v1.2.3