diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-01-31 11:43:22 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-02-03 15:01:53 +0000 |
commit | 4e7af2061e8c323b2a21f0549643a2cfab191664 (patch) | |
tree | 54c6046915aee4a91eb6178183c022b8e547d244 /examples/widgets/itemviews | |
parent | 6251963ecd26bfc480b2871e26b6df4d7ab88cee (diff) | |
parent | 3f386095adc6c280008c7e811e88f0215f1d862f (diff) |
Merge remote-tracking branch 'origin/wip/cmake' into dev
This pulls the CMake port, which not only adds CMake files but also
modifies existing code. A brief summary of "seemingly unrelated" changes:
* configure.json was re-formatted to not use multi-line strings. That
is an extension of the Qt JSON parser but not JSON compliant, which
is needed for the configure.json-to-cmake conversion script (python).
* Some moc inclusions were added due to CMake's slightly different way
of handling moc. With the changes the files build with qmake and cmake.
* Since CMake just grep's for the Q_OBJECT macro to determine whether to
call moc (instead of doing pre-processing like qmake), the existing use
of "Q_OBJECT" in our documentation was changed to \Q_OBJECT, which cmake
doesn't see and which is now a qdoc macro.
* QTestLib's qFindTestData was extended to also search in the source
directory known at build time.
What this change also brings is a new way of building modules in Coin by using
YAML configuration files that describe the steps of building and testing in Coin
specific terms. The platform configuration files in qt5 are instructed to use the
old Coin built-in way of testing ("UseLegacyInstructions" feature) but for any
configurations that do not have this, these yaml files in the coin/ sub-directory
are used and shared across repositories.
Change-Id: I1d832c3400e8d6945ad787024ba60e7440225c08
Diffstat (limited to 'examples/widgets/itemviews')
22 files changed, 662 insertions, 0 deletions
diff --git a/examples/widgets/itemviews/CMakeLists.txt b/examples/widgets/itemviews/CMakeLists.txt new file mode 100644 index 0000000000..a1bd0c4dca --- /dev/null +++ b/examples/widgets/itemviews/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from itemviews.pro. + +add_subdirectory(addressbook) +add_subdirectory(basicsortfiltermodel) +add_subdirectory(chart) +add_subdirectory(coloreditorfactory) +add_subdirectory(combowidgetmapper) +add_subdirectory(customsortfiltermodel) +add_subdirectory(dirview) +add_subdirectory(editabletreemodel) +add_subdirectory(fetchmore) +add_subdirectory(flattreeview) +add_subdirectory(frozencolumn) +add_subdirectory(interview) +add_subdirectory(pixelator) +if(QT_FEATURE_draganddrop) # special case + add_subdirectory(puzzle) +endif() +if(TARGET Qt::Xml) # special case + add_subdirectory(simpledommodel) +endif() +add_subdirectory(simpletreemodel) +add_subdirectory(simplewidgetmapper) +add_subdirectory(spinboxdelegate) +add_subdirectory(spreadsheet) +add_subdirectory(stardelegate) +add_subdirectory(storageview) diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt new file mode 100644 index 0000000000..eeb4ad23d7 --- /dev/null +++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from addressbook.pro. + +cmake_minimum_required(VERSION 3.14) +project(addressbook LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(addressbook + adddialog.cpp adddialog.h + addresswidget.cpp addresswidget.h + main.cpp + mainwindow.cpp mainwindow.h + newaddresstab.cpp newaddresstab.h + tablemodel.cpp tablemodel.h +) +target_link_libraries(addressbook PUBLIC + Qt::Widgets +) + +install(TARGETS addressbook + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt new file mode 100644 index 0000000000..ee084edab6 --- /dev/null +++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from basicsortfiltermodel.pro. + +cmake_minimum_required(VERSION 3.14) +project(basicsortfiltermodel LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(basicsortfiltermodel + main.cpp + window.cpp window.h +) +target_link_libraries(basicsortfiltermodel PUBLIC + Qt::Widgets +) + +install(TARGETS basicsortfiltermodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt new file mode 100644 index 0000000000..89cac1f515 --- /dev/null +++ b/examples/widgets/itemviews/chart/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from chart.pro. + +cmake_minimum_required(VERSION 3.14) +project(chart LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(chart + chart.qrc + main.cpp + mainwindow.cpp mainwindow.h + pieview.cpp pieview.h +) +target_link_libraries(chart PUBLIC + Qt::Widgets +) + +install(TARGETS chart + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt new file mode 100644 index 0000000000..b665171ddb --- /dev/null +++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from coloreditorfactory.pro. + +cmake_minimum_required(VERSION 3.14) +project(coloreditorfactory LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(coloreditorfactory + colorlisteditor.cpp colorlisteditor.h + main.cpp + window.cpp window.h +) +target_link_libraries(coloreditorfactory PUBLIC + Qt::Widgets +) + +install(TARGETS coloreditorfactory + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt new file mode 100644 index 0000000000..af806ceb64 --- /dev/null +++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from combowidgetmapper.pro. + +cmake_minimum_required(VERSION 3.14) +project(combowidgetmapper LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(combowidgetmapper + main.cpp + window.cpp window.h +) +target_link_libraries(combowidgetmapper PUBLIC + Qt::Widgets +) + +install(TARGETS combowidgetmapper + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt new file mode 100644 index 0000000000..c5110ba8b3 --- /dev/null +++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from customsortfiltermodel.pro. + +cmake_minimum_required(VERSION 3.14) +project(customsortfiltermodel LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(customsortfiltermodel + customsortfiltermodel.qrc + filterwidget.cpp filterwidget.h + main.cpp + mysortfilterproxymodel.cpp mysortfilterproxymodel.h + window.cpp window.h +) +target_link_libraries(customsortfiltermodel PUBLIC + Qt::Widgets +) + +install(TARGETS customsortfiltermodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt new file mode 100644 index 0000000000..3875436371 --- /dev/null +++ b/examples/widgets/itemviews/dirview/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from dirview.pro. + +cmake_minimum_required(VERSION 3.14) +project(dirview LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(dirview + main.cpp +) +target_link_libraries(dirview PUBLIC + Qt::Widgets +) + +install(TARGETS dirview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt new file mode 100644 index 0000000000..c9f46d9e6a --- /dev/null +++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from editabletreemodel.pro. + +cmake_minimum_required(VERSION 3.14) +project(editabletreemodel LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(editabletreemodel + editabletreemodel.qrc + main.cpp + mainwindow.cpp mainwindow.h mainwindow.ui + treeitem.cpp treeitem.h + treemodel.cpp treemodel.h +) +target_link_libraries(editabletreemodel PUBLIC + Qt::Widgets +) + +install(TARGETS editabletreemodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt new file mode 100644 index 0000000000..dded651b57 --- /dev/null +++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from fetchmore.pro. + +cmake_minimum_required(VERSION 3.14) +project(fetchmore LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(fetchmore + filelistmodel.cpp filelistmodel.h + main.cpp + window.cpp window.h +) +target_link_libraries(fetchmore PUBLIC + Qt::Widgets +) + +install(TARGETS fetchmore + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt new file mode 100644 index 0000000000..5f9cd9d77c --- /dev/null +++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from flattreeview.pro. + +cmake_minimum_required(VERSION 3.14) +project(flattreeview LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(flattreeview + main.cpp +) +target_link_libraries(flattreeview PUBLIC + Qt::Widgets +) + +install(TARGETS flattreeview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt new file mode 100644 index 0000000000..8e2db43944 --- /dev/null +++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from frozencolumn.pro. + +cmake_minimum_required(VERSION 3.14) +project(frozencolumn LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(frozencolumn + freezetablewidget.cpp freezetablewidget.h + grades.qrc + main.cpp +) +target_link_libraries(frozencolumn PUBLIC + Qt::Widgets +) + +install(TARGETS frozencolumn + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt new file mode 100644 index 0000000000..d37ee8fe18 --- /dev/null +++ b/examples/widgets/itemviews/interview/CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from interview.pro. + +cmake_minimum_required(VERSION 3.14) +project(interview LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(interview + interview.qrc + main.cpp + model.cpp model.h +) +target_link_libraries(interview PUBLIC + Qt::Widgets +) + +install(TARGETS interview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt new file mode 100644 index 0000000000..dbb888a1b2 --- /dev/null +++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from pixelator.pro. + +cmake_minimum_required(VERSION 3.14) +project(pixelator LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS PrintSupport) # special case + +add_qt_gui_executable(pixelator + imagemodel.cpp imagemodel.h + images.qrc + main.cpp + mainwindow.cpp mainwindow.h + pixeldelegate.cpp pixeldelegate.h +) +target_link_libraries(pixelator PUBLIC + Qt::Widgets +) +if (TARGET Qt::PrintSupport) + target_link_libraries(pixelator PUBLIC + Qt::PrintSupport + ) +endif() + +install(TARGETS pixelator + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt new file mode 100644 index 0000000000..ed0b4f3f7c --- /dev/null +++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from puzzle.pro. + +cmake_minimum_required(VERSION 3.14) +project(puzzle LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(itemviews_puzzle # special case: renamed puzzle + main.cpp + mainwindow.cpp mainwindow.h + piecesmodel.cpp piecesmodel.h + puzzle.qrc + puzzlewidget.cpp puzzlewidget.h +) +target_link_libraries(itemviews_puzzle PUBLIC # special case: renamed puzzle + Qt::Widgets +) + +install(TARGETS itemviews_puzzle # special case: renamed puzzle + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt new file mode 100644 index 0000000000..610b7e2ff2 --- /dev/null +++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from simpledommodel.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpledommodel LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Xml) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(simpledommodel + domitem.cpp domitem.h + dommodel.cpp dommodel.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(simpledommodel PUBLIC + Qt::Widgets + Qt::Xml +) + +install(TARGETS simpledommodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt new file mode 100644 index 0000000000..7a1cafc26e --- /dev/null +++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from simpletreemodel.pro. + +cmake_minimum_required(VERSION 3.14) +project(simpletreemodel LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(simpletreemodel + main.cpp + simpletreemodel.qrc + treeitem.cpp treeitem.h + treemodel.cpp treemodel.h +) +target_link_libraries(simpletreemodel PUBLIC + Qt::Widgets +) + +install(TARGETS simpletreemodel + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt new file mode 100644 index 0000000000..367f24235b --- /dev/null +++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from simplewidgetmapper.pro. + +cmake_minimum_required(VERSION 3.14) +project(simplewidgetmapper LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(simplewidgetmapper + main.cpp + window.cpp window.h +) +target_link_libraries(simplewidgetmapper PUBLIC + Qt::Widgets +) + +install(TARGETS simplewidgetmapper + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt new file mode 100644 index 0000000000..0c08a1bbba --- /dev/null +++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from spinboxdelegate.pro. + +cmake_minimum_required(VERSION 3.14) +project(spinboxdelegate LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(spinboxdelegate + delegate.cpp delegate.h + main.cpp +) +target_link_libraries(spinboxdelegate PUBLIC + Qt::Widgets +) + +install(TARGETS spinboxdelegate + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt new file mode 100644 index 0000000000..7916d07a4d --- /dev/null +++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from spreadsheet.pro. + +cmake_minimum_required(VERSION 3.14) +project(spreadsheet LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) +find_package(Qt6 COMPONENTS PrintSupport) # special case + +add_qt_gui_executable(spreadsheet + main.cpp + printview.cpp printview.h + spreadsheet.cpp spreadsheet.h spreadsheet.qrc + spreadsheetdelegate.cpp spreadsheetdelegate.h + spreadsheetitem.cpp spreadsheetitem.h +) +target_link_libraries(spreadsheet PUBLIC + Qt::Widgets +) +# special case begin +if (TARGET Qt::PrintSupport) + target_link_libraries(spreadsheet PUBLIC Qt::PrintSupport) +endif() +# special case end + +install(TARGETS spreadsheet + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt new file mode 100644 index 0000000000..da3a4a07b4 --- /dev/null +++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from stardelegate.pro. + +cmake_minimum_required(VERSION 3.14) +project(stardelegate LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(stardelegate + main.cpp + stardelegate.cpp stardelegate.h + stareditor.cpp stareditor.h + starrating.cpp starrating.h +) +target_link_libraries(stardelegate PUBLIC + Qt::Widgets +) + +install(TARGETS stardelegate + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt new file mode 100644 index 0000000000..06c8afc932 --- /dev/null +++ b/examples/widgets/itemviews/storageview/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from storageview.pro. + +cmake_minimum_required(VERSION 3.14) +project(storageview LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(storageview + main.cpp + storagemodel.cpp storagemodel.h +) +target_link_libraries(storageview PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS storageview + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) |