summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-04 08:15:50 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-02-04 18:50:39 +0000
commit76108058796bf0884f6fd128d81f1bc49f9a56af (patch)
tree1c5f0740ca3217f3d11cf7c684143bbb0da0f336 /examples/widgets/painting
parent465949420a877099247d94dd4db54d19ca5a9a7c (diff)
Regenerate examples
Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r--examples/widgets/painting/affine/.prev_CMakeLists.txt215
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt184
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt21
-rw-r--r--examples/widgets/painting/composition/.prev_CMakeLists.txt216
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt186
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/deform/.prev_CMakeLists.txt214
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt183
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt12
-rw-r--r--examples/widgets/painting/gradients/.prev_CMakeLists.txt214
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt184
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt21
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt12
-rw-r--r--examples/widgets/painting/shared/CMakeLists.txt3
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt6
15 files changed, 1658 insertions, 19 deletions
diff --git a/examples/widgets/painting/affine/.prev_CMakeLists.txt b/examples/widgets/painting/affine/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..948456d821
--- /dev/null
+++ b/examples/widgets/painting/affine/.prev_CMakeLists.txt
@@ -0,0 +1,215 @@
+# Generated from affine.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(affine LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(affine
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ main.cpp
+ xform.cpp xform.h
+)
+target_include_directories(affine PUBLIC
+ ../shared
+)
+
+target_link_libraries(affine PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(affine "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(affine_resource_files
+ "bg1.jpg"
+ "xform.cpp"
+ "xform.html"
+)
+
+qt6_add_resources(affine "affine"
+ PREFIX
+ "/res/affine"
+ FILES
+ ${affine_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(affine PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(affine PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS affine
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index f526cffb77..56e862d20f 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -9,24 +9,204 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(affine
# special case: remove files from ../shared
- affine.qrc
main.cpp
xform.cpp xform.h
)
target_include_directories(affine PUBLIC
../shared
)
+
target_link_libraries(affine PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(affine "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(affine_resource_files
+ "bg1.jpg"
+ "xform.cpp"
+ "xform.html"
+)
+
+qt6_add_resources(affine "affine"
+ PREFIX
+ "/res/affine"
+ FILES
+ ${affine_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(affine PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(affine PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS affine
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index cee7e48052..b7d4f0a24a 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/basicdrawing")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basicdrawing
- basicdrawing.qrc
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h
)
target_link_libraries(basicdrawing PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(basicdrawing_resource_files
+ "images/brick.png"
+ "images/qt-logo.png"
+)
+
+qt6_add_resources(basicdrawing "basicdrawing"
+ PREFIX
+ "/"
+ FILES
+ ${basicdrawing_resource_files}
+)
+
install(TARGETS basicdrawing
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/composition/.prev_CMakeLists.txt b/examples/widgets/painting/composition/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c5b1d12e4a
--- /dev/null
+++ b/examples/widgets/painting/composition/.prev_CMakeLists.txt
@@ -0,0 +1,216 @@
+# Generated from composition.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(composition LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(composition
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ composition.cpp composition.h
+ main.cpp
+)
+target_include_directories(composition PUBLIC
+ ../shared
+)
+
+target_link_libraries(composition PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(composition "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(composition_resource_files
+ "composition.cpp"
+ "composition.html"
+ "flower.jpg"
+ "flower_alpha.jpg"
+)
+
+qt6_add_resources(composition "composition"
+ PREFIX
+ "/res/composition"
+ FILES
+ ${composition_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(composition PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(composition PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS composition
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index b971f32052..89e356b7ae 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -9,23 +9,205 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(composition
# special case: remove files from ../shared
- composition.cpp composition.h composition.qrc
+ composition.cpp composition.h
main.cpp
)
target_include_directories(composition PUBLIC
../shared
)
+
target_link_libraries(composition PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(composition "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(composition_resource_files
+ "composition.cpp"
+ "composition.html"
+ "flower.jpg"
+ "flower_alpha.jpg"
+)
+
+qt6_add_resources(composition "composition"
+ PREFIX
+ "/res/composition"
+ FILES
+ ${composition_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(composition PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(composition PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS composition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index d01d7db607..44d907f12f 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/concentriccircles")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(concentriccircles
@@ -19,6 +21,8 @@ add_qt_gui_executable(concentriccircles
window.cpp window.h
)
target_link_libraries(concentriccircles PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/painting/deform/.prev_CMakeLists.txt b/examples/widgets/painting/deform/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4a223487ab
--- /dev/null
+++ b/examples/widgets/painting/deform/.prev_CMakeLists.txt
@@ -0,0 +1,214 @@
+# Generated from deform.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(deform LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(deform
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ main.cpp
+ pathdeform.cpp pathdeform.h
+)
+target_include_directories(deform PUBLIC
+ ../shared
+)
+
+target_link_libraries(deform PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(deform "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(deform_resource_files
+ "pathdeform.cpp"
+ "pathdeform.html"
+)
+
+qt6_add_resources(deform "deform"
+ PREFIX
+ "/res/deform"
+ FILES
+ ${deform_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(deform PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(deform PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS deform
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index d3ce6bb06d..79c14d2196 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -9,24 +9,203 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(deform
# special case: remove files from ../shared
- deform.qrc
main.cpp
pathdeform.cpp pathdeform.h
)
target_include_directories(deform PUBLIC
../shared
)
+
target_link_libraries(deform PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(deform "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(deform_resource_files
+ "pathdeform.cpp"
+ "pathdeform.html"
+)
+
+qt6_add_resources(deform "deform"
+ PREFIX
+ "/res/deform"
+ FILES
+ ${deform_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(deform PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(deform PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS deform
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index 701512198c..11ad8a3242 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/fontsampler")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(fontsampler
@@ -19,9 +21,17 @@ add_qt_gui_executable(fontsampler
mainwindowbase.ui
)
target_link_libraries(fontsampler PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(fontsampler PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS fontsampler
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/gradients/.prev_CMakeLists.txt b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f28694a96b
--- /dev/null
+++ b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
@@ -0,0 +1,214 @@
+# Generated from gradients.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(gradients LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(gradients
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ gradients.cpp gradients.h
+ main.cpp
+)
+target_include_directories(gradients PUBLIC
+ ../shared
+)
+
+target_link_libraries(gradients PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(gradients "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(gradients_resource_files
+ "gradients.cpp"
+ "gradients.html"
+)
+
+qt6_add_resources(gradients "gradients"
+ PREFIX
+ "/res/gradients"
+ FILES
+ ${gradients_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(gradients PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(gradients PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS gradients
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index c0f1924e33..0b6c06e5b9 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -9,23 +9,203 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(gradients
# special case: remove files from ../shared
- gradients.cpp gradients.h gradients.qrc
+ gradients.cpp gradients.h
main.cpp
)
target_include_directories(gradients PUBLIC
../shared
)
+
target_link_libraries(gradients PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(gradients "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(gradients_resource_files
+ "gradients.cpp"
+ "gradients.html"
+)
+
+qt6_add_resources(gradients "gradients"
+ PREFIX
+ "/res/gradients"
+ FILES
+ ${gradients_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(gradients PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(gradients PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS gradients
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index f6ff7eb2e5..1b3d06da8f 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -9,19 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/imagecomposition")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(imagecomposition
imagecomposer.cpp imagecomposer.h
- imagecomposition.qrc
main.cpp
)
target_link_libraries(imagecomposition PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(imagecomposition_resource_files
+ "images/butterfly.png"
+ "images/checker.png"
+)
+
+qt6_add_resources(imagecomposition "imagecomposition"
+ PREFIX
+ "/"
+ FILES
+ ${imagecomposition_resource_files}
+)
+
install(TARGETS imagecomposition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 0631f5ed01..7ae6f0a016 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/painterpaths")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(painterpaths
@@ -19,9 +21,17 @@ add_qt_gui_executable(painterpaths
window.cpp window.h
)
target_link_libraries(painterpaths PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(painterpaths PUBLIC
+ m
+ )
+endif()
+
install(TARGETS painterpaths
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/shared/CMakeLists.txt b/examples/widgets/painting/shared/CMakeLists.txt
index 4b873962a6..4c7049e01d 100644
--- a/examples/widgets/painting/shared/CMakeLists.txt
+++ b/examples/widgets/painting/shared/CMakeLists.txt
@@ -12,9 +12,6 @@ target_sources(painting_shared PRIVATE
target_link_libraries(painting_shared PUBLIC Qt::Widgets)
target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
-qt6_add_resources(res_files shared.qrc)
-target_sources(painting_shared PRIVATE ${res_files})
-
## Scopes:
#####################################################################
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index af50385877..b5725967ea 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/transformations")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(transformations
@@ -19,6 +21,8 @@ add_qt_gui_executable(transformations
window.cpp window.h
)
target_link_libraries(transformations PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)