Rename components.

This commit is contained in:
Black Hat 2018-03-02 23:05:32 +08:00
parent 4347755a71
commit b88cc6964d
7 changed files with 43 additions and 3 deletions

20
qml/Contact.qml Normal file
View File

@ -0,0 +1,20 @@
import QtQuick 2.10
import QtQuick.Controls 2.3
import "qrc:/qml/form"
Page {
property var contactListModel
ListForm {
id: roomListForm
height: parent.height
width: 320
listModel: roomListModel
}
DetailForm {
id: detailForm
anchors.fill: parent
anchors.leftMargin: roomListForm.width
}
}

View File

@ -5,7 +5,7 @@ import "qrc:/qml/form"
Page { Page {
property var roomListModel property var roomListModel
RoomListForm { ListForm {
id: roomListForm id: roomListForm
height: parent.height height: parent.height
width: 320 width: 320

View File

@ -3,6 +3,8 @@ import QtQuick.Controls 2.3
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
Image { Image {
property bool statusIndicator
id: avatar id: avatar
mipmap: true mipmap: true
@ -30,5 +32,6 @@ Image {
color: "transparent" color: "transparent"
border.color: "#4caf50" border.color: "#4caf50"
border.width: 4 border.width: 4
visible: statusIndicator
} }
} }

View File

@ -51,6 +51,7 @@ ApplicationWindow {
height: parent.width height: parent.width
source: "qrc:/asset/img/avatar.png" source: "qrc:/asset/img/avatar.png"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
statusIndicator: true
} }
page: Room { page: Room {
@ -80,6 +81,21 @@ ApplicationWindow {
} }
} }
ButtonDelegate {
contentItem: Text {
text: "\ue5d2"
font.pointSize: 16
font.family: materialFont.name
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
page: Contact {
id: contactPage
}
}
ButtonDelegate { ButtonDelegate {
contentItem: Text { contentItem: Text {
text: "\ue8b8" text: "\ue8b8"

View File

@ -11,8 +11,9 @@
<file>qml/component/ImageStatus.qml</file> <file>qml/component/ImageStatus.qml</file>
<file>qml/component/SideNav.qml</file> <file>qml/component/SideNav.qml</file>
<file>qml/form/RoomForm.qml</file> <file>qml/form/RoomForm.qml</file>
<file>qml/form/RoomListForm.qml</file>
<file>qml/Room.qml</file> <file>qml/Room.qml</file>
<file>qml/form/RoomDetailForm.qml</file> <file>qml/form/DetailForm.qml</file>
<file>qml/form/ListForm.qml</file>
<file>qml/Contact.qml</file>
</qresource> </qresource>
</RCC> </RCC>