Add qml files in CMakeLists

qt6
Nicolas Werner 3 years ago
parent 843a619e70
commit 423d649aa7
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 114
      CMakeLists.txt
  2. 0
      qml/Avatar.qml
  3. 0
      qml/ChatPage.qml
  4. 0
      qml/CommunitiesList.qml
  5. 12
      qml/Completer.qml
  6. 0
      qml/ElidedLabel.qml
  7. 0
      qml/EncryptionIndicator.qml
  8. 0
      qml/ForwardCompleter.qml
  9. 0
      qml/ImageButton.qml
  10. 0
      qml/MatrixText.qml
  11. 0
      qml/MatrixTextField.qml
  12. 0
      qml/MessageInput.qml
  13. 0
      qml/MessageView.qml
  14. 0
      qml/NhekoBusyIndicator.qml
  15. 0
      qml/NotificationWarning.qml
  16. 0
      qml/PrivacyScreen.qml
  17. 0
      qml/QuickSwitcher.qml
  18. 0
      qml/Reactions.qml
  19. 0
      qml/ReplyPopup.qml
  20. 0
      qml/RoomList.qml
  21. 0
      qml/Root.qml
  22. 0
      qml/SelfVerificationCheck.qml
  23. 0
      qml/StatusIndicator.qml
  24. 0
      qml/TimelineRow.qml
  25. 3
      qml/TimelineView.qml
  26. 0
      qml/ToggleButton.qml
  27. 0
      qml/TopBar.qml
  28. 0
      qml/TypingIndicator.qml
  29. 0
      qml/UploadBox.qml
  30. 0
      qml/components/AdaptiveLayout.qml
  31. 0
      qml/components/AdaptiveLayoutElement.qml
  32. 0
      qml/components/AvatarListTile.qml
  33. 0
      qml/components/FlatButton.qml
  34. 0
      qml/components/MainWindowDialog.qml
  35. 0
      qml/components/TextButton.qml
  36. 0
      qml/delegates/Encrypted.qml
  37. 0
      qml/delegates/FileMessage.qml
  38. 0
      qml/delegates/ImageMessage.qml
  39. 3
      qml/delegates/MessageDelegate.qml
  40. 0
      qml/delegates/NoticeMessage.qml
  41. 0
      qml/delegates/Pill.qml
  42. 0
      qml/delegates/Placeholder.qml
  43. 0
      qml/delegates/PlayableMediaMessage.qml
  44. 0
      qml/delegates/Redacted.qml
  45. 0
      qml/delegates/Reply.qml
  46. 5
      qml/delegates/TextMessage.qml
  47. 0
      qml/device-verification/DeviceVerification.qml
  48. 0
      qml/device-verification/DigitVerification.qml
  49. 0
      qml/device-verification/EmojiElement.qml
  50. 0
      qml/device-verification/EmojiVerification.qml
  51. 0
      qml/device-verification/Failed.qml
  52. 0
      qml/device-verification/NewVerificationRequest.qml
  53. 0
      qml/device-verification/Success.qml
  54. 0
      qml/device-verification/Waiting.qml
  55. 0
      qml/device-verification/sas-emoji.json
  56. 0
      qml/dialogs/CreateDirect.qml
  57. 0
      qml/dialogs/CreateRoom.qml
  58. 0
      qml/dialogs/HiddenEventsDialog.qml
  59. 0
      qml/dialogs/ImageOverlay.qml
  60. 0
      qml/dialogs/ImagePackEditorDialog.qml
  61. 0
      qml/dialogs/ImagePackSettingsDialog.qml
  62. 0
      qml/dialogs/InputDialog.qml
  63. 0
      qml/dialogs/InviteDialog.qml
  64. 0
      qml/dialogs/JoinRoomDialog.qml
  65. 0
      qml/dialogs/LeaveRoomDialog.qml
  66. 0
      qml/dialogs/LogoutDialog.qml
  67. 0
      qml/dialogs/PhoneNumberInputDialog.qml
  68. 0
      qml/dialogs/RawMessageDialog.qml
  69. 0
      qml/dialogs/ReadReceipts.qml
  70. 0
      qml/dialogs/RoomDirectory.qml
  71. 0
      qml/dialogs/RoomMembers.qml
  72. 0
      qml/dialogs/RoomSettings.qml
  73. 0
      qml/dialogs/UserProfile.qml
  74. 0
      qml/emoji/EmojiPicker.qml
  75. 0
      qml/emoji/StickerPicker.qml
  76. 0
      qml/pages/LoginPage.qml
  77. 0
      qml/pages/RegisterPage.qml
  78. 3
      qml/pages/UserSettingsPage.qml
  79. 0
      qml/pages/WelcomePage.qml
  80. 0
      qml/ui/NhekoSlider.qml
  81. 0
      qml/ui/Ripple.qml
  82. 0
      qml/ui/Snackbar.qml
  83. 0
      qml/ui/Spinner.qml
  84. 0
      qml/ui/animations/BlinkAnimation.qml
  85. 0
      qml/ui/animations/qmldir
  86. 0
      qml/ui/media/MediaControls.qml
  87. 0
      qml/ui/media/qmldir
  88. 0
      qml/voip/ActiveCallBar.qml
  89. 0
      qml/voip/CallDevices.qml
  90. 0
      qml/voip/CallInvite.qml
  91. 0
      qml/voip/CallInviteBar.qml
  92. 0
      qml/voip/DeviceError.qml
  93. 0
      qml/voip/PlaceCall.qml
  94. 0
      qml/voip/ScreenShare.qml
  95. 0
      qml/voip/VideoCall.qml
  96. 4
      resources/qml/ui/qmldir
  97. 90
      resources/res.qrc
  98. 7
      src/MainWindow.cpp
  99. 3
      src/timeline/DelegateChooser.h
  100. 9
      src/timeline/TimelineViewManager.cpp
  101. Some files were not shown because too many files have changed in this diff Show More

