Skip to content

Commit c083745

Browse files
committed
feat(qt-integration): implement comprehensive Qt integration for modern UI
- Added a new Qt-based user interface for id Tech 3, enhancing the overall user experience with modern design elements. - Introduced various UI components including asset browser, console widget, and main menu, providing a cohesive interface for game management. - Implemented asset management tools, performance profiling, and mod management features, improving usability and functionality. - Enhanced CMake configuration to support Qt integration, allowing users to enable or disable features as needed. - Created detailed documentation outlining the new Qt integration system, including architecture and usage guidelines. This commit significantly modernizes the user interface and experience for id Tech 3, paving the way for future enhancements and community contributions.
1 parent 9da5dc2 commit c083745

17 files changed

Lines changed: 7281 additions & 8 deletions

CMakeLists.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4244,6 +4244,63 @@ ENDIF()
42444244
# Add include directories for q3ui
42454245
TARGET_INCLUDE_DIRECTORIES(q3ui PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/client)
42464246

4247+
# Qt Integration - Modern UI Development
4248+
OPTION(USE_QT "Enable Qt integration for modern UI" OFF)
4249+
IF(USE_QT)
4250+
FIND_PACKAGE(Qt6 REQUIRED COMPONENTS Core Widgets OpenGL Network Charts)
4251+
SET(CMAKE_AUTOMOC ON)
4252+
SET(CMAKE_AUTORCC ON)
4253+
SET(CMAKE_AUTOUIC ON)
4254+
4255+
FILE(GLOB QT_SRCS
4256+
"src/qt/*.cpp"
4257+
"src/qt/*.h"
4258+
"src/qt/*.qrc"
4259+
)
4260+
4261+
# Exclude launcher from main build (it's standalone)
4262+
LIST(FILTER QT_SRCS EXCLUDE REGEX ".*qt_launcher\\.cpp$")
4263+
4264+
IF(QT_SRCS)
4265+
# Add Qt integration to main engine
4266+
TARGET_SOURCES(${CMAKE_PROJECT_NAME} PRIVATE ${QT_SRCS})
4267+
4268+
TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME}
4269+
Qt6::Core
4270+
Qt6::Widgets
4271+
Qt6::OpenGL
4272+
Qt6::Network
4273+
Qt6::Charts
4274+
)
4275+
4276+
TARGET_COMPILE_DEFINITIONS(${CMAKE_PROJECT_NAME} PRIVATE QT_ENABLED)
4277+
TARGET_INCLUDE_DIRECTORIES(${CMAKE_PROJECT_NAME} PRIVATE src/qt)
4278+
4279+
# Create standalone Qt launcher
4280+
FILE(GLOB LAUNCHER_SRCS "src/qt/qt_launcher.cpp" "src/qt/idtech3_resources.qrc")
4281+
IF(LAUNCHER_SRCS)
4282+
ADD_EXECUTABLE(qt_launcher ${LAUNCHER_SRCS})
4283+
4284+
TARGET_LINK_LIBRARIES(qt_launcher
4285+
Qt6::Core
4286+
Qt6::Widgets
4287+
Qt6::Network
4288+
)
4289+
4290+
TARGET_COMPILE_DEFINITIONS(qt_launcher PRIVATE QT_STANDALONE)
4291+
TARGET_INCLUDE_DIRECTORIES(qt_launcher PRIVATE src/qt)
4292+
MESSAGE(STATUS "Qt launcher: enabled")
4293+
ENDIF()
4294+
4295+
MESSAGE(STATUS "Qt integration: enabled")
4296+
ELSE()
4297+
MESSAGE(WARNING "Qt integration requested but no source files found")
4298+
SET(USE_QT OFF)
4299+
ENDIF()
4300+
ELSE()
4301+
MESSAGE(STATUS "Qt integration: disabled")
4302+
ENDIF()
4303+
42474304
# UI2 - Deterministic UI/Layout System (C++23)
42484305
OPTION(USE_UI2 "Enable UI2 deterministic UI/layout system" OFF)
42494306
IF(USE_UI2)

0 commit comments

Comments
 (0)