Capitalization, list model and room header work
- Standardized capitalization for variables and file names everywhere in QML and JS, get rid of mixed camelCase/snakeCase, use camelCase like everywhere in Qt - ListModel items are now stored and returned as real QObjects with PyQt properties and signals. This makes dynamic property binding a lot easier and eliminates the need for many hacks. - New update(), updateOrAppendWhere() methods and roles property for ListModel - RoomHeader now properly updates when the room title or topic changes - Add Backend.pdb(), to make it easier to start the debugger from QML
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.4 as Controls1
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Layouts 1.4
|
||||
import "side_pane" as SidePane
|
||||
import "sidePane" as SidePane
|
||||
import "chat" as Chat
|
||||
|
||||
//https://doc.qt.io/qt-5/qml-qtquick-controls-splitview.html
|
||||
@@ -14,12 +15,9 @@ Controls1.SplitView {
|
||||
}
|
||||
|
||||
StackView {
|
||||
function show_page(componentName) {
|
||||
pageStack.replace(componentName + ".qml")
|
||||
}
|
||||
function show_room(user_id, room_obj) {
|
||||
function showRoom(userId, roomId) {
|
||||
pageStack.replace(
|
||||
"chat/Root.qml", { user_id: user_id, room: room_obj }
|
||||
"chat/Root.qml", { userId: userId, roomId: roomId }
|
||||
)
|
||||
console.log("replaced")
|
||||
}
|
||||
@@ -28,6 +26,12 @@ Controls1.SplitView {
|
||||
|
||||
onCurrentItemChanged: currentItem.forceActiveFocus()
|
||||
|
||||
initialItem: MouseArea { // TODO: (test, remove)
|
||||
onClicked: pageStack.showRoom(
|
||||
"@test_mary:matrix.org", "!VDSsFIzQnXARSCVNxS:matrix.org"
|
||||
)
|
||||
}
|
||||
|
||||
// Buggy
|
||||
replaceExit: null
|
||||
popExit: null
|
||||
|
Reference in New Issue
Block a user