aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/tutorials/extending-qml')
-rw-r--r--examples/qml/tutorials/extending-qml/.prev_CMakeLists.txt8
-rw-r--r--examples/qml/tutorials/extending-qml/CMakeLists.txt8
-rw-r--r--examples/qml/tutorials/extending-qml/chapter1-basics/CMakeLists.txt47
-rw-r--r--examples/qml/tutorials/extending-qml/chapter2-methods/CMakeLists.txt47
-rw-r--r--examples/qml/tutorials/extending-qml/chapter3-bindings/CMakeLists.txt47
-rw-r--r--examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt48
-rw-r--r--examples/qml/tutorials/extending-qml/chapter5-listproperties/CMakeLists.txt48
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/.prev_CMakeLists.txt43
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/CMakeLists.txt44
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/import/CMakeLists.txt42
10 files changed, 382 insertions, 0 deletions
diff --git a/examples/qml/tutorials/extending-qml/.prev_CMakeLists.txt b/examples/qml/tutorials/extending-qml/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8e41f3d77d
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/.prev_CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from extending-qml.pro.
+
+add_subdirectory(chapter1-basics)
+add_subdirectory(chapter2-methods)
+add_subdirectory(chapter3-bindings)
+add_subdirectory(chapter4-customPropertyTypes)
+add_subdirectory(chapter5-listproperties)
+add_subdirectory(chapter6-plugins)
diff --git a/examples/qml/tutorials/extending-qml/CMakeLists.txt b/examples/qml/tutorials/extending-qml/CMakeLists.txt
new file mode 100644
index 0000000000..8e41f3d77d
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/CMakeLists.txt
@@ -0,0 +1,8 @@
+# Generated from extending-qml.pro.
+
+add_subdirectory(chapter1-basics)
+add_subdirectory(chapter2-methods)
+add_subdirectory(chapter3-bindings)
+add_subdirectory(chapter4-customPropertyTypes)
+add_subdirectory(chapter5-listproperties)
+add_subdirectory(chapter6-plugins)
diff --git a/examples/qml/tutorials/extending-qml/chapter1-basics/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter1-basics/CMakeLists.txt
new file mode 100644
index 0000000000..daf1af7917
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter1-basics/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from chapter1-basics.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter1-basics LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter1-basics")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter1-basics
+ main.cpp
+ piechart.cpp piechart.h
+)
+target_link_libraries(chapter1-basics PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(chapter1-basics_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter1-basics "chapter1-basics"
+ PREFIX
+ "/"
+ FILES
+ ${chapter1-basics_resource_files}
+)
+
+install(TARGETS chapter1-basics
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter2-methods/CMakeLists.txt
new file mode 100644
index 0000000000..8441aa9fb3
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter2-methods/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from chapter2-methods.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter2-methods LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter2-methods")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter2-methods
+ main.cpp
+ piechart.cpp piechart.h
+)
+target_link_libraries(chapter2-methods PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(chapter2-methods_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter2-methods "chapter2-methods"
+ PREFIX
+ "/"
+ FILES
+ ${chapter2-methods_resource_files}
+)
+
+install(TARGETS chapter2-methods
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter3-bindings/CMakeLists.txt
new file mode 100644
index 0000000000..621b7016a7
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter3-bindings/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from chapter3-bindings.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter3-bindings LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter3-bindings")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter3-bindings
+ main.cpp
+ piechart.cpp piechart.h
+)
+target_link_libraries(chapter3-bindings PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(chapter3-bindings_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter3-bindings "chapter3-bindings"
+ PREFIX
+ "/"
+ FILES
+ ${chapter3-bindings_resource_files}
+)
+
+install(TARGETS chapter3-bindings
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt
new file mode 100644
index 0000000000..24b5797da6
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Generated from chapter4-customPropertyTypes.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter4-customPropertyTypes LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter4-customPropertyTypes
+ main.cpp
+ piechart.cpp piechart.h
+ pieslice.cpp pieslice.h
+)
+target_link_libraries(chapter4-customPropertyTypes PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(chapter4-customPropertyTypes_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter4-customPropertyTypes "chapter4-customPropertyTypes"
+ PREFIX
+ "/"
+ FILES
+ ${chapter4-customPropertyTypes_resource_files}
+)
+
+install(TARGETS chapter4-customPropertyTypes
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qml/tutorials/extending-qml/chapter5-listproperties/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter5-listproperties/CMakeLists.txt
new file mode 100644
index 0000000000..3fa1a5b6e0
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter5-listproperties/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Generated from chapter5-listproperties.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter5-listproperties LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter5-listproperties")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter5-listproperties
+ main.cpp
+ piechart.cpp piechart.h
+ pieslice.cpp pieslice.h
+)
+target_link_libraries(chapter5-listproperties PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(chapter5-listproperties_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter5-listproperties "chapter5-listproperties"
+ PREFIX
+ "/"
+ FILES
+ ${chapter5-listproperties_resource_files}
+)
+
+install(TARGETS chapter5-listproperties
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/.prev_CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter6-plugins/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ef3b9791f9
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/.prev_CMakeLists.txt
@@ -0,0 +1,43 @@
+# Generated from chapter6-plugins.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter6-plugins LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter6-plugins")
+
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter6-plugins
+ main.cpp
+)
+target_link_libraries(chapter6-plugins PUBLIC
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(app_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter6-plugins "app"
+ PREFIX
+ "/"
+ FILES
+ ${app_resource_files}
+)
+
+install(TARGETS chapter6-plugins
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+add_subdirectory(import)
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter6-plugins/CMakeLists.txt
new file mode 100644
index 0000000000..f8b1a2de4c
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from chapter6-plugins.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chapter6-plugins LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter6-plugins")
+
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(chapter6-plugins
+ main.cpp
+)
+target_link_libraries(chapter6-plugins PUBLIC
+ Qt::Qml
+ Qt::Quick
+)
+
+
+# Resources:
+set(app_resource_files
+ "app.qml"
+)
+
+qt6_add_resources(chapter6-plugins "app"
+ PREFIX
+ "/"
+ FILES
+ ${app_resource_files}
+)
+
+install(TARGETS chapter6-plugins
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
+add_subdirectory(import)
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/import/CMakeLists.txt b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/CMakeLists.txt
new file mode 100644
index 0000000000..41abb2891b
--- /dev/null
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/import/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from import.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chartsplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qml/tutorials/extending-qml/chapter6-plugins/Charts")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+qt6_add_qml_module(chartsplugin
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../Charts"
+ VERSION 1.0
+ URI "Charts"
+ INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
+)
+
+target_sources(chartsplugin PRIVATE
+ chartsplugin.cpp chartsplugin.h
+ piechart.cpp piechart.h
+ pieslice.cpp pieslice.h
+)
+target_link_libraries(chartsplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+install(TARGETS chartsplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)