@ -324,7 +324,6 @@ set(SRC_FILES
src/timeline/Reaction.cpp
src/timeline/TimelineViewManager.cpp
src/timeline/TimelineModel.cpp
src/timeline/DelegateChooser.cpp
src/timeline/Permissions.cpp
src/timeline/PresenceEmitter.cpp
src/timeline/RoomlistModel.cpp
@ -506,7 +505,7 @@ if (NOT APPLE AND NOT WIN32)
add_compile_definitions(NHEKO_DBUS_SYS)
endif()
qt_wrap_cpp(MOC_HEADERS
set(MOC_HEADERS
# Dialogs
src/dialogs/FallbackAuth.h
src/dialogs/ReCaptcha.h
@ -522,7 +521,6 @@ qt_wrap_cpp(MOC_HEADERS
src/timeline/Reaction.h
src/timeline/TimelineViewManager.h
src/timeline/TimelineModel.h
src/timeline/DelegateChooser.h
src/timeline/Permissions.h
src/timeline/PresenceEmitter.h
src/timeline/RoomlistModel.h
@ -533,7 +531,6 @@ qt_wrap_cpp(MOC_HEADERS
src/ui/MxcMediaProxy.h
src/ui/NhekoCursorShape.h
src/ui/NhekoEventObserver.h
src/ui/NhekoDropArea.h
src/ui/NhekoGlobalObject.h
src/ui/RoomSettings.h
src/ui/Theme.h
@ -646,6 +643,113 @@ endif()
file(GLOB LANG_TS_SRC "${CMAKE_CURRENT_SOURCE_DIR}/resources/langs/*.ts")
qt_add_translations(nheko RESOURCE_PREFIX "/translations" TS_FILES ${LANG_TS_SRC})
set_property(TARGET nheko PROPERTY AUTOMOC ON)
qt_add_qml_module(nheko
URI im.nheko2
RESOURCE_PREFIX "/"
VERSION 1.0
SOURCES
src/timeline/DelegateChooser.cpp
src/timeline/DelegateChooser.h
src/ui/NhekoDropArea.h
)
qt_target_qml_sources(nheko
#PREFIX "/"
QML_FILES
qml/Avatar.qml
qml/ChatPage.qml
qml/ElidedLabel.qml
qml/EncryptionIndicator.qml
qml/ForwardCompleter.qml
qml/ImageButton.qml
qml/MatrixText.qml
qml/MatrixTextField.qml
qml/MessageInput.qml
qml/NhekoBusyIndicator.qml
qml/NotificationWarning.qml
qml/QuickSwitcher.qml
qml/Reactions.qml
qml/SelfVerificationCheck.qml
qml/StatusIndicator.qml
qml/ToggleButton.qml
qml/TypingIndicator.qml
qml/UploadBox.qml
qml/components/AdaptiveLayout.qml
qml/components/AdaptiveLayoutElement.qml
qml/components/AvatarListTile.qml
qml/components/MainWindowDialog.qml
qml/components/TextButton.qml
qml/components/FlatButton.qml
qml/delegates/Encrypted.qml
qml/delegates/FileMessage.qml
qml/delegates/NoticeMessage.qml
qml/delegates/Pill.qml
qml/delegates/Placeholder.qml
qml/delegates/Redacted.qml
qml/delegates/Reply.qml
qml/delegates/PlayableMediaMessage.qml
qml/delegates/ImageMessage.qml
qml/delegates/TextMessage.qml
qml/delegates/MessageDelegate.qml
qml/device-verification/DeviceVerification.qml
qml/device-verification/DigitVerification.qml
qml/device-verification/EmojiElement.qml
qml/device-verification/EmojiVerification.qml
qml/device-verification/Failed.qml
qml/device-verification/NewVerificationRequest.qml
qml/device-verification/Success.qml
qml/device-verification/Waiting.qml
qml/dialogs/HiddenEventsDialog.qml
qml/dialogs/ImageOverlay.qml
qml/dialogs/LeaveRoomDialog.qml
qml/dialogs/LogoutDialog.qml
qml/dialogs/CreateDirect.qml
qml/dialogs/CreateRoom.qml
qml/dialogs/ImagePackEditorDialog.qml
qml/dialogs/ImagePackSettingsDialog.qml
qml/dialogs/InputDialog.qml
qml/dialogs/InviteDialog.qml
qml/dialogs/JoinRoomDialog.qml
qml/dialogs/PhoneNumberInputDialog.qml
qml/dialogs/RawMessageDialog.qml
qml/dialogs/ReadReceipts.qml
qml/dialogs/RoomDirectory.qml
qml/dialogs/RoomMembers.qml
qml/dialogs/UserProfile.qml
qml/dialogs/RoomSettings.qml
qml/emoji/EmojiPicker.qml
qml/emoji/StickerPicker.qml
qml/pages/LoginPage.qml
qml/pages/RegisterPage.qml
qml/pages/WelcomePage.qml
qml/pages/UserSettingsPage.qml
qml/ui/NhekoSlider.qml
qml/ui/Snackbar.qml
qml/ui/animations/BlinkAnimation.qml
qml/ui/media/MediaControls.qml
qml/ui/Ripple.qml
qml/ui/Spinner.qml
qml/voip/ActiveCallBar.qml
qml/voip/CallDevices.qml
qml/voip/CallInvite.qml
qml/voip/CallInviteBar.qml
qml/voip/DeviceError.qml
qml/voip/PlaceCall.qml
qml/voip/ScreenShare.qml
qml/voip/VideoCall.qml
qml/PrivacyScreen.qml
qml/TimelineRow.qml
qml/Root.qml
qml/ReplyPopup.qml
qml/MessageView.qml
qml/RoomList.qml
qml/CommunitiesList.qml
qml/TopBar.qml
qml/Completer.qml
qml/TimelineView.qml
)
if(APPLE)
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
elseif(WIN32)
@ -660,7 +764,7 @@ else()
target_compile_definitions(nheko PRIVATE NHEKO_FLATPAK)
endif()
endif()
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12)
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12 src/timeline src/ui)
# Fixup bundled keychain include dirs
if (USE_BUNDLED_QTKEYCHAIN)

@ -3,11 +3,13 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later
import "./ui"
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import im.nheko 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import im.nheko
import im.nheko2
import "./ui/"
Control {
id: popup

@ -14,7 +14,8 @@ import QtQuick 2.15
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.3
import QtQuick.Window 2.13
import im.nheko 1.0
import im.nheko
import im.nheko2
import im.nheko.EmojiModel 1.0
Item {

@ -6,7 +6,8 @@
import QtQuick 2.6
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.2
import im.nheko 1.0
import im.nheko
import im.nheko2
Item {
id: d

@ -4,8 +4,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import ".."
import QtQuick.Controls 2.3
import im.nheko 1.0
import QtQuick
import QtQuick.Controls
import im.nheko
MatrixText {
required property string body

@ -10,7 +10,8 @@ import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.2
import QtQuick.Window 2.15
import im.nheko 1.0
import im.nheko
import im.nheko2
Rectangle {
id: userSettingsDialog

@ -1,4 +0,0 @@
module im.nheko.UI
NhekoSlider 1.0 NhekoSlider.qml
Ripple 1.0 Ripple.qml
Spinner 1.0 Spinner.qml

@ -86,96 +86,6 @@
</qresource>
<qresource prefix="/">
<file>qtquickcontrols2.conf</file>
<file>qml/Root.qml</file>
<file>qml/ChatPage.qml</file>
<file>qml/CommunitiesList.qml</file>
<file>qml/RoomList.qml</file>
<file>qml/TimelineView.qml</file>
<file>qml/Avatar.qml</file>
<file>qml/Completer.qml</file>
<file>qml/EncryptionIndicator.qml</file>
<file>qml/ImageButton.qml</file>
<file>qml/ElidedLabel.qml</file>
<file>qml/MatrixText.qml</file>
<file>qml/MatrixTextField.qml</file>
<file>qml/ToggleButton.qml</file>
<file>qml/UploadBox.qml</file>
<file>qml/MessageInput.qml</file>
<file>qml/MessageView.qml</file>
<file>qml/NhekoBusyIndicator.qml</file>
<file>qml/PrivacyScreen.qml</file>
<file>qml/Reactions.qml</file>
<file>qml/ReplyPopup.qml</file>
<file>qml/StatusIndicator.qml</file>
<file>qml/TimelineRow.qml</file>
<file>qml/TopBar.qml</file>
<file>qml/QuickSwitcher.qml</file>
<file>qml/ForwardCompleter.qml</file>
<file>qml/SelfVerificationCheck.qml</file>
<file>qml/TypingIndicator.qml</file>
<file>qml/NotificationWarning.qml</file>
<file>qml/pages/UserSettingsPage.qml</file>
<file>qml/pages/WelcomePage.qml</file>
<file>qml/pages/LoginPage.qml</file>
<file>qml/pages/RegisterPage.qml</file>
<file>qml/components/AdaptiveLayout.qml</file>
<file>qml/components/AdaptiveLayoutElement.qml</file>
<file>qml/components/AvatarListTile.qml</file>
<file>qml/components/FlatButton.qml</file>
<file>qml/components/MainWindowDialog.qml</file>
<file>qml/components/TextButton.qml</file>
<file>qml/delegates/Encrypted.qml</file>
<file>qml/delegates/FileMessage.qml</file>
<file>qml/delegates/ImageMessage.qml</file>
<file>qml/delegates/MessageDelegate.qml</file>
<file>qml/delegates/NoticeMessage.qml</file>
<file>qml/delegates/Pill.qml</file>
<file>qml/delegates/Placeholder.qml</file>
<file>qml/delegates/PlayableMediaMessage.qml</file>
<file>qml/delegates/Redacted.qml</file>
<file>qml/delegates/Reply.qml</file>
<file>qml/delegates/TextMessage.qml</file>
<file>qml/device-verification/DeviceVerification.qml</file>
<file>qml/device-verification/DigitVerification.qml</file>
<file>qml/device-verification/EmojiVerification.qml</file>
<file>qml/device-verification/Failed.qml</file>
<file>qml/device-verification/NewVerificationRequest.qml</file>
<file>qml/device-verification/Success.qml</file>
<file>qml/device-verification/Waiting.qml</file>
<file>qml/dialogs/CreateDirect.qml</file>
<file>qml/dialogs/CreateRoom.qml</file>
<file>qml/dialogs/ImageOverlay.qml</file>
<file>qml/dialogs/ImagePackEditorDialog.qml</file>
<file>qml/dialogs/ImagePackSettingsDialog.qml</file>
<file>qml/dialogs/PhoneNumberInputDialog.qml</file>
<file>qml/dialogs/InputDialog.qml</file>
<file>qml/dialogs/InviteDialog.qml</file>
<file>qml/dialogs/JoinRoomDialog.qml</file>
<file>qml/dialogs/LeaveRoomDialog.qml</file>
<file>qml/dialogs/LogoutDialog.qml</file>
<file>qml/dialogs/RawMessageDialog.qml</file>
<file>qml/dialogs/ReadReceipts.qml</file>
<file>qml/dialogs/RoomDirectory.qml</file>
<file>qml/dialogs/RoomMembers.qml</file>
<file>qml/dialogs/RoomSettings.qml</file>
<file>qml/dialogs/UserProfile.qml</file>
<file>qml/dialogs/HiddenEventsDialog.qml</file>
<file>qml/emoji/EmojiPicker.qml</file>
<file>qml/emoji/StickerPicker.qml</file>
<file>qml/ui/NhekoSlider.qml</file>
<file>qml/ui/Ripple.qml</file>
<file>qml/ui/Spinner.qml</file>
<file>qml/ui/Snackbar.qml</file>
<file>qml/ui/animations/BlinkAnimation.qml</file>
<file>qml/ui/media/MediaControls.qml</file>
<file>qml/voip/ActiveCallBar.qml</file>
<file>qml/voip/CallDevices.qml</file>
<file>qml/voip/CallInvite.qml</file>
<file>qml/voip/CallInviteBar.qml</file>
<file>qml/voip/DeviceError.qml</file>
<file>qml/voip/PlaceCall.qml</file>
<file>qml/voip/ScreenShare.qml</file>
<file>qml/voip/VideoCall.qml</file>
</qresource>
<qresource prefix="/media">
<file>media/ring.ogg</file>

@ -42,13 +42,11 @@
#include "emoji/Provider.h"
#include "encryption/DeviceVerificationFlow.h"
#include "encryption/SelfVerificationStatus.h"
#include "timeline/DelegateChooser.h"
#include "timeline/TimelineViewManager.h"
#include "ui/HiddenEvents.h"
#include "ui/MxcAnimatedImage.h"
#include "ui/MxcMediaProxy.h"
#include "ui/NhekoCursorShape.h"
#include "ui/NhekoDropArea.h"
#include "ui/NhekoEventObserver.h"
#include "ui/NhekoGlobalObject.h"
#include "ui/UIA.h"
@ -81,7 +79,7 @@ MainWindow::MainWindow(QWindow *parent)
registerQmlTypes();
setColor(Theme::paletteFromTheme(userSettings_->theme()).window().color());
setSource(QUrl(QStringLiteral("qrc:///qml/Root.qml")));
setSource(QUrl(QStringLiteral("qrc:///im/nheko2/qml/Root.qml")));
trayIcon_ = new TrayIcon(QStringLiteral(":/logos/nheko.svg"), this);
@ -163,9 +161,6 @@ MainWindow::registerQmlTypes()
"VerificationStatus",
QStringLiteral("Can't instantiate enum!"));
qmlRegisterType<DelegateChoice>("im.nheko", 1, 0, "DelegateChoice");
qmlRegisterType<DelegateChooser>("im.nheko", 1, 0, "DelegateChooser");
qmlRegisterType<NhekoDropArea>("im.nheko", 1, 0, "NhekoDropArea");
qmlRegisterType<NhekoCursorShape>("im.nheko", 1, 0, "CursorShape");
qmlRegisterType<NhekoEventObserver>("im.nheko", 1, 0, "EventObserver");
qmlRegisterType<MxcAnimatedImage>("im.nheko", 1, 0, "MxcAnimatedImage");

@ -9,6 +9,7 @@
#pragma once
#include <QQmlComponent>
#include <QQmlEngine>
#include <QQmlIncubator>
#include <QQmlListProperty>
#include <QQuickItem>
@ -20,6 +21,7 @@ class QQmlAdaptorModel;
class DelegateChoice : public QObject
{
Q_OBJECT
QML_ELEMENT
Q_CLASSINFO("DefaultProperty", "delegate")
public:
@ -46,6 +48,7 @@ private:
class DelegateChooser : public QQuickItem
{
Q_OBJECT
QML_ELEMENT
Q_CLASSINFO("DefaultProperty", "choices")
public:

@ -25,6 +25,15 @@
#include "emoji/EmojiModel.h"
#include "emoji/Provider.h"
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationAccept)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationCancel)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationDone)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationKey)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationMac)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationReady)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationRequest)
Q_DECLARE_METATYPE(mtx::events::msg::KeyVerificationStart)
namespace msgs = mtx::events::msg;
namespace {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save