Basic JSON RESTful client fetching items from a local server at application start and adding them to the model.

This commit is contained in:
2026-01-25 10:47:19 +01:00
parent e1bc779791
commit e29cd0aebf
8 changed files with 178 additions and 3 deletions

View File

@ -12,6 +12,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core LinguistTools)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core LinguistTools Gui)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Network)
configure_file(CoreConfig.h.in CoreConfig.h)
@ -32,16 +33,18 @@ add_library(${TARGET_APP} STATIC
data/filehandler.h data/filehandler.cpp
model/metadata.h
formats/csvparser.h formats/csvparser.cpp
model/generalsortfiltermodel.h model/generalsortfiltermodel.cpp
network/servercommunicator.h network/servercommunicator.cpp
network/apiroutes.h
# 3rd party libraries
../3rdParty/rapidcsv/src/rapidcsv.h
model/generalsortfiltermodel.h model/generalsortfiltermodel.cpp
)
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Test)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${TARGET_APP} PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui)
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Test)
target_link_libraries(GenericCore PRIVATE Qt${QT_VERSION_MAJOR}::Network)
target_compile_definitions(${TARGET_APP} PRIVATE ${TARGET_APP}_LIBRARY)