Spectral/qml/Room.qml

46 lines
984 B
QML
Raw Normal View History

2018-07-12 01:44:41 +00:00
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Matrique 0.1
import Matrique.Settings 0.1
2018-03-05 11:11:55 +00:00
import "form"
2018-02-23 14:39:14 +00:00
Page {
property alias connection: roomListModel.connection
2018-02-28 09:10:42 +00:00
id: page
RoomListModel {
id: roomListModel
2018-07-19 05:54:59 +00:00
onRoomAdded: if (!MSettings.lazyLoad) room.getPreviousContent(20)
onNewMessage: if (!window.active) matriqueController.showMessage(roomName, content, icon)
2018-02-23 14:39:14 +00:00
}
RowLayout {
2018-02-23 14:39:14 +00:00
anchors.fill: parent
spacing: 0
RoomListForm {
id: roomListForm
Layout.fillHeight: true
Layout.preferredWidth: MSettings.miniMode ? 80 : page.width * 0.35
2018-07-20 04:14:02 +00:00
Layout.minimumWidth: 80
Layout.maximumWidth: 360
2018-07-19 05:54:59 +00:00
listModel: roomListModel
}
RoomForm {
id: roomForm
Layout.fillWidth: true
Layout.fillHeight: true
currentRoom: roomListForm.enteredRoom
}
2018-02-23 14:39:14 +00:00
}
}