diff options
Diffstat (limited to 'examples/widgets/animation')
-rw-r--r-- | examples/widgets/animation/CMakeLists.txt | 8 | ||||
-rw-r--r-- | examples/widgets/animation/animatedtiles/CMakeLists.txt | 50 | ||||
-rw-r--r-- | examples/widgets/animation/easing/CMakeLists.txt | 47 | ||||
-rw-r--r-- | examples/widgets/animation/easing/window.cpp | 8 | ||||
-rw-r--r-- | examples/widgets/animation/moveblocks/CMakeLists.txt | 31 | ||||
-rw-r--r-- | examples/widgets/animation/states/CMakeLists.txt | 49 | ||||
-rw-r--r-- | examples/widgets/animation/stickman/CMakeLists.txt | 53 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt | 192 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/CMakeLists.txt | 193 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/mainwindow.cpp | 13 | ||||
-rw-r--r-- | examples/widgets/animation/sub-attaq/sub-attaq.pro | 1 |
11 files changed, 627 insertions, 18 deletions
diff --git a/examples/widgets/animation/CMakeLists.txt b/examples/widgets/animation/CMakeLists.txt new file mode 100644 index 0000000000..15f62728da --- /dev/null +++ b/examples/widgets/animation/CMakeLists.txt @@ -0,0 +1,8 @@ +# Generated from animation.pro. + +add_subdirectory(animatedtiles) +add_subdirectory(easing) +add_subdirectory(moveblocks) +add_subdirectory(states) +add_subdirectory(stickman) +add_subdirectory(sub-attaq) diff --git a/examples/widgets/animation/animatedtiles/CMakeLists.txt b/examples/widgets/animation/animatedtiles/CMakeLists.txt new file mode 100644 index 0000000000..b8755a3321 --- /dev/null +++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt @@ -0,0 +1,50 @@ +# Generated from animatedtiles.pro. + +cmake_minimum_required(VERSION 3.14) +project(animatedtiles 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/animation/animatedtiles") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(animatedtiles + main.cpp +) +target_link_libraries(animatedtiles PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(animatedtiles_resource_files + "images/Time-For-Lunch-2.jpg" + "images/centered.png" + "images/ellipse.png" + "images/figure8.png" + "images/kinetic.png" + "images/random.png" + "images/tile.png" +) + +qt6_add_resources(animatedtiles "animatedtiles" + PREFIX + "/" + FILES + ${animatedtiles_resource_files} +) + +install(TARGETS animatedtiles + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt new file mode 100644 index 0000000000..6b09e45cff --- /dev/null +++ b/examples/widgets/animation/easing/CMakeLists.txt @@ -0,0 +1,47 @@ +# Generated from easing.pro. + +cmake_minimum_required(VERSION 3.14) +project(easing 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/animation/easing") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(easing + animation.h + form.ui + main.cpp + window.cpp window.h +) +target_link_libraries(easing PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(easing_resource_files + "images/qt-logo.png" +) + +qt6_add_resources(easing "easing" + PREFIX + "/" + FILES + ${easing_resource_files} +) + +install(TARGETS easing + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp index 378af07535..7b4fe1d912 100644 --- a/examples/widgets/animation/easing/window.cpp +++ b/examples/widgets/animation/easing/window.cpp @@ -67,13 +67,13 @@ Window::Window(QWidget *parent) connect(m_ui.easingCurvePicker, &QListWidget::currentRowChanged, this, &Window::curveChanged); - connect(m_ui.buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked), + connect(m_ui.buttonGroup, &QButtonGroup::buttonClicked, this, &Window::pathChanged); - connect(m_ui.periodSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + connect(m_ui.periodSpinBox, &QDoubleSpinBox::valueChanged, this, &Window::periodChanged); - connect(m_ui.amplitudeSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + connect(m_ui.amplitudeSpinBox, &QDoubleSpinBox::valueChanged, this, &Window::amplitudeChanged); - connect(m_ui.overshootSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + connect(m_ui.overshootSpinBox, &QDoubleSpinBox::valueChanged, this, &Window::overshootChanged); createCurveIcons(); diff --git a/examples/widgets/animation/moveblocks/CMakeLists.txt b/examples/widgets/animation/moveblocks/CMakeLists.txt new file mode 100644 index 0000000000..c5219c9e6a --- /dev/null +++ b/examples/widgets/animation/moveblocks/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from moveblocks.pro. + +cmake_minimum_required(VERSION 3.14) +project(moveblocks 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/animation/moveblocks") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(moveblocks + main.cpp +) +target_link_libraries(moveblocks PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS moveblocks + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt new file mode 100644 index 0000000000..cddcc6a7a3 --- /dev/null +++ b/examples/widgets/animation/states/CMakeLists.txt @@ -0,0 +1,49 @@ +# Generated from states.pro. + +cmake_minimum_required(VERSION 3.14) +project(states 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/animation/states") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(states + main.cpp +) +target_link_libraries(states PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(states_resource_files + "accessories-dictionary.png" + "akregator.png" + "digikam.png" + "help-browser.png" + "k3b.png" + "kchart.png" +) + +qt6_add_resources(states "states" + PREFIX + "/" + FILES + ${states_resource_files} +) + +install(TARGETS states + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/stickman/CMakeLists.txt b/examples/widgets/animation/stickman/CMakeLists.txt new file mode 100644 index 0000000000..791e685fc2 --- /dev/null +++ b/examples/widgets/animation/stickman/CMakeLists.txt @@ -0,0 +1,53 @@ +# Generated from stickman.pro. + +cmake_minimum_required(VERSION 3.14) +project(stickman 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/animation/stickman") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(stickman + animation.cpp animation.h + graphicsview.cpp graphicsview.h + lifecycle.cpp lifecycle.h + main.cpp + node.cpp node.h + rectbutton.cpp rectbutton.h + stickman.cpp stickman.h +) +target_link_libraries(stickman PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(stickman_resource_files + "animations/chilling.bin" + "animations/dancing.bin" + "animations/dead.bin" + "animations/jumping.bin" +) + +qt6_add_resources(stickman "stickman" + PREFIX + "/" + FILES + ${stickman_resource_files} +) + +install(TARGETS stickman + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt new file mode 100644 index 0000000000..74f095f4f6 --- /dev/null +++ b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt @@ -0,0 +1,192 @@ +# Generated from sub-attaq.pro. + +cmake_minimum_required(VERSION 3.14) +project(sub-attaq 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/animation/sub-attaq") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(sub-attaq + animationmanager.cpp animationmanager.h + boat.cpp boat.h boat_p.h + bomb.cpp bomb.h + graphicsscene.cpp graphicsscene.h + main.cpp + mainwindow.cpp mainwindow.h + pixmapitem.cpp pixmapitem.h + progressitem.cpp progressitem.h + qanimationstate.cpp qanimationstate.h + states.cpp states.h + submarine.cpp submarine.h submarine_p.h + textinformationitem.cpp textinformationitem.h + torpedo.cpp torpedo.h +) +target_link_libraries(sub-attaq PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set_source_files_properties("pics/big/background.png" + PROPERTIES QT_RESOURCE_ALIAS "big/background" +) +set_source_files_properties("pics/big/boat.png" + PROPERTIES QT_RESOURCE_ALIAS "big/boat" +) +set_source_files_properties("pics/big/bomb.png" + PROPERTIES QT_RESOURCE_ALIAS "big/bomb" +) +set_source_files_properties("pics/big/explosion/boat/step1.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step1" +) +set_source_files_properties("pics/big/explosion/boat/step2.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step2" +) +set_source_files_properties("pics/big/explosion/boat/step3.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step3" +) +set_source_files_properties("pics/big/explosion/boat/step4.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step4" +) +set_source_files_properties("pics/big/explosion/submarine/step1.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step1" +) +set_source_files_properties("pics/big/explosion/submarine/step2.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step2" +) +set_source_files_properties("pics/big/explosion/submarine/step3.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step3" +) +set_source_files_properties("pics/big/explosion/submarine/step4.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step4" +) +set_source_files_properties("pics/big/submarine.png" + PROPERTIES QT_RESOURCE_ALIAS "big/submarine" +) +set_source_files_properties("pics/big/surface.png" + PROPERTIES QT_RESOURCE_ALIAS "big/surface" +) +set_source_files_properties("pics/big/torpedo.png" + PROPERTIES QT_RESOURCE_ALIAS "big/torpedo" +) +set_source_files_properties("pics/scalable/boat.svg" + PROPERTIES QT_RESOURCE_ALIAS "boat" +) +set_source_files_properties("pics/scalable/sub-attaq.svg" + PROPERTIES QT_RESOURCE_ALIAS "all" +) +set_source_files_properties("pics/scalable/submarine.svg" + PROPERTIES QT_RESOURCE_ALIAS "submarine" +) +set_source_files_properties("pics/scalable/torpedo.svg" + PROPERTIES QT_RESOURCE_ALIAS "torpedo" +) +set_source_files_properties("pics/small/background.png" + PROPERTIES QT_RESOURCE_ALIAS "small/background" +) +set_source_files_properties("pics/small/boat.png" + PROPERTIES QT_RESOURCE_ALIAS "small/boat" +) +set_source_files_properties("pics/small/bomb.png" + PROPERTIES QT_RESOURCE_ALIAS "small/bomb" +) +set_source_files_properties("pics/small/submarine.png" + PROPERTIES QT_RESOURCE_ALIAS "small/submarine" +) +set_source_files_properties("pics/small/surface.png" + PROPERTIES QT_RESOURCE_ALIAS "small/surface" +) +set_source_files_properties("pics/small/torpedo.png" + PROPERTIES QT_RESOURCE_ALIAS "small/torpedo" +) +set_source_files_properties("pics/welcome/logo-a.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-a" +) +set_source_files_properties("pics/welcome/logo-a2.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-a2" +) +set_source_files_properties("pics/welcome/logo-b.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-b" +) +set_source_files_properties("pics/welcome/logo-dash.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-dash" +) +set_source_files_properties("pics/welcome/logo-excl.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-excl" +) +set_source_files_properties("pics/welcome/logo-q.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-q" +) +set_source_files_properties("pics/welcome/logo-s.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-s" +) +set_source_files_properties("pics/welcome/logo-t.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-t" +) +set_source_files_properties("pics/welcome/logo-t2.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-t2" +) +set_source_files_properties("pics/welcome/logo-u.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-u" +) +set(subattaq_resource_files + "data.xml" + "pics/big/background.png" + "pics/big/boat.png" + "pics/big/bomb.png" + "pics/big/explosion/boat/step1.png" + "pics/big/explosion/boat/step2.png" + "pics/big/explosion/boat/step3.png" + "pics/big/explosion/boat/step4.png" + "pics/big/explosion/submarine/step1.png" + "pics/big/explosion/submarine/step2.png" + "pics/big/explosion/submarine/step3.png" + "pics/big/explosion/submarine/step4.png" + "pics/big/submarine.png" + "pics/big/surface.png" + "pics/big/torpedo.png" + "pics/scalable/boat.svg" + "pics/scalable/sub-attaq.svg" + "pics/scalable/submarine.svg" + "pics/scalable/torpedo.svg" + "pics/small/background.png" + "pics/small/boat.png" + "pics/small/bomb.png" + "pics/small/submarine.png" + "pics/small/surface.png" + "pics/small/torpedo.png" + "pics/welcome/logo-a.png" + "pics/welcome/logo-a2.png" + "pics/welcome/logo-b.png" + "pics/welcome/logo-dash.png" + "pics/welcome/logo-excl.png" + "pics/welcome/logo-q.png" + "pics/welcome/logo-s.png" + "pics/welcome/logo-t.png" + "pics/welcome/logo-t2.png" + "pics/welcome/logo-u.png" +) + +qt6_add_resources(sub-attaq "subattaq" + PREFIX + "/" + FILES + ${subattaq_resource_files} +) + +install(TARGETS sub-attaq + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt new file mode 100644 index 0000000000..2e4e455b34 --- /dev/null +++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt @@ -0,0 +1,193 @@ +# Generated from sub-attaq.pro. + +cmake_minimum_required(VERSION 3.14) +project(sub-attaq 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/animation/sub-attaq") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS OpenGL) # special case + +add_qt_gui_executable(sub-attaq + animationmanager.cpp animationmanager.h + boat.cpp boat.h boat_p.h + bomb.cpp bomb.h + graphicsscene.cpp graphicsscene.h + main.cpp + mainwindow.cpp mainwindow.h + pixmapitem.cpp pixmapitem.h + progressitem.cpp progressitem.h + qanimationstate.cpp qanimationstate.h + states.cpp states.h + submarine.cpp submarine.h submarine_p.h + textinformationitem.cpp textinformationitem.h + torpedo.cpp torpedo.h +) +target_link_libraries(sub-attaq PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set_source_files_properties("pics/big/background.png" + PROPERTIES QT_RESOURCE_ALIAS "big/background" +) +set_source_files_properties("pics/big/boat.png" + PROPERTIES QT_RESOURCE_ALIAS "big/boat" +) +set_source_files_properties("pics/big/bomb.png" + PROPERTIES QT_RESOURCE_ALIAS "big/bomb" +) +set_source_files_properties("pics/big/explosion/boat/step1.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step1" +) +set_source_files_properties("pics/big/explosion/boat/step2.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step2" +) +set_source_files_properties("pics/big/explosion/boat/step3.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step3" +) +set_source_files_properties("pics/big/explosion/boat/step4.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step4" +) +set_source_files_properties("pics/big/explosion/submarine/step1.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step1" +) +set_source_files_properties("pics/big/explosion/submarine/step2.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step2" +) +set_source_files_properties("pics/big/explosion/submarine/step3.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step3" +) +set_source_files_properties("pics/big/explosion/submarine/step4.png" + PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step4" +) +set_source_files_properties("pics/big/submarine.png" + PROPERTIES QT_RESOURCE_ALIAS "big/submarine" +) +set_source_files_properties("pics/big/surface.png" + PROPERTIES QT_RESOURCE_ALIAS "big/surface" +) +set_source_files_properties("pics/big/torpedo.png" + PROPERTIES QT_RESOURCE_ALIAS "big/torpedo" +) +set_source_files_properties("pics/scalable/boat.svg" + PROPERTIES QT_RESOURCE_ALIAS "boat" +) +set_source_files_properties("pics/scalable/sub-attaq.svg" + PROPERTIES QT_RESOURCE_ALIAS "all" +) +set_source_files_properties("pics/scalable/submarine.svg" + PROPERTIES QT_RESOURCE_ALIAS "submarine" +) +set_source_files_properties("pics/scalable/torpedo.svg" + PROPERTIES QT_RESOURCE_ALIAS "torpedo" +) +set_source_files_properties("pics/small/background.png" + PROPERTIES QT_RESOURCE_ALIAS "small/background" +) +set_source_files_properties("pics/small/boat.png" + PROPERTIES QT_RESOURCE_ALIAS "small/boat" +) +set_source_files_properties("pics/small/bomb.png" + PROPERTIES QT_RESOURCE_ALIAS "small/bomb" +) +set_source_files_properties("pics/small/submarine.png" + PROPERTIES QT_RESOURCE_ALIAS "small/submarine" +) +set_source_files_properties("pics/small/surface.png" + PROPERTIES QT_RESOURCE_ALIAS "small/surface" +) +set_source_files_properties("pics/small/torpedo.png" + PROPERTIES QT_RESOURCE_ALIAS "small/torpedo" +) +set_source_files_properties("pics/welcome/logo-a.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-a" +) +set_source_files_properties("pics/welcome/logo-a2.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-a2" +) +set_source_files_properties("pics/welcome/logo-b.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-b" +) +set_source_files_properties("pics/welcome/logo-dash.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-dash" +) +set_source_files_properties("pics/welcome/logo-excl.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-excl" +) +set_source_files_properties("pics/welcome/logo-q.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-q" +) +set_source_files_properties("pics/welcome/logo-s.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-s" +) +set_source_files_properties("pics/welcome/logo-t.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-t" +) +set_source_files_properties("pics/welcome/logo-t2.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-t2" +) +set_source_files_properties("pics/welcome/logo-u.png" + PROPERTIES QT_RESOURCE_ALIAS "logo-u" +) +set(subattaq_resource_files + "data.xml" + "pics/big/background.png" + "pics/big/boat.png" + "pics/big/bomb.png" + "pics/big/explosion/boat/step1.png" + "pics/big/explosion/boat/step2.png" + "pics/big/explosion/boat/step3.png" + "pics/big/explosion/boat/step4.png" + "pics/big/explosion/submarine/step1.png" + "pics/big/explosion/submarine/step2.png" + "pics/big/explosion/submarine/step3.png" + "pics/big/explosion/submarine/step4.png" + "pics/big/submarine.png" + "pics/big/surface.png" + "pics/big/torpedo.png" + "pics/scalable/boat.svg" + "pics/scalable/sub-attaq.svg" + "pics/scalable/submarine.svg" + "pics/scalable/torpedo.svg" + "pics/small/background.png" + "pics/small/boat.png" + "pics/small/bomb.png" + "pics/small/submarine.png" + "pics/small/surface.png" + "pics/small/torpedo.png" + "pics/welcome/logo-a.png" + "pics/welcome/logo-a2.png" + "pics/welcome/logo-b.png" + "pics/welcome/logo-dash.png" + "pics/welcome/logo-excl.png" + "pics/welcome/logo-q.png" + "pics/welcome/logo-s.png" + "pics/welcome/logo-t.png" + "pics/welcome/logo-t2.png" + "pics/welcome/logo-u.png" +) + +qt6_add_resources(sub-attaq "subattaq" + PREFIX + "/" + FILES + ${subattaq_resource_files} +) + +install(TARGETS sub-attaq + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/animation/sub-attaq/mainwindow.cpp b/examples/widgets/animation/sub-attaq/mainwindow.cpp index f9617a22eb..0c152c9180 100644 --- a/examples/widgets/animation/sub-attaq/mainwindow.cpp +++ b/examples/widgets/animation/sub-attaq/mainwindow.cpp @@ -59,10 +59,6 @@ #include <QMenuBar> #include <QLayout> -#ifndef QT_NO_OPENGL -# include <QtOpenGL> -#endif - MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { @@ -84,14 +80,5 @@ MainWindow::MainWindow(QWidget *parent) view = new QGraphicsView(scene, this); view->setAlignment(Qt::AlignLeft | Qt::AlignTop); scene->setupScene(newAction, quitAction); -#ifndef QT_NO_OPENGL - QGLWidget *glWidget = new QGLWidget(QGLFormat(QGL::SampleBuffers)); - if (glWidget->context()->isValid()) { - view->setViewport(glWidget); - } else { - qWarning("Unable to create an Open GL context with sample buffers, not using Open GL."); - delete glWidget; - } -#endif setCentralWidget(view); } diff --git a/examples/widgets/animation/sub-attaq/sub-attaq.pro b/examples/widgets/animation/sub-attaq/sub-attaq.pro index ac79fd4249..ea44253fa1 100644 --- a/examples/widgets/animation/sub-attaq/sub-attaq.pro +++ b/examples/widgets/animation/sub-attaq/sub-attaq.pro @@ -1,5 +1,4 @@ QT += widgets -qtHaveModule(opengl): QT += opengl HEADERS += boat.h \ bomb.h \ mainwindow.h \ |