Split message content into its own module
This is laying some groundwork for the rich text chatbar.
@@ -9,6 +9,7 @@ add_subdirectory(libneochat)
|
||||
add_subdirectory(login)
|
||||
add_subdirectory(rooms)
|
||||
add_subdirectory(roominfo)
|
||||
add_subdirectory(messagecontent)
|
||||
add_subdirectory(timeline)
|
||||
add_subdirectory(spaces)
|
||||
add_subdirectory(chatbar)
|
||||
|
||||
@@ -108,6 +108,7 @@ ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
||||
org.kde.neochat.libneochat
|
||||
org.kde.neochat.rooms
|
||||
org.kde.neochat.roominfo
|
||||
org.kde.neochat.messagecontent
|
||||
org.kde.neochat.timeline
|
||||
org.kde.neochat.spaces
|
||||
org.kde.neochat.settings
|
||||
@@ -176,7 +177,7 @@ else()
|
||||
endif()
|
||||
|
||||
target_include_directories(neochat PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
|
||||
target_link_libraries(neochat PRIVATE Loginplugin Roomsplugin RoomInfoplugin Timelineplugin Spacesplugin Chatbarplugin Settingsplugin Devtoolsplugin)
|
||||
target_link_libraries(neochat PRIVATE Loginplugin Roomsplugin RoomInfoplugin MessageContentplugin Timelineplugin Spacesplugin Chatbarplugin Settingsplugin Devtoolsplugin)
|
||||
target_link_libraries(neochat PUBLIC
|
||||
LibNeoChat
|
||||
Timeline
|
||||
@@ -201,6 +202,7 @@ target_link_libraries(neochat PUBLIC
|
||||
QuotientQt6
|
||||
Login
|
||||
Rooms
|
||||
MessageContent
|
||||
Spaces
|
||||
)
|
||||
|
||||
|
||||
@@ -244,13 +244,6 @@ int main(int argc, char *argv[])
|
||||
LoginHelper::instance().setAccountManager(accountManager.get());
|
||||
Registration::instance().setAccountManager(accountManager.get());
|
||||
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_settingsPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_roomsPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_timelinePlugin)
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_devtoolsPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_loginPlugin)
|
||||
Q_IMPORT_QML_PLUGIN(org_kde_neochat_chatbarPlugin)
|
||||
|
||||
qml_register_types_org_kde_neochat();
|
||||
qmlRegisterUncreatableMetaObject(Quotient::staticMetaObject, "Quotient", 1, 0, "JoinRule", u"Access to JoinRule enum only"_s);
|
||||
|
||||
|
||||
107
src/messagecontent/CMakeLists.txt
Normal file
@@ -0,0 +1,107 @@
|
||||
# SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
qt_add_library(MessageContent STATIC)
|
||||
ecm_add_qml_module(MessageContent GENERATE_PLUGIN_SOURCE
|
||||
URI org.kde.neochat.messagecontent
|
||||
OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat/messagecontent
|
||||
QML_FILES
|
||||
BaseMessageComponentChooser.qml
|
||||
MessageComponentChooser.qml
|
||||
ReplyMessageComponentChooser.qml
|
||||
AuthorComponent.qml
|
||||
AudioComponent.qml
|
||||
ChatBarComponent.qml
|
||||
CodeComponent.qml
|
||||
EncryptedComponent.qml
|
||||
FetchButtonComponent.qml
|
||||
FileComponent.qml
|
||||
ImageComponent.qml
|
||||
ItineraryComponent.qml
|
||||
ItineraryReservationComponent.qml
|
||||
JourneySectionStopDelegateLineSegment.qml
|
||||
TransportIcon.qml
|
||||
FoodReservationComponent.qml
|
||||
TrainReservationComponent.qml
|
||||
FlightReservationComponent.qml
|
||||
HotelReservationComponent.qml
|
||||
LinkPreviewComponent.qml
|
||||
LinkPreviewLoadComponent.qml
|
||||
LiveLocationComponent.qml
|
||||
LoadComponent.qml
|
||||
LocationComponent.qml
|
||||
MimeComponent.qml
|
||||
PdfPreviewComponent.qml
|
||||
PollComponent.qml
|
||||
QuoteComponent.qml
|
||||
ReactionComponent.qml
|
||||
ReplyAuthorComponent.qml
|
||||
ReplyButtonComponent.qml
|
||||
ReplyComponent.qml
|
||||
StateComponent.qml
|
||||
TextComponent.qml
|
||||
ThreadBodyComponent.qml
|
||||
VideoComponent.qml
|
||||
SOURCES
|
||||
contentprovider.cpp
|
||||
mediasizehelper.cpp
|
||||
pollhandler.cpp
|
||||
models/itinerarymodel.cpp
|
||||
models/linemodel.cpp
|
||||
models/messagecontentmodel.cpp
|
||||
models/pollanswermodel.cpp
|
||||
models/reactionmodel.cpp
|
||||
models/threadmodel.cpp
|
||||
RESOURCES
|
||||
images/bike.svg
|
||||
images/bus.svg
|
||||
images/cablecar.svg
|
||||
images/car.svg
|
||||
images/coach.svg
|
||||
images/couchettecar.svg
|
||||
images/elevator.svg
|
||||
images/escalator.svg
|
||||
images/ferry.svg
|
||||
images/flight.svg
|
||||
images/foodestablishment.svg
|
||||
images/funicular.svg
|
||||
images/longdistancetrain.svg
|
||||
images/rapidtransit.svg
|
||||
images/seat.svg
|
||||
images/shuttle.svg
|
||||
images/sleepingcar.svg
|
||||
images/stairs.svg
|
||||
images/subway.svg
|
||||
images/taxi.svg
|
||||
images/train.svg
|
||||
images/tramway.svg
|
||||
images/transfer.svg
|
||||
images/wait.svg
|
||||
images/walk.svg
|
||||
DEPENDENCIES
|
||||
QtQuick
|
||||
)
|
||||
|
||||
configure_file(config-neochat.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-neochat.h)
|
||||
|
||||
ecm_qt_declare_logging_category(MessageContent
|
||||
HEADER "messagemodel_logging.h"
|
||||
IDENTIFIER "Message"
|
||||
CATEGORY_NAME "org.kde.neochat.messagemodel"
|
||||
DESCRIPTION "Neochat: messagemodel"
|
||||
DEFAULT_SEVERITY Info
|
||||
EXPORT NEOCHAT
|
||||
)
|
||||
|
||||
target_include_directories(MessageContent PRIVATE ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/models)
|
||||
target_link_libraries(MessageContent PRIVATE
|
||||
Qt::Core
|
||||
Qt::Quick
|
||||
Qt::QuickControls2
|
||||
KF6::Kirigami
|
||||
LibNeoChat
|
||||
)
|
||||
|
||||
if(NOT ANDROID)
|
||||
target_link_libraries(MessageContent PUBLIC KF6::SyntaxHighlighting)
|
||||
endif()
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 636 B |
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 506 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |