mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-27 13:38:49 +03:00
Port all qml elements to declarative registration
This commit is contained in:
parent
423d649aa7
commit
fdae12df6f
135 changed files with 639 additions and 629 deletions
|
@ -333,7 +333,6 @@ set(SRC_FILES
|
||||||
src/ui/MxcAnimatedImage.cpp
|
src/ui/MxcAnimatedImage.cpp
|
||||||
src/ui/MxcMediaProxy.cpp
|
src/ui/MxcMediaProxy.cpp
|
||||||
src/ui/NhekoCursorShape.cpp
|
src/ui/NhekoCursorShape.cpp
|
||||||
src/ui/NhekoEventObserver.cpp
|
|
||||||
src/ui/NhekoDropArea.cpp
|
src/ui/NhekoDropArea.cpp
|
||||||
src/ui/NhekoGlobalObject.cpp
|
src/ui/NhekoGlobalObject.cpp
|
||||||
src/ui/RoomSettings.cpp
|
src/ui/RoomSettings.cpp
|
||||||
|
@ -530,7 +529,6 @@ set(MOC_HEADERS
|
||||||
src/ui/MxcAnimatedImage.h
|
src/ui/MxcAnimatedImage.h
|
||||||
src/ui/MxcMediaProxy.h
|
src/ui/MxcMediaProxy.h
|
||||||
src/ui/NhekoCursorShape.h
|
src/ui/NhekoCursorShape.h
|
||||||
src/ui/NhekoEventObserver.h
|
|
||||||
src/ui/NhekoGlobalObject.h
|
src/ui/NhekoGlobalObject.h
|
||||||
src/ui/RoomSettings.h
|
src/ui/RoomSettings.h
|
||||||
src/ui/Theme.h
|
src/ui/Theme.h
|
||||||
|
@ -645,7 +643,7 @@ qt_add_translations(nheko RESOURCE_PREFIX "/translations" TS_FILES ${LANG_TS_SRC
|
||||||
|
|
||||||
set_property(TARGET nheko PROPERTY AUTOMOC ON)
|
set_property(TARGET nheko PROPERTY AUTOMOC ON)
|
||||||
qt_add_qml_module(nheko
|
qt_add_qml_module(nheko
|
||||||
URI im.nheko2
|
URI im.nheko
|
||||||
RESOURCE_PREFIX "/"
|
RESOURCE_PREFIX "/"
|
||||||
VERSION 1.0
|
VERSION 1.0
|
||||||
SOURCES
|
SOURCES
|
||||||
|
@ -749,6 +747,10 @@ qt_target_qml_sources(nheko
|
||||||
qml/TimelineView.qml
|
qml/TimelineView.qml
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT COMPILE_QML)
|
||||||
|
set_target_properties(nheko PROPERTIES QT_QMLCACHEGEN_ARGUMENTS "--only-bytecode")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
|
target_link_libraries (nheko PRIVATE Qt5::MacExtras)
|
||||||
|
@ -764,7 +766,7 @@ else()
|
||||||
target_compile_definitions(nheko PRIVATE NHEKO_FLATPAK)
|
target_compile_definitions(nheko PRIVATE NHEKO_FLATPAK)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12 src/timeline src/ui)
|
target_include_directories(nheko PRIVATE src includes third_party/blurhash third_party/cpp-httplib-0.5.12 src/timeline src/ui src/encryption src/emoji src/voip)
|
||||||
|
|
||||||
# Fixup bundled keychain include dirs
|
# Fixup bundled keychain include dirs
|
||||||
if (USE_BUNDLED_QTKEYCHAIN)
|
if (USE_BUNDLED_QTKEYCHAIN)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "./ui"
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
id: avatar
|
id: avatar
|
||||||
|
@ -98,7 +98,7 @@ AbstractButton {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import "components"
|
import "components"
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
// this needs to be last
|
// this needs to be last
|
||||||
import QtQml 2.15
|
import QtQml 2.15
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtQml 2.12
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: communitySidebar
|
id: communitySidebar
|
||||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import im.nheko
|
import im.nheko
|
||||||
import im.nheko2
|
import im.nheko
|
||||||
|
|
||||||
import "./ui/"
|
import "./ui/"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: root
|
id: root
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: stateImg
|
id: stateImg
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import "./delegates/"
|
import "./delegates/"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: forwardMessagePopup
|
id: forwardMessagePopup
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import "./ui"
|
import "./ui"
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import im.nheko 1.0 // for cursor shape
|
import im.nheko
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
id: button
|
id: button
|
||||||
|
@ -31,7 +31,7 @@ AbstractButton {
|
||||||
fillMode: Image.PreserveAspectFit
|
fillMode: Image.PreserveAspectFit
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
TextEdit {
|
TextEdit {
|
||||||
id: r
|
id: r
|
||||||
|
@ -29,9 +29,8 @@ TextEdit {
|
||||||
TimelineManager.fixImageRendering(r.textDocument, r);
|
TimelineManager.fixImageRendering(r.textDocument, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
id: cs
|
id: cs
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: inputBar
|
id: inputBar
|
||||||
|
|
|
@ -13,7 +13,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -326,7 +326,7 @@ Item {
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
rightPadding: 0
|
rightPadding: 0
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
BusyIndicator {
|
BusyIndicator {
|
||||||
id: control
|
id: control
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0
|
implicitHeight: warningRect.visible ? warningDisplay.implicitHeight : 0
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
//import QtGraphicalEffects 1.0
|
//import QtGraphicalEffects 1.0
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Window 2.2
|
import QtQuick.Window 2.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: privacyScreen
|
id: privacyScreen
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: quickSwitcher
|
id: quickSwitcher
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.6
|
import QtQuick 2.6
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
// This class is for showing Reactions in the timeline row, not for
|
// This class is for showing Reactions in the timeline row, not for
|
||||||
// adding new reactions via the emoji picker
|
// adding new reactions via the emoji picker
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "./delegates/"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: replyPopup
|
id: replyPopup
|
||||||
|
|
|
@ -10,7 +10,7 @@ import QtQml 2.12
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
//leftPadding: Nheko.paddingSmall
|
//leftPadding: Nheko.paddingSmall
|
||||||
|
|
|
@ -15,8 +15,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import im.nheko.EmojiModel 1.0
|
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
id: timelineRoot
|
id: timelineRoot
|
||||||
|
|
|
@ -8,7 +8,7 @@ import Qt.labs.platform 1.1 as P
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
visible: false
|
visible: false
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ImageButton {
|
ImageButton {
|
||||||
id: indicator
|
id: indicator
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
id: r
|
id: r
|
||||||
|
@ -164,7 +164,7 @@ AbstractButton {
|
||||||
duration: r.relatedEventCacheBuster, fromModel(Room.Duration) ?? 0
|
duration: r.relatedEventCacheBuster, fromModel(Room.Duration) ?? 0
|
||||||
roomTopic: r.relatedEventCacheBuster, fromModel(Room.RoomTopic) ?? ""
|
roomTopic: r.relatedEventCacheBuster, fromModel(Room.RoomTopic) ?? ""
|
||||||
roomName: r.relatedEventCacheBuster, fromModel(Room.RoomName) ?? ""
|
roomName: r.relatedEventCacheBuster, fromModel(Room.RoomName) ?? ""
|
||||||
callType: r.relatedEventCacheBuster, fromModel(Room.CallType) ?? ""
|
callType: r.relatedEventCacheBuster, fromModel(Room.Voip) ?? ""
|
||||||
encryptionError: r.relatedEventCacheBuster, fromModel(Room.EncryptionError) ?? 0
|
encryptionError: r.relatedEventCacheBuster, fromModel(Room.EncryptionError) ?? 0
|
||||||
relatedEventCacheBuster: r.relatedEventCacheBuster, fromModel(Room.RelatedEventCacheBuster) ?? 0
|
relatedEventCacheBuster: r.relatedEventCacheBuster, fromModel(Room.RelatedEventCacheBuster) ?? 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,7 @@ import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko
|
import im.nheko
|
||||||
import im.nheko2
|
import im.nheko
|
||||||
import im.nheko.EmojiModel 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: timelineView
|
id: timelineView
|
||||||
|
@ -98,7 +97,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
source: CallManager.isOnCall && CallManager.callType != CallType.VOICE ? "voip/VideoCall.qml" : ""
|
source: CallManager.isOnCall && CallManager.callType != Voip.VOICE ? "voip/VideoCall.qml" : ""
|
||||||
onLoaded: TimelineManager.setVideoCallItem()
|
onLoaded: TimelineManager.setVideoCallItem()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +230,7 @@ Item {
|
||||||
horizontalAlignment: TextEdit.AlignHCenter
|
horizontalAlignment: TextEdit.AlignHCenter
|
||||||
onLinkActivated: Nheko.openLink(link)
|
onLinkActivated: Nheko.openLink(link)
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Switch {
|
Switch {
|
||||||
id: toggleButton
|
id: toggleButton
|
||||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
import "./delegates"
|
import "./delegates"
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Pane {
|
||||||
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
|
property string directChatOtherUserId: room ? room.directChatOtherUserId : ""
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: topLayout.height + Nheko.paddingMedium * 2
|
implicitHeight: topBarC.height + Nheko.paddingMedium * 2
|
||||||
z: 3
|
z: 3
|
||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
|
@ -71,8 +71,7 @@ Pane {
|
||||||
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: topLayout
|
id: topBarC
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Nheko.paddingMedium
|
anchors.margins: Nheko.paddingMedium
|
||||||
|
@ -344,7 +343,7 @@ Pane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.bottomMargin: (pinnedMessages.visible ? pinnedMessages.height : 0) + (widgets.visible ? widgets.height : 0)
|
anchors.bottomMargin: (pinnedMessages.visible ? pinnedMessages.height : 0) + (widgets.visible ? widgets.height : 0)
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: Math.max(fontMetrics.height * 1.2, typingDisplay.height)
|
implicitHeight: Math.max(fontMetrics.height * 1.2, typingDisplay.height)
|
||||||
|
|
|
@ -8,7 +8,7 @@ import "./ui"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Page {
|
Page {
|
||||||
id: uploadPopup
|
id: uploadPopup
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Container {
|
Container {
|
||||||
//Component.onCompleted: {
|
//Component.onCompleted: {
|
||||||
|
@ -88,7 +88,7 @@ Container {
|
||||||
x: parent.preferredWidth
|
x: parent.preferredWidth
|
||||||
z: 3
|
z: 3
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: container.splitterGrabMargin * 2
|
width: container.splitterGrabMargin * 2
|
||||||
x: -container.splitterGrabMargin
|
x: -container.splitterGrabMargin
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: tile
|
id: tile
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
// FIXME(Nico): Don't use hardcoded colors.
|
// FIXME(Nico): Don't use hardcoded colors.
|
||||||
Button {
|
Button {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import Qt.labs.platform 1.1 as P
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Dialog {
|
Dialog {
|
||||||
default property alias inner: scroll.data
|
default property alias inner: scroll.data
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import "../ui"
|
import "../ui"
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0 // for cursor shape
|
import im.nheko // for cursor shape
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
id: button
|
id: button
|
||||||
|
@ -33,7 +33,7 @@ AbstractButton {
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: r
|
id: r
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
required property string eventId
|
required property string eventId
|
||||||
|
@ -51,7 +51,7 @@ Item {
|
||||||
gesturePolicy: TapHandler.ReleaseWithinBounds
|
gesturePolicy: TapHandler.ReleaseWithinBounds
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
required property int type
|
required property int type
|
||||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick 2.6
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko
|
import im.nheko
|
||||||
import im.nheko2
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: d
|
id: d
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
|
|
||||||
TextMessage {
|
TextMessage {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
import QtQuick.Controls 2.1
|
import QtQuick.Controls 2.1
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
property bool isStateEvent
|
property bool isStateEvent
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
MatrixText {
|
MatrixText {
|
||||||
required property string typeString
|
required property string typeString
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtMultimedia
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import "../"
|
import "../"
|
||||||
|
|
||||||
AbstractButton {
|
AbstractButton {
|
||||||
|
@ -43,7 +43,7 @@ AbstractButton {
|
||||||
implicitHeight: replyContainer.height
|
implicitHeight: replyContainer.height
|
||||||
implicitWidth: visible? colorLine.width+Math.max(replyContainer.implicitWidth,userName_.fullTextWidth) : 0 // visible? seems to be causing issues
|
implicitWidth: visible? colorLine.width+Math.max(replyContainer.implicitWidth,userName_.fullTextWidth) : 0 // visible? seems to be causing issues
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ MatrixText {
|
||||||
enabled: !Settings.mobileMode
|
enabled: !Settings.mobileMode
|
||||||
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
|
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
enabled: isReply
|
enabled: isReply
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: dialog
|
id: dialog
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: qsTr("Verification Code")
|
property string title: qsTr("Verification Code")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: qsTr("Verification Code")
|
property string title: qsTr("Verification Code")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: qsTr("Verification failed")
|
property string title: qsTr("Verification failed")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request")
|
property string title: flow.sender ? qsTr("Send Verification Request") : qsTr("Received Verification Request")
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: qsTr("Successful Verification")
|
property string title: qsTr("Successful Verification")
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../ui"
|
||||||
import QtQuick 2.3
|
import QtQuick 2.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.10
|
import QtQuick.Layouts 1.10
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Pane {
|
Pane {
|
||||||
property string title: qsTr("Waiting for other party…")
|
property string title: qsTr("Waiting for other party…")
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtQuick.Window 2.13
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQml.Models 2.15
|
import QtQml.Models 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: createDirectRoot
|
id: createDirectRoot
|
||||||
|
|
|
@ -8,7 +8,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: createRoomRoot
|
id: createRoomRoot
|
||||||
|
|
|
@ -6,7 +6,7 @@ import ".."
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: hiddenEventsDialog
|
id: hiddenEventsDialog
|
||||||
|
|
|
@ -7,7 +7,7 @@ import QtQuick.Window 2.15
|
||||||
|
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Window {
|
Window {
|
||||||
id: imageOverlay
|
id: imageOverlay
|
||||||
|
|
|
@ -9,7 +9,7 @@ import Qt.labs.platform 1.1
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: win
|
id: win
|
||||||
|
|
|
@ -8,7 +8,7 @@ import "../components"
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: win
|
id: win
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: inputDialog
|
id: inputDialog
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: inviteDialogRoot
|
id: inviteDialogRoot
|
||||||
|
@ -154,7 +154,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: joinRoomRoot
|
id: joinRoomRoot
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import Qt.labs.platform 1.1 as P
|
import Qt.labs.platform 1.1 as P
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
P.MessageDialog {
|
P.MessageDialog {
|
||||||
id: leaveRoomRoot
|
id: leaveRoomRoot
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import Qt.labs.platform 1.1 as P
|
import Qt.labs.platform 1.1 as P
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
P.MessageDialog {
|
P.MessageDialog {
|
||||||
id: logoutRoot
|
id: logoutRoot
|
||||||
|
|
|
@ -8,7 +8,7 @@ import ".."
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.5
|
import QtQuick.Controls 2.5
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: inputDialog
|
id: inputDialog
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: rawMessageRoot
|
id: rawMessageRoot
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ".."
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: readReceiptsRoot
|
id: readReceiptsRoot
|
||||||
|
@ -110,7 +110,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import "../ui"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: roomDirectoryWindow
|
id: roomDirectoryWindow
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: roomMembersRoot
|
id: roomMembersRoot
|
||||||
|
@ -187,7 +187,7 @@ ApplicationWindow {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: roomSettingsDialog
|
id: roomSettingsDialog
|
||||||
|
@ -165,7 +166,7 @@ ApplicationWindow {
|
||||||
onSingleTapped: TimelineManager.openRoomMembers(Rooms.getRoomById(roomSettings.roomId))
|
onSingleTapped: TimelineManager.openRoomMembers(Rooms.getRoomById(roomSettings.roomId))
|
||||||
}
|
}
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
@ -196,7 +197,7 @@ ApplicationWindow {
|
||||||
horizontalAlignment: TextEdit.AlignHCenter
|
horizontalAlignment: TextEdit.AlignHCenter
|
||||||
onLinkActivated: Nheko.openLink(link)
|
onLinkActivated: Nheko.openLink(link)
|
||||||
|
|
||||||
CursorShape {
|
NhekoCursorShape {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,8 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.13
|
import QtQuick.Window 2.13
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
import im.nheko
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: userProfileDialog
|
id: userProfileDialog
|
||||||
|
|
|
@ -8,8 +8,7 @@ import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import im.nheko.EmojiModel 1.0
|
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
id: emojiPopup
|
id: emojiPopup
|
||||||
|
@ -203,56 +202,56 @@ Menu {
|
||||||
// Display the normal categories
|
// Display the normal categories
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
||||||
model: ListModel {
|
model: [
|
||||||
// TODO: Would like to get 'simple' icons for the categories
|
// TODO: Would like to get 'simple' icons for the categories
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/people.svg"
|
image: ":/icons/icons/emoji-categories/people.svg",
|
||||||
category: Emoji.Category.People
|
category: Emoji.Category.People
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/nature.svg"
|
image: ":/icons/icons/emoji-categories/nature.svg",
|
||||||
category: Emoji.Category.Nature
|
category: Emoji.Category.Nature
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/foods.svg"
|
image: ":/icons/icons/emoji-categories/foods.svg",
|
||||||
category: Emoji.Category.Food
|
category: Emoji.Category.Food
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/activity.svg"
|
image: ":/icons/icons/emoji-categories/activity.svg",
|
||||||
category: Emoji.Category.Activity
|
category: Emoji.Category.Activity
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/travel.svg"
|
image: ":/icons/icons/emoji-categories/travel.svg",
|
||||||
category: Emoji.Category.Travel
|
category: Emoji.Category.Travel
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/objects.svg"
|
image: ":/icons/icons/emoji-categories/objects.svg",
|
||||||
category: Emoji.Category.Objects
|
category: Emoji.Category.Objects
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/symbols.svg"
|
image: ":/icons/icons/emoji-categories/symbols.svg",
|
||||||
category: Emoji.Category.Symbols
|
category: Emoji.Category.Symbols
|
||||||
}
|
},
|
||||||
|
|
||||||
ListElement {
|
{
|
||||||
image: ":/icons/icons/emoji-categories/flags.svg"
|
image: ":/icons/icons/emoji-categories/flags.svg",
|
||||||
category: Emoji.Category.Flags
|
category: Emoji.Category.Flags
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
]
|
||||||
|
|
||||||
delegate: AbstractButton {
|
delegate: AbstractButton {
|
||||||
Layout.preferredWidth: 36
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 36
|
Layout.preferredHeight: 36
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
ToolTip.text: {
|
ToolTip.text: {
|
||||||
switch (model.category) {
|
switch (modelData.category) {
|
||||||
case Emoji.Category.People:
|
case Emoji.Category.People:
|
||||||
return qsTr('People');
|
return qsTr('People');
|
||||||
case Emoji.Category.Nature:
|
case Emoji.Category.Nature:
|
||||||
|
@ -274,7 +273,7 @@ Menu {
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
onClicked: {
|
onClicked: {
|
||||||
//emojiPopup.model.category = model.category;
|
//emojiPopup.model.category = model.category;
|
||||||
gridView.positionViewAtIndex(emojiPopup.model.sourceModel.categoryToIndex(model.category), GridView.Beginning);
|
gridView.positionViewAtIndex(emojiPopup.model.sourceModel.categoryToIndex(modelData.category), GridView.Beginning);
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
@ -295,14 +294,14 @@ Menu {
|
||||||
mipmap: true
|
mipmap: true
|
||||||
sourceSize.width: 32 * Screen.devicePixelRatio
|
sourceSize.width: 32 * Screen.devicePixelRatio
|
||||||
sourceSize.height: 32 * Screen.devicePixelRatio
|
sourceSize.height: 32 * Screen.devicePixelRatio
|
||||||
source: "image://colorimage/" + model.image + "?" + (hovered ? timelineRoot.palette.highlight : timelineRoot.palette.buttonText)
|
source: "image://colorimage/" + modelData.image + "?" + (hovered ? timelineRoot.palette.highlight : timelineRoot.palette.buttonText)
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: emojiPopup.model.category === model.category ? Qt.hsla(highlightHue, highlightSat, highlightLight, 0.2) : 'transparent'
|
color: emojiPopup.model.category === modelData.category ? Qt.hsla(highlightHue, highlightSat, highlightLight, 0.2) : 'transparent'
|
||||||
radius: 5
|
radius: 5
|
||||||
border.color: emojiPopup.model.category === model.category ? timelineRoot.palette.highlight : 'transparent'
|
border.color: emojiPopup.model.category === modelData.category ? timelineRoot.palette.highlight : 'transparent'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import im.nheko.EmojiModel 1.0
|
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
id: stickerPopup
|
id: stickerPopup
|
||||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import "../components/"
|
import "../components/"
|
||||||
import "../ui/"
|
import "../ui/"
|
||||||
import "../"
|
import "../"
|
||||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import "../components/"
|
import "../components/"
|
||||||
import "../ui/"
|
import "../ui/"
|
||||||
import "../"
|
import "../"
|
||||||
|
|
|
@ -11,7 +11,7 @@ import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko
|
import im.nheko
|
||||||
import im.nheko2
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: userSettingsDialog
|
id: userSettingsDialog
|
||||||
|
|
|
@ -6,7 +6,7 @@ import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import QtQuick.Window 2.15
|
import QtQuick.Window 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
import "../components/"
|
import "../components/"
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
id: control
|
id: control
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: snackbar
|
id: snackbar
|
||||||
|
|
|
@ -9,7 +9,7 @@ import QtMultimedia 5.15
|
||||||
import QtQuick 2.15
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: control
|
id: control
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: CallManager.isOnCall
|
visible: CallManager.isOnCall
|
||||||
|
@ -17,7 +17,7 @@ Rectangle {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (CallManager.callType != CallType.VOICE)
|
if (CallManager.callType != Voip.VOICE)
|
||||||
stackLayout.currentIndex = stackLayout.currentIndex ? 0 : 1;
|
stackLayout.currentIndex = stackLayout.currentIndex ? 0 : 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ Rectangle {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "VOICE"
|
name: "VOICE"
|
||||||
when: CallManager.callType == CallType.VOICE
|
when: CallManager.callType == Voip.VOICE
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callTypeIcon
|
target: callTypeIcon
|
||||||
|
@ -69,7 +69,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "VIDEO"
|
name: "VIDEO"
|
||||||
when: CallManager.callType == CallType.VIDEO
|
when: CallManager.callType == Voip.VIDEO
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callTypeIcon
|
target: callTypeIcon
|
||||||
|
@ -79,7 +79,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "SCREEN"
|
name: "SCREEN"
|
||||||
when: CallManager.callType == CallType.SCREEN
|
when: CallManager.callType == Voip.SCREEN
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callTypeIcon
|
target: callTypeIcon
|
||||||
|
@ -101,7 +101,7 @@ Rectangle {
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "OFFERSENT"
|
name: "OFFERSENT"
|
||||||
when: CallManager.callState == WebRTCState.OFFERSENT
|
when: CallManager.callState == Voip.OFFERSENT
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callStateLabel
|
target: callStateLabel
|
||||||
|
@ -111,7 +111,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "CONNECTING"
|
name: "CONNECTING"
|
||||||
when: CallManager.callState == WebRTCState.CONNECTING
|
when: CallManager.callState == Voip.CONNECTING
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callStateLabel
|
target: callStateLabel
|
||||||
|
@ -121,7 +121,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "ANSWERSENT"
|
name: "ANSWERSENT"
|
||||||
when: CallManager.callState == WebRTCState.ANSWERSENT
|
when: CallManager.callState == Voip.ANSWERSENT
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callStateLabel
|
target: callStateLabel
|
||||||
|
@ -131,7 +131,7 @@ Rectangle {
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "CONNECTED"
|
name: "CONNECTED"
|
||||||
when: CallManager.callState == WebRTCState.CONNECTED
|
when: CallManager.callState == Voip.CONNECTED
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callStateLabel
|
target: callStateLabel
|
||||||
|
@ -145,13 +145,13 @@ Rectangle {
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: stackLayout
|
target: stackLayout
|
||||||
currentIndex: CallManager.callType != CallType.VOICE ? 1 : 0
|
currentIndex: CallManager.callType != Voip.VOICE ? 1 : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "DISCONNECTED"
|
name: "DISCONNECTED"
|
||||||
when: CallManager.callState == WebRTCState.DISCONNECTED
|
when: CallManager.callState == Voip.DISCONNECTED
|
||||||
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: callStateLabel
|
target: callStateLabel
|
||||||
|
@ -177,7 +177,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
interval: 1000
|
interval: 1000
|
||||||
running: CallManager.callState == WebRTCState.CONNECTED
|
running: CallManager.callState == Voip.CONNECTED
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
|
@ -191,7 +191,7 @@ Rectangle {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
visible: CallManager.callType == CallType.SCREEN && CallManager.callState == WebRTCState.CONNECTED
|
visible: CallManager.callType == Voip.SCREEN && CallManager.callState == Voip.CONNECTED
|
||||||
text: qsTr("You are screen sharing")
|
text: qsTr("You are screen sharing")
|
||||||
font.pointSize: fontMetrics.font.pointSize * 1.1
|
font.pointSize: fontMetrics.font.pointSize * 1.1
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
modal: true
|
modal: true
|
||||||
|
@ -45,7 +45,7 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: CallManager.callType == CallType.VIDEO && CallManager.cameras.length > 0
|
visible: CallManager.callType == Voip.VIDEO && CallManager.cameras.length > 0
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
Layout.preferredWidth: 22
|
Layout.preferredWidth: 22
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: callInv
|
id: callInv
|
||||||
|
@ -64,7 +64,7 @@ Popup {
|
||||||
Layout.bottomMargin: callInv.height / 25
|
Layout.bottomMargin: callInv.height / 25
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
property string image: CallManager.callType == CallType.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
property string image: CallManager.callType == Voip.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
Layout.preferredWidth: callInv.height / 10
|
Layout.preferredWidth: callInv.height / 10
|
||||||
|
@ -74,7 +74,7 @@ Popup {
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
text: CallManager.callType == CallType.VIDEO ? qsTr("Video Call") : qsTr("Voice Call")
|
text: CallManager.callType == Voip.VIDEO ? qsTr("Video Call") : qsTr("Voice Call")
|
||||||
font.pointSize: fontMetrics.font.pointSize * 2
|
font.pointSize: fontMetrics.font.pointSize * 2
|
||||||
color: timelineRoot.palette.windowText
|
color: timelineRoot.palette.windowText
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ Popup {
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
visible: CallManager.callType == CallType.VIDEO && CallManager.cameras.length > 0
|
visible: CallManager.callType == Voip.VIDEO && CallManager.cameras.length > 0
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -171,7 +171,7 @@ Popup {
|
||||||
RoundButton {
|
RoundButton {
|
||||||
id: acceptButton
|
id: acceptButton
|
||||||
|
|
||||||
property string image: CallManager.callType == CallType.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
property string image: CallManager.callType == Voip.VIDEO ? ":/icons/icons/ui/video.svg" : ":/icons/icons/ui/place-call.svg"
|
||||||
|
|
||||||
implicitWidth: buttonLayout.buttonSize
|
implicitWidth: buttonLayout.buttonSize
|
||||||
implicitHeight: buttonLayout.buttonSize
|
implicitHeight: buttonLayout.buttonSize
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: CallManager.haveCallInvite && !Settings.mobileMode
|
visible: CallManager.haveCallInvite && !Settings.mobileMode
|
||||||
|
@ -58,12 +58,12 @@ Rectangle {
|
||||||
Layout.leftMargin: 4
|
Layout.leftMargin: 4
|
||||||
Layout.preferredWidth: 24
|
Layout.preferredWidth: 24
|
||||||
Layout.preferredHeight: 24
|
Layout.preferredHeight: 24
|
||||||
source: CallManager.callType == CallType.VIDEO ? "qrc:/icons/icons/ui/video.svg" : "qrc:/icons/icons/ui/place-call.svg"
|
source: CallManager.callType == Voip.CallType.VIDEO ? "qrc:/icons/icons/ui/video.svg" : "qrc:/icons/icons/ui/place-call.svg"
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
font.pointSize: fontMetrics.font.pointSize * 1.1
|
font.pointSize: fontMetrics.font.pointSize * 1.1
|
||||||
text: CallManager.callType == CallType.VIDEO ? qsTr("Video Call") : qsTr("Voice Call")
|
text: CallManager.callType == Voip.VIDEO ? qsTr("Video Call") : qsTr("Voice Call")
|
||||||
color: "#000000"
|
color: "#000000"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ Rectangle {
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.rightMargin: 4
|
Layout.rightMargin: 4
|
||||||
icon.source: CallManager.callType == CallType.VIDEO ? "qrc:/icons/icons/ui/video.svg" : "qrc:/icons/icons/ui/place-call.svg"
|
icon.source: CallManager.callType == Voip.VIDEO ? "qrc:/icons/icons/ui/video.svg" : "qrc:/icons/icons/ui/place-call.svg"
|
||||||
text: qsTr("Accept")
|
text: qsTr("Accept")
|
||||||
palette: timelineRoot.palette
|
palette: timelineRoot.palette
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -110,7 +110,7 @@ Rectangle {
|
||||||
timelineRoot.destroyOnClose(dialog);
|
timelineRoot.destroyOnClose(dialog);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if (CallManager.callType == CallType.VIDEO && CallManager.cameras.length > 0 && !CallManager.cameras.includes(Settings.camera)) {
|
if (CallManager.callType == Voip.VIDEO && CallManager.cameras.length > 0 && !CallManager.cameras.includes(Settings.camera)) {
|
||||||
var dialog = deviceError.createObject(timelineRoot, {
|
var dialog = deviceError.createObject(timelineRoot, {
|
||||||
"errorString": qsTr("Unknown camera: %1").arg(Settings.camera),
|
"errorString": qsTr("Unknown camera: %1").arg(Settings.camera),
|
||||||
"image": ":/icons/icons/ui/video.svg"
|
"image": ":/icons/icons/ui/video.svg"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
property string errorString
|
property string errorString
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
modal: true
|
modal: true
|
||||||
|
@ -83,7 +83,7 @@ Popup {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (buttonLayout.validateMic()) {
|
if (buttonLayout.validateMic()) {
|
||||||
Settings.microphone = micCombo.currentText;
|
Settings.microphone = micCombo.currentText;
|
||||||
CallManager.sendInvite(room.roomId, CallType.VOICE);
|
CallManager.sendInvite(room.roomId, Voip.VOICE);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ Popup {
|
||||||
if (buttonLayout.validateMic()) {
|
if (buttonLayout.validateMic()) {
|
||||||
Settings.microphone = micCombo.currentText;
|
Settings.microphone = micCombo.currentText;
|
||||||
Settings.camera = cameraCombo.currentText;
|
Settings.camera = cameraCombo.currentText;
|
||||||
CallManager.sendInvite(room.roomId, CallType.VIDEO);
|
CallManager.sendInvite(room.roomId, Voip.VIDEO);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import "../"
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import im.nheko 1.0
|
import im.nheko
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
modal: true
|
modal: true
|
||||||
|
@ -132,7 +132,7 @@ Popup {
|
||||||
Settings.screenShareRemoteVideo = remoteVideoCheckBox.checked;
|
Settings.screenShareRemoteVideo = remoteVideoCheckBox.checked;
|
||||||
Settings.screenShareHideCursor = hideCursorCheckBox.checked;
|
Settings.screenShareHideCursor = hideCursorCheckBox.checked;
|
||||||
|
|
||||||
CallManager.sendInvite(room.roomId, CallType.SCREEN, windowCombo.currentIndex);
|
CallManager.sendInvite(room.roomId, Voip.SCREEN, windowCombo.currentIndex);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QQmlEngine>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
@ -17,6 +18,8 @@
|
||||||
|
|
||||||
namespace crypto {
|
namespace crypto {
|
||||||
Q_NAMESPACE
|
Q_NAMESPACE
|
||||||
|
QML_NAMED_ELEMENT(Crypto)
|
||||||
|
|
||||||
//! How much a participant is trusted.
|
//! How much a participant is trusted.
|
||||||
enum Trust
|
enum Trust
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class Clipboard : public QObject
|
class Clipboard : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_SINGLETON
|
||||||
|
|
||||||
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -23,10 +23,12 @@ ColorImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &)
|
||||||
QColor color(args[1]);
|
QColor color(args[1]);
|
||||||
|
|
||||||
QPixmap colorized = source;
|
QPixmap colorized = source;
|
||||||
QPainter painter(&colorized);
|
if (!source.isNull()) {
|
||||||
painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
QPainter painter(&colorized);
|
||||||
painter.fillRect(colorized.rect(), color);
|
painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
|
||||||
painter.end();
|
painter.fillRect(colorized.rect(), color);
|
||||||
|
painter.end();
|
||||||
|
}
|
||||||
|
|
||||||
return colorized;
|
return colorized;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,14 @@
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
class SingleImagePackModel;
|
#include "SingleImagePackModel.h"
|
||||||
|
|
||||||
class ImagePackListModel : public QAbstractListModel
|
class ImagePackListModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_UNCREATABLE("Needs to be instantiated from C++")
|
||||||
|
|
||||||
Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT)
|
Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT)
|
||||||
public:
|
public:
|
||||||
enum Roles
|
enum Roles
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define INVITEESMODEL_H
|
#define INVITEESMODEL_H
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
|
|
||||||
class Invitee : public QObject
|
class Invitee : public QObject
|
||||||
|
@ -30,6 +31,8 @@ private:
|
||||||
class InviteesModel : public QAbstractListModel
|
class InviteesModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_UNCREATABLE("Needs to be instantiated from C++")
|
||||||
|
|
||||||
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
|
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QVariantList>
|
#include <QVariantList>
|
||||||
|
|
||||||
namespace mtx {
|
#include <mtx/responses/login.hpp>
|
||||||
namespace responses {
|
|
||||||
struct Login;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct SSOProvider
|
struct SSOProvider
|
||||||
{
|
{
|
||||||
|
@ -35,6 +32,7 @@ public:
|
||||||
class LoginPage : public QObject
|
class LoginPage : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_NAMED_ELEMENT(Login)
|
||||||
|
|
||||||
Q_PROPERTY(QString mxid READ mxid WRITE setMxid NOTIFY matrixIdChanged)
|
Q_PROPERTY(QString mxid READ mxid WRITE setMxid NOTIFY matrixIdChanged)
|
||||||
Q_PROPERTY(QString homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged)
|
Q_PROPERTY(QString homeserver READ homeserver WRITE setHomeserver NOTIFY homeserverChanged)
|
||||||
|
|
|
@ -24,13 +24,11 @@
|
||||||
#include "InviteesModel.h"
|
#include "InviteesModel.h"
|
||||||
#include "JdenticonProvider.h"
|
#include "JdenticonProvider.h"
|
||||||
#include "Logging.h"
|
#include "Logging.h"
|
||||||
#include "LoginPage.h"
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "MatrixClient.h"
|
#include "MatrixClient.h"
|
||||||
#include "MemberList.h"
|
#include "MemberList.h"
|
||||||
#include "MxcImageProvider.h"
|
#include "MxcImageProvider.h"
|
||||||
#include "ReadReceiptsModel.h"
|
#include "ReadReceiptsModel.h"
|
||||||
#include "RegisterPage.h"
|
|
||||||
#include "RoomDirectoryModel.h"
|
#include "RoomDirectoryModel.h"
|
||||||
#include "RoomsModel.h"
|
#include "RoomsModel.h"
|
||||||
#include "SingleImagePackModel.h"
|
#include "SingleImagePackModel.h"
|
||||||
|
@ -43,11 +41,6 @@
|
||||||
#include "encryption/DeviceVerificationFlow.h"
|
#include "encryption/DeviceVerificationFlow.h"
|
||||||
#include "encryption/SelfVerificationStatus.h"
|
#include "encryption/SelfVerificationStatus.h"
|
||||||
#include "timeline/TimelineViewManager.h"
|
#include "timeline/TimelineViewManager.h"
|
||||||
#include "ui/HiddenEvents.h"
|
|
||||||
#include "ui/MxcAnimatedImage.h"
|
|
||||||
#include "ui/MxcMediaProxy.h"
|
|
||||||
#include "ui/NhekoCursorShape.h"
|
|
||||||
#include "ui/NhekoEventObserver.h"
|
|
||||||
#include "ui/NhekoGlobalObject.h"
|
#include "ui/NhekoGlobalObject.h"
|
||||||
#include "ui/UIA.h"
|
#include "ui/UIA.h"
|
||||||
#include "voip/WebRTCSession.h"
|
#include "voip/WebRTCSession.h"
|
||||||
|
@ -79,7 +72,7 @@ MainWindow::MainWindow(QWindow *parent)
|
||||||
registerQmlTypes();
|
registerQmlTypes();
|
||||||
|
|
||||||
setColor(Theme::paletteFromTheme(userSettings_->theme()).window().color());
|
setColor(Theme::paletteFromTheme(userSettings_->theme()).window().color());
|
||||||
setSource(QUrl(QStringLiteral("qrc:///im/nheko2/qml/Root.qml")));
|
setSource(QUrl(QStringLiteral("qrc:///im/nheko/qml/Root.qml")));
|
||||||
|
|
||||||
trayIcon_ = new TrayIcon(QStringLiteral(":/logos/nheko.svg"), this);
|
trayIcon_ = new TrayIcon(QStringLiteral(":/logos/nheko.svg"), this);
|
||||||
|
|
||||||
|
@ -126,153 +119,6 @@ MainWindow::MainWindow(QWindow *parent)
|
||||||
void
|
void
|
||||||
MainWindow::registerQmlTypes()
|
MainWindow::registerQmlTypes()
|
||||||
{
|
{
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationAccept>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationCancel>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationDone>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationKey>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationMac>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationReady>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationRequest>();
|
|
||||||
qRegisterMetaType<mtx::events::msg::KeyVerificationStart>();
|
|
||||||
qRegisterMetaType<CombinedImagePackModel *>();
|
|
||||||
qRegisterMetaType<mtx::events::collections::TimelineEvents>();
|
|
||||||
qRegisterMetaType<std::vector<DeviceInfo>>();
|
|
||||||
|
|
||||||
qRegisterMetaType<std::vector<mtx::responses::PublicRoomsChunk>>();
|
|
||||||
|
|
||||||
qmlRegisterUncreatableMetaObject(qml_mtx_events::staticMetaObject,
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"MtxEvent",
|
|
||||||
QStringLiteral("Can't instantiate enum!"));
|
|
||||||
qmlRegisterUncreatableMetaObject(
|
|
||||||
olm::staticMetaObject, "im.nheko", 1, 0, "Olm", QStringLiteral("Can't instantiate enum!"));
|
|
||||||
qmlRegisterUncreatableMetaObject(crypto::staticMetaObject,
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"Crypto",
|
|
||||||
QStringLiteral("Can't instantiate enum!"));
|
|
||||||
qmlRegisterUncreatableMetaObject(verification::staticMetaObject,
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"VerificationStatus",
|
|
||||||
QStringLiteral("Can't instantiate enum!"));
|
|
||||||
|
|
||||||
qmlRegisterType<NhekoCursorShape>("im.nheko", 1, 0, "CursorShape");
|
|
||||||
qmlRegisterType<NhekoEventObserver>("im.nheko", 1, 0, "EventObserver");
|
|
||||||
qmlRegisterType<MxcAnimatedImage>("im.nheko", 1, 0, "MxcAnimatedImage");
|
|
||||||
qmlRegisterType<MxcMediaProxy>("im.nheko", 1, 0, "MxcMedia");
|
|
||||||
qmlRegisterType<RoomDirectoryModel>("im.nheko", 1, 0, "RoomDirectoryModel");
|
|
||||||
qmlRegisterType<LoginPage>("im.nheko", 1, 0, "Login");
|
|
||||||
qmlRegisterType<RegisterPage>("im.nheko", 1, 0, "Registration");
|
|
||||||
qmlRegisterType<HiddenEvents>("im.nheko", 1, 0, "HiddenEvents");
|
|
||||||
qmlRegisterUncreatableType<DeviceVerificationFlow>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"DeviceVerificationFlow",
|
|
||||||
QStringLiteral("Can't create verification flow from QML!"));
|
|
||||||
qmlRegisterUncreatableType<UserProfile>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"UserProfileModel",
|
|
||||||
QStringLiteral("UserProfile needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<MemberList>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"MemberList",
|
|
||||||
QStringLiteral("MemberList needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<RoomSettings>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"RoomSettingsModel",
|
|
||||||
QStringLiteral("Room Settings needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<TimelineModel>(
|
|
||||||
"im.nheko", 1, 0, "Room", QStringLiteral("Room needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<ImagePackListModel>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"ImagePackListModel",
|
|
||||||
QStringLiteral("ImagePackListModel needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<SingleImagePackModel>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"SingleImagePackModel",
|
|
||||||
QStringLiteral("SingleImagePackModel needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<InviteesModel>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"InviteesModel",
|
|
||||||
QStringLiteral("InviteesModel needs to be instantiated on the C++ side"));
|
|
||||||
qmlRegisterUncreatableType<ReadReceiptsProxy>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"ReadReceiptsProxy",
|
|
||||||
QStringLiteral("ReadReceiptsProxy needs to be instantiated on the C++ side"));
|
|
||||||
|
|
||||||
qmlRegisterSingletonType<Clipboard>(
|
|
||||||
"im.nheko", 1, 0, "Clipboard", [](QQmlEngine *, QJSEngine *) -> QObject * {
|
|
||||||
return new Clipboard();
|
|
||||||
});
|
|
||||||
qmlRegisterSingletonType<Nheko>(
|
|
||||||
"im.nheko", 1, 0, "Nheko", [](QQmlEngine *, QJSEngine *) -> QObject * {
|
|
||||||
return new Nheko();
|
|
||||||
});
|
|
||||||
qmlRegisterSingletonType<UserSettingsModel>(
|
|
||||||
"im.nheko", 1, 0, "UserSettingsModel", [](QQmlEngine *, QJSEngine *) -> QObject * {
|
|
||||||
return new UserSettingsModel();
|
|
||||||
});
|
|
||||||
|
|
||||||
qmlRegisterSingletonInstance("im.nheko", 1, 0, "Settings", userSettings_.data());
|
|
||||||
|
|
||||||
qRegisterMetaType<mtx::events::collections::TimelineEvents>();
|
|
||||||
qRegisterMetaType<std::vector<DeviceInfo>>();
|
|
||||||
|
|
||||||
qmlRegisterUncreatableType<FilteredCommunitiesModel>(
|
|
||||||
"im.nheko",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"FilteredCommunitiesModel",
|
|
||||||
QStringLiteral("Use Communities.filtered() to create a FilteredCommunitiesModel"));
|
|
||||||
|
|
||||||
qmlRegisterType<emoji::EmojiModel>("im.nheko.EmojiModel", 1, 0, "EmojiModel");
|
|
||||||
qmlRegisterUncreatableType<emoji::Emoji>(
|
|
||||||
"im.nheko.EmojiModel", 1, 0, "Emoji", QStringLiteral("Used by emoji models"));
|
|
||||||
qmlRegisterUncreatableType<MediaUpload>(
|
|
||||||
"im.nheko", 1, 0, "MediaUpload", QStringLiteral("MediaUploads can not be created in Qml"));
|
|
||||||
qmlRegisterUncreatableMetaObject(emoji::staticMetaObject,
|
|
||||||
"im.nheko.EmojiModel",
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
"EmojiCategory",
|
|
||||||
QStringLiteral("Error: Only enums"));
|
|
||||||
|
|
||||||
qmlRegisterType<RoomDirectoryModel>("im.nheko", 1, 0, "RoomDirectoryModel");
|
|
||||||
|
|
||||||
qmlRegisterSingletonType<SelfVerificationStatus>(
|
|
||||||
"im.nheko", 1, 0, "SelfVerificationStatus", [](QQmlEngine *, QJSEngine *) -> QObject * {
|
|
||||||
auto ptr = new SelfVerificationStatus();
|
|
||||||
QObject::connect(ChatPage::instance(),
|
|
||||||
&ChatPage::initializeEmptyViews,
|
|
||||||
ptr,
|
|
||||||
&SelfVerificationStatus::invalidate);
|
|
||||||
return ptr;
|
|
||||||
});
|
|
||||||
qmlRegisterSingletonInstance("im.nheko", 1, 0, "MainWindow", this);
|
|
||||||
qmlRegisterSingletonInstance("im.nheko", 1, 0, "UIA", UIA::instance());
|
|
||||||
qmlRegisterSingletonInstance(
|
|
||||||
"im.nheko", 1, 0, "CallManager", ChatPage::instance()->callManager());
|
|
||||||
|
|
||||||
imgProvider = new MxcImageProvider();
|
imgProvider = new MxcImageProvider();
|
||||||
engine()->addImageProvider(QStringLiteral("MxcImage"), imgProvider);
|
engine()->addImageProvider(QStringLiteral("MxcImage"), imgProvider);
|
||||||
engine()->addImageProvider(QStringLiteral("colorimage"), new ColorImageProvider());
|
engine()->addImageProvider(QStringLiteral("colorimage"), new ColorImageProvider());
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
|
@ -40,11 +41,32 @@ class ReCaptcha;
|
||||||
class MainWindow : public QQuickView
|
class MainWindow : public QQuickView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_SINGLETON
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWindow *parent = nullptr);
|
explicit MainWindow(QWindow *parent);
|
||||||
|
|
||||||
static MainWindow *instance() { return instance_; }
|
static MainWindow *instance() { return instance_; }
|
||||||
|
static MainWindow *create(QQmlEngine *qmlEngine, QJSEngine *)
|
||||||
|
{
|
||||||
|
// The instance has to exist before it is used. We cannot replace it.
|
||||||
|
Q_ASSERT(instance_);
|
||||||
|
|
||||||
|
// The engine has to have the same thread affinity as the singleton.
|
||||||
|
Q_ASSERT(qmlEngine->thread() == instance_->thread());
|
||||||
|
|
||||||
|
// There can only be one engine accessing the singleton.
|
||||||
|
static QJSEngine *s_engine = nullptr;
|
||||||
|
if (s_engine)
|
||||||
|
Q_ASSERT(qmlEngine == s_engine);
|
||||||
|
else
|
||||||
|
s_engine = qmlEngine;
|
||||||
|
|
||||||
|
QJSEngine::setObjectOwnership(instance_, QJSEngine::CppOwnership);
|
||||||
|
return instance_;
|
||||||
|
}
|
||||||
|
|
||||||
void saveCurrentWindowSize();
|
void saveCurrentWindowSize();
|
||||||
|
|
||||||
void openJoinRoomDialog(std::function<void(const QString &room_id)> callback);
|
void openJoinRoomDialog(std::function<void(const QString &room_id)> callback);
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
|
#include <QQmlEngine>
|
||||||
|
|
||||||
#include <mtx/events/power_levels.hpp>
|
#include <mtx/events/power_levels.hpp>
|
||||||
|
|
||||||
#include "CacheStructs.h"
|
#include "CacheStructs.h"
|
||||||
|
|
||||||
class MemberListBackend : public QAbstractListModel
|
class MemberListBackend : public QAbstractListModel
|
||||||
|
@ -80,6 +80,8 @@ private:
|
||||||
class MemberList : public QSortFilterProxyModel
|
class MemberList : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_UNCREATABLE("MemberList needs to be instantiated from C++")
|
||||||
|
|
||||||
Q_PROPERTY(QString roomName READ roomName NOTIFY roomNameChanged)
|
Q_PROPERTY(QString roomName READ roomName NOTIFY roomNameChanged)
|
||||||
Q_PROPERTY(int memberCount READ memberCount NOTIFY memberCountChanged)
|
Q_PROPERTY(int memberCount READ memberCount NOTIFY memberCountChanged)
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -54,6 +55,8 @@ private:
|
||||||
class ReadReceiptsProxy : public QSortFilterProxyModel
|
class ReadReceiptsProxy : public QSortFilterProxyModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_UNCREATABLE("Needs to be instantiated from C++")
|
||||||
|
|
||||||
Q_PROPERTY(QString eventId READ eventId CONSTANT)
|
Q_PROPERTY(QString eventId READ eventId CONSTANT)
|
||||||
Q_PROPERTY(QString roomId READ roomId CONSTANT)
|
Q_PROPERTY(QString roomId READ roomId CONSTANT)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#include <mtx/user_interactive.hpp>
|
#include <mtx/user_interactive.hpp>
|
||||||
|
@ -15,6 +16,7 @@
|
||||||
class RegisterPage : public QObject
|
class RegisterPage : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_NAMED_ELEMENT(Registration)
|
||||||
|
|
||||||
Q_PROPERTY(QString error READ error NOTIFY errorChanged)
|
Q_PROPERTY(QString error READ error NOTIFY errorChanged)
|
||||||
Q_PROPERTY(QString hsError READ hsError NOTIFY hsErrorChanged)
|
Q_PROPERTY(QString hsError READ hsError NOTIFY hsErrorChanged)
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -27,6 +28,7 @@ struct PublicRooms;
|
||||||
class RoomDirectoryModel : public QAbstractListModel
|
class RoomDirectoryModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
|
||||||
Q_PROPERTY(bool loadingMoreRooms READ loadingMoreRooms NOTIFY loadingMoreRoomsChanged)
|
Q_PROPERTY(bool loadingMoreRooms READ loadingMoreRooms NOTIFY loadingMoreRoomsChanged)
|
||||||
Q_PROPERTY(
|
Q_PROPERTY(
|
||||||
|
|
|
@ -184,8 +184,7 @@ SingleImagePackModel::canEdit() const
|
||||||
if (roomid_.empty())
|
if (roomid_.empty())
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return Permissions(QString::fromStdString(roomid_))
|
return Permissions(QString::fromStdString(roomid_)).canChange(MtxEvent::ImagePackInRoom);
|
||||||
.canChange(qml_mtx_events::ImagePackInRoom);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include <QAbstractListModel>
|
#include <QAbstractListModel>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QQmlEngine>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
#include <mtx/events/mscs/image_packs.hpp>
|
#include <mtx/events/mscs/image_packs.hpp>
|
||||||
|
@ -16,6 +17,8 @@
|
||||||
class SingleImagePackModel : public QAbstractListModel
|
class SingleImagePackModel : public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
QML_ELEMENT
|
||||||
|
QML_UNCREATABLE("Needs to be instantiated from C++")
|
||||||
|
|
||||||
Q_PROPERTY(QString roomid READ roomid CONSTANT)
|
Q_PROPERTY(QString roomid READ roomid CONSTANT)
|
||||||
Q_PROPERTY(QString statekey READ statekey WRITE setStatekey NOTIFY statekeyChanged)
|
Q_PROPERTY(QString statekey READ statekey WRITE setStatekey NOTIFY statekeyChanged)
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue