Create a space module

This commit is contained in:
James Graham
2025-04-16 18:30:52 +01:00
parent 4aec891b1f
commit e787eaabcd
10 changed files with 27 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ add_subdirectory(libneochat)
add_subdirectory(login)
add_subdirectory(rooms)
add_subdirectory(timeline)
add_subdirectory(spaces)
add_library(neochat STATIC
controller.cpp
@@ -19,12 +20,6 @@ add_library(neochat STATIC
roommanager.h
models/userfiltermodel.cpp
models/userfiltermodel.h
models/spacechildrenmodel.cpp
models/spacechildrenmodel.h
models/spacechildsortfiltermodel.cpp
models/spacechildsortfiltermodel.h
models/spacetreeitem.cpp
models/spacetreeitem.h
models/userdirectorylistmodel.cpp
models/userdirectorylistmodel.h
notificationsmanager.cpp
@@ -132,8 +127,6 @@ ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
qml/RoomInformation.qml
qml/RoomMedia.qml
qml/ChooseRoomDialog.qml
qml/SpaceHomePage.qml
qml/SpaceHierarchyDelegate.qml
qml/RemoveChildDialog.qml
qml/SelectParentDialog.qml
qml/QrCodeMaximizeComponent.qml
@@ -167,6 +160,7 @@ ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
org.kde.neochat.libneochat
org.kde.neochat.rooms
org.kde.neochat.timeline
org.kde.neochat.spaces
org.kde.neochat.settings
org.kde.neochat.devtools
org.kde.neochat.login
@@ -234,7 +228,7 @@ else()
endif()
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin devtoolsplugin Loginplugin chatbarplugin)
target_link_libraries(neochat PRIVATE Settingsplugin Roomsplugin Timelineplugin Spacesplugin devtoolsplugin Loginplugin chatbarplugin)
target_link_libraries(neochat PUBLIC
LibNeoChat
Timeline
@@ -258,6 +252,7 @@ target_link_libraries(neochat PUBLIC
QuotientQt6
Login
Rooms
Spaces
)
if (TARGET KF6::Crash)

23
src/spaces/CMakeLists.txt Normal file
View File

@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
# SPDX-License-Identifier: BSD-2-Clause
qt_add_library(Spaces STATIC)
ecm_add_qml_module(Spaces GENERATE_PLUGIN_SOURCE
URI org.kde.neochat.spaces
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/spaces
QML_FILES
SpaceHomePage.qml
SpaceHierarchyDelegate.qml
SOURCES
models/spacechildrenmodel.cpp
models/spacechildsortfiltermodel.cpp
models/spacetreeitem.cpp
)
target_include_directories(Spaces PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
target_link_libraries(Spaces PRIVATE
Qt::Core
Qt::Quick
KF6::Kirigami
LibNeoChat
)