delegatesizehelper updates

Make `DelegateSizeHelper` take a `QQuickItem` rather than a width value and move `TimelineDelegate` to use it rather than duplicting the code.

This requires the creation of `LibNeoChat` so that both the main and timeline modules can get access to the class.

Note: ideally more stuff will go into `LibNeoChat` but it turns out our dependencies are kinda spaghetti like and so will take some untangling.
This commit is contained in:
James Graham
2025-04-03 15:24:31 +00:00
parent f026e4e5ed
commit 054f87cae2
12 changed files with 214 additions and 172 deletions

View File

@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
add_library(LibNeoChat STATIC)
target_sources(LibNeoChat PRIVATE
delegatesizehelper.cpp
)
ecm_add_qml_module(LibNeoChat GENERATE_PLUGIN_SOURCE
URI org.kde.neochat.libneochat
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/libneochat
)
generate_export_header(LibNeoChat BASE_NAME LibNeoChat)
target_link_libraries(LibNeoChat PUBLIC
Qt::Core
Qt::Quick
)