diff --git a/.gitignore b/.gitignore index aa681b23..8215fd54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ build/ *.user *.qmlc +Makefile +.obj/ +.moc/ +.qmake.stash diff --git a/Demo/CMakeLists.txt b/Demo/CMakeLists.txt new file mode 100644 index 00000000..2bef896d --- /dev/null +++ b/Demo/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.5) + +project(Demo LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# QtCreator supports the following variables for Android, which are identical to qmake Android variables. +# Check http://doc.qt.io/qt-5/deployment-android.html for more information. +# They need to be set before the find_package(Qt5 ...) call. + +#if(ANDROID) +# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android") +# if (ANDROID_ABI STREQUAL "armeabi-v7a") +# set(ANDROID_EXTRA_LIBS +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so +# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so) +# endif() +#endif() + +find_package(Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED) + +if(ANDROID) + add_library(Demo SHARED + iconcategorymodel.cpp iconcategorymodel.h + iconnamemodel.cpp iconnamemodel.h + main.cpp + qml.qrc + ) +else() + add_executable(Demo + iconcategorymodel.cpp iconcategorymodel.h + iconnamemodel.cpp iconnamemodel.h + main.cpp + qml.qrc + ) +endif() + +target_compile_definitions(Demo + PRIVATE $<$,$>:QT_QML_DEBUG>) +target_link_libraries(Demo + PRIVATE Qt5::Core Qt5::Quick Qt5::QuickControls2) diff --git a/src/demo/iconcategorymodel.cpp b/Demo/iconcategorymodel.cpp similarity index 100% rename from src/demo/iconcategorymodel.cpp rename to Demo/iconcategorymodel.cpp diff --git a/src/demo/iconcategorymodel.h b/Demo/iconcategorymodel.h similarity index 100% rename from src/demo/iconcategorymodel.h rename to Demo/iconcategorymodel.h diff --git a/src/demo/iconnamemodel.cpp b/Demo/iconnamemodel.cpp similarity index 100% rename from src/demo/iconnamemodel.cpp rename to Demo/iconnamemodel.cpp diff --git a/src/demo/iconnamemodel.h b/Demo/iconnamemodel.h similarity index 100% rename from src/demo/iconnamemodel.h rename to Demo/iconnamemodel.h diff --git a/src/demo/icons/128x128/apps/io.liri.Fluid.Demo.png b/Demo/icons/128x128/apps/io.liri.Fluid.Demo.png similarity index 100% rename from src/demo/icons/128x128/apps/io.liri.Fluid.Demo.png rename to Demo/icons/128x128/apps/io.liri.Fluid.Demo.png diff --git a/src/demo/icons/32x32/apps/io.liri.Fluid.Demo.png b/Demo/icons/32x32/apps/io.liri.Fluid.Demo.png similarity index 100% rename from src/demo/icons/32x32/apps/io.liri.Fluid.Demo.png rename to Demo/icons/32x32/apps/io.liri.Fluid.Demo.png diff --git a/src/demo/icons/48x48/apps/io.liri.Fluid.Demo.png b/Demo/icons/48x48/apps/io.liri.Fluid.Demo.png similarity index 100% rename from src/demo/icons/48x48/apps/io.liri.Fluid.Demo.png rename to Demo/icons/48x48/apps/io.liri.Fluid.Demo.png diff --git a/src/demo/icons/64x64/apps/io.liri.Fluid.Demo.png b/Demo/icons/64x64/apps/io.liri.Fluid.Demo.png similarity index 100% rename from src/demo/icons/64x64/apps/io.liri.Fluid.Demo.png rename to Demo/icons/64x64/apps/io.liri.Fluid.Demo.png diff --git a/src/demo/icons/scalable/apps/io.liri.Fluid.Demo.svg b/Demo/icons/scalable/apps/io.liri.Fluid.Demo.svg similarity index 100% rename from src/demo/icons/scalable/apps/io.liri.Fluid.Demo.svg rename to Demo/icons/scalable/apps/io.liri.Fluid.Demo.svg diff --git a/src/demo/images/balloon.jpg b/Demo/images/balloon.jpg similarity index 100% rename from src/demo/images/balloon.jpg rename to Demo/images/balloon.jpg diff --git a/src/demo/images/materialbg.png b/Demo/images/materialbg.png similarity index 100% rename from src/demo/images/materialbg.png rename to Demo/images/materialbg.png diff --git a/src/demo/main.cpp b/Demo/main.cpp similarity index 100% rename from src/demo/main.cpp rename to Demo/main.cpp diff --git a/Demo/main.qml b/Demo/main.qml new file mode 100644 index 00000000..f3fae8f0 --- /dev/null +++ b/Demo/main.qml @@ -0,0 +1,9 @@ +import QtQuick 2.10 +import QtQuick.Window 2.10 + +Window { + visible: true + width: 640 + height: 480 + title: qsTr("Hello World") +} diff --git a/Demo/qml.qrc b/Demo/qml.qrc new file mode 100644 index 00000000..c0e0b306 --- /dev/null +++ b/Demo/qml.qrc @@ -0,0 +1,42 @@ + + + images/balloon.jpg + images/materialbg.png + qml/icons.txt + qml/main.qml + qml/Pages/Basic/BusyIndicatorPage.qml + qml/Pages/Basic/ButtonPage.qml + qml/Pages/Basic/CheckBoxPage.qml + qml/Pages/Basic/ProgressBarPage.qml + qml/Pages/Basic/RadioButtonPage.qml + qml/Pages/Basic/SliderPage.qml + qml/Pages/Basic/SwitchPage.qml + qml/Pages/Controls/ActionButtonPage.qml + qml/Pages/Controls/BottomSheetPage.qml + qml/Pages/Controls/CardPage.qml + qml/Pages/Controls/ChipPage.qml + qml/Pages/Controls/DatePickerPage.qml + qml/Pages/Controls/DateTimePickerPage.qml + qml/Pages/Controls/DialogsPage.qml + qml/Pages/Controls/ListItemPage.qml + qml/Pages/Controls/NavDrawerPage.qml + qml/Pages/Controls/NavigationListViewPage.qml + qml/Pages/Controls/OverlayPage.qml + qml/Pages/Controls/PlaceholderPage.qml + qml/Pages/Controls/SearchPage.qml + qml/Pages/Controls/SnackBarPage.qml + qml/Pages/Controls/SubPage.qml + qml/Pages/Controls/TimePickerPage.qml + qml/Pages/Controls/WavePage.qml + qml/Pages/Layouts/AutomaticGridPage.qml + qml/Pages/Layouts/ColumnFlowPage.qml + qml/Pages/Style/IconsPage.qml + qml/Pages/Style/PalettePage.qml + qml/Pages/Style/PaletteSwatch.qml + qml/Pages/Style/SystemIconsPage.qml + qml/Pages/Style/TypographyPage.qml + qml/StyledPage.qml + qml/StyledPageTwoColumns.qml + qml/StyledRectangle.qml + + diff --git a/src/demo/qml/Pages/Basic/BusyIndicatorPage.qml b/Demo/qml/Pages/Basic/BusyIndicatorPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/BusyIndicatorPage.qml rename to Demo/qml/Pages/Basic/BusyIndicatorPage.qml diff --git a/src/demo/qml/Pages/Basic/ButtonPage.qml b/Demo/qml/Pages/Basic/ButtonPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/ButtonPage.qml rename to Demo/qml/Pages/Basic/ButtonPage.qml diff --git a/src/demo/qml/Pages/Basic/CheckBoxPage.qml b/Demo/qml/Pages/Basic/CheckBoxPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/CheckBoxPage.qml rename to Demo/qml/Pages/Basic/CheckBoxPage.qml diff --git a/src/demo/qml/Pages/Basic/ProgressBarPage.qml b/Demo/qml/Pages/Basic/ProgressBarPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/ProgressBarPage.qml rename to Demo/qml/Pages/Basic/ProgressBarPage.qml diff --git a/src/demo/qml/Pages/Basic/RadioButtonPage.qml b/Demo/qml/Pages/Basic/RadioButtonPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/RadioButtonPage.qml rename to Demo/qml/Pages/Basic/RadioButtonPage.qml diff --git a/src/demo/qml/Pages/Basic/SliderPage.qml b/Demo/qml/Pages/Basic/SliderPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/SliderPage.qml rename to Demo/qml/Pages/Basic/SliderPage.qml diff --git a/src/demo/qml/Pages/Basic/SwitchPage.qml b/Demo/qml/Pages/Basic/SwitchPage.qml similarity index 100% rename from src/demo/qml/Pages/Basic/SwitchPage.qml rename to Demo/qml/Pages/Basic/SwitchPage.qml diff --git a/src/demo/qml/Pages/Controls/ActionButtonPage.qml b/Demo/qml/Pages/Controls/ActionButtonPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/ActionButtonPage.qml rename to Demo/qml/Pages/Controls/ActionButtonPage.qml diff --git a/src/demo/qml/Pages/Controls/BottomSheetPage.qml b/Demo/qml/Pages/Controls/BottomSheetPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/BottomSheetPage.qml rename to Demo/qml/Pages/Controls/BottomSheetPage.qml diff --git a/src/demo/qml/Pages/Controls/CardPage.qml b/Demo/qml/Pages/Controls/CardPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/CardPage.qml rename to Demo/qml/Pages/Controls/CardPage.qml diff --git a/src/demo/qml/Pages/Controls/ChipPage.qml b/Demo/qml/Pages/Controls/ChipPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/ChipPage.qml rename to Demo/qml/Pages/Controls/ChipPage.qml diff --git a/src/demo/qml/Pages/Controls/DatePickerPage.qml b/Demo/qml/Pages/Controls/DatePickerPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/DatePickerPage.qml rename to Demo/qml/Pages/Controls/DatePickerPage.qml diff --git a/src/demo/qml/Pages/Controls/DateTimePickerPage.qml b/Demo/qml/Pages/Controls/DateTimePickerPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/DateTimePickerPage.qml rename to Demo/qml/Pages/Controls/DateTimePickerPage.qml diff --git a/src/demo/qml/Pages/Controls/DialogsPage.qml b/Demo/qml/Pages/Controls/DialogsPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/DialogsPage.qml rename to Demo/qml/Pages/Controls/DialogsPage.qml diff --git a/src/demo/qml/Pages/Controls/ListItemPage.qml b/Demo/qml/Pages/Controls/ListItemPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/ListItemPage.qml rename to Demo/qml/Pages/Controls/ListItemPage.qml diff --git a/src/demo/qml/Pages/Controls/NavDrawerPage.qml b/Demo/qml/Pages/Controls/NavDrawerPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/NavDrawerPage.qml rename to Demo/qml/Pages/Controls/NavDrawerPage.qml diff --git a/src/demo/qml/Pages/Controls/NavigationListViewPage.qml b/Demo/qml/Pages/Controls/NavigationListViewPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/NavigationListViewPage.qml rename to Demo/qml/Pages/Controls/NavigationListViewPage.qml diff --git a/src/demo/qml/Pages/Controls/OverlayPage.qml b/Demo/qml/Pages/Controls/OverlayPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/OverlayPage.qml rename to Demo/qml/Pages/Controls/OverlayPage.qml diff --git a/src/demo/qml/Pages/Controls/PlaceholderPage.qml b/Demo/qml/Pages/Controls/PlaceholderPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/PlaceholderPage.qml rename to Demo/qml/Pages/Controls/PlaceholderPage.qml diff --git a/src/demo/qml/Pages/Controls/SearchPage.qml b/Demo/qml/Pages/Controls/SearchPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/SearchPage.qml rename to Demo/qml/Pages/Controls/SearchPage.qml diff --git a/src/demo/qml/Pages/Controls/SnackBarPage.qml b/Demo/qml/Pages/Controls/SnackBarPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/SnackBarPage.qml rename to Demo/qml/Pages/Controls/SnackBarPage.qml diff --git a/src/demo/qml/Pages/Controls/SubPage.qml b/Demo/qml/Pages/Controls/SubPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/SubPage.qml rename to Demo/qml/Pages/Controls/SubPage.qml diff --git a/src/demo/qml/Pages/Controls/TimePickerPage.qml b/Demo/qml/Pages/Controls/TimePickerPage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/TimePickerPage.qml rename to Demo/qml/Pages/Controls/TimePickerPage.qml diff --git a/src/demo/qml/Pages/Controls/WavePage.qml b/Demo/qml/Pages/Controls/WavePage.qml similarity index 100% rename from src/demo/qml/Pages/Controls/WavePage.qml rename to Demo/qml/Pages/Controls/WavePage.qml diff --git a/src/demo/qml/Pages/Layouts/AutomaticGridPage.qml b/Demo/qml/Pages/Layouts/AutomaticGridPage.qml similarity index 100% rename from src/demo/qml/Pages/Layouts/AutomaticGridPage.qml rename to Demo/qml/Pages/Layouts/AutomaticGridPage.qml diff --git a/src/demo/qml/Pages/Layouts/ColumnFlowPage.qml b/Demo/qml/Pages/Layouts/ColumnFlowPage.qml similarity index 100% rename from src/demo/qml/Pages/Layouts/ColumnFlowPage.qml rename to Demo/qml/Pages/Layouts/ColumnFlowPage.qml diff --git a/src/demo/qml/Pages/Style/IconsPage.qml b/Demo/qml/Pages/Style/IconsPage.qml similarity index 100% rename from src/demo/qml/Pages/Style/IconsPage.qml rename to Demo/qml/Pages/Style/IconsPage.qml diff --git a/src/demo/qml/Pages/Style/PalettePage.qml b/Demo/qml/Pages/Style/PalettePage.qml similarity index 100% rename from src/demo/qml/Pages/Style/PalettePage.qml rename to Demo/qml/Pages/Style/PalettePage.qml diff --git a/src/demo/qml/Pages/Style/PaletteSwatch.qml b/Demo/qml/Pages/Style/PaletteSwatch.qml similarity index 100% rename from src/demo/qml/Pages/Style/PaletteSwatch.qml rename to Demo/qml/Pages/Style/PaletteSwatch.qml diff --git a/src/demo/qml/Pages/Style/SystemIconsPage.qml b/Demo/qml/Pages/Style/SystemIconsPage.qml similarity index 100% rename from src/demo/qml/Pages/Style/SystemIconsPage.qml rename to Demo/qml/Pages/Style/SystemIconsPage.qml diff --git a/src/demo/qml/Pages/Style/TypographyPage.qml b/Demo/qml/Pages/Style/TypographyPage.qml similarity index 100% rename from src/demo/qml/Pages/Style/TypographyPage.qml rename to Demo/qml/Pages/Style/TypographyPage.qml diff --git a/src/demo/qml/StyledPage.qml b/Demo/qml/StyledPage.qml similarity index 100% rename from src/demo/qml/StyledPage.qml rename to Demo/qml/StyledPage.qml diff --git a/src/demo/qml/StyledPageTwoColumns.qml b/Demo/qml/StyledPageTwoColumns.qml similarity index 100% rename from src/demo/qml/StyledPageTwoColumns.qml rename to Demo/qml/StyledPageTwoColumns.qml diff --git a/src/demo/qml/StyledRectangle.qml b/Demo/qml/StyledRectangle.qml similarity index 100% rename from src/demo/qml/StyledRectangle.qml rename to Demo/qml/StyledRectangle.qml diff --git a/src/demo/qml/icons.txt b/Demo/qml/icons.txt similarity index 100% rename from src/demo/qml/icons.txt rename to Demo/qml/icons.txt diff --git a/src/demo/qml/main.qml b/Demo/qml/main.qml similarity index 100% rename from src/demo/qml/main.qml rename to Demo/qml/main.qml diff --git a/src/demo/CMakeLists.txt b/src/demo/CMakeLists.txt index f965a40d..91c54a48 100644 --- a/src/demo/CMakeLists.txt +++ b/src/demo/CMakeLists.txt @@ -1,10 +1,25 @@ +cmake_minimum_required(VERSION 3.10.0) + +project("FluidDemo" + VERSION "1.0.0" + DESCRIPTION "Demo project showing Fluid Controls" + LANGUAGES CXX C +) + if(WIN32) set(FluidDemo_OUTPUT_NAME "FluidDemo") else() set(FluidDemo_OUTPUT_NAME "fluid-demo") endif() -liri_add_executable(FluidDemo +set(LIRI_LOCAL_ECM TRUE) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/fluid/cmake/shared/modules") + +include(LiriSetup) + + +add_executable(FluidDemo OUTPUT_NAME "${FluidDemo_OUTPUT_NAME}" SOURCES