Commit 8033f45a authored by Martin Straka's avatar Martin Straka

Added send message qml and new svg resources

parent 24651587
......@@ -72,6 +72,7 @@ ApplicationWindow {
property Component pageMessageDetail: PageMessageDetail {}
property Component pageMessageList: PageMessageList {}
property Component pageMessageSearch: PageMessageSearch {}
property Component pageSendMessage: PageSendMessage {}
property Component pageSettingsAccount: PageSettingsAccount {}
property Component pageSettingsGeneral: PageSettingsGeneral {}
property Component pageSettingsPin: PageSettingsPin {}
......
......@@ -40,6 +40,8 @@ Item {
property var pageView
property var statusBar
property string userName
// sendMsgRecipientModel holds recipient list from send message page (can be NULL)
property var sendMsgRecipientModel: null
/* These properties remember choice of ComboBoxes */
property string searchType: "GENERAL"
......@@ -298,6 +300,9 @@ Item {
}
DataboxList {
id: databoxList
// Set isSendMsgAddRecipent on True if sendMsgRecipientModel is NOT NULL.
// It allows to add databoxes to sendMsgRecipientModel.
isSendMsgAddRecipent: !(sendMsgRecipientModel == null)
anchors.top: searchPanel.bottom
anchors.bottom: parent.bottom
clip: true
......@@ -307,15 +312,32 @@ Item {
width: parent.width
interactive: true
model: proxyDataboxModel
sendMsgRecipientListModel: sendMsgRecipientModel
onDbClicked: {
statusBar.visible = false
pageView.push(pageDataboxDetail, {
"pageView": pageView,
"statusBar": statusBar,
"userName": userName,
"dbID": dbID,
"dbType": dbType
}, StackView.Immediate)
// If sendMsgRecipientModel is NULL, we show databox detail page
if (sendMsgRecipientModel == null) {
pageView.push(pageDataboxDetail, {
"pageView": pageView,
"statusBar": statusBar,
"userName": userName,
"dbID": dbID,
"dbType": dbType
}, StackView.Immediate)
} else {
// sendMsgRecipientModel exists so we can add/append new databox to sendMsgRecipientModel
var isInRecipientList = false
// remove duplications
for (var i = 0; i < sendMsgRecipientModel.rowCount(); i++) {
if (sendMsgRecipientModel.get(i).rDbID === dbID) {
isInRecipientList = true
break
}
}
if (!isInRecipientList) {
sendMsgRecipientModel.append({"rDbType": dbType, "rDbID": dbID, "rDbName": dbName, "rDbAddress": dbAddress, "rDbIc": dbIc, "rDbEffectiveOvm": dbEffectiveOvm, "rDbSendOption": dbSendOption})
}
}
}
} // DataboxList
Connections {
......
......@@ -75,6 +75,11 @@ Component {
image: "qrc:/ui/account-box.svg"
showNext: true
}
ListElement {
index: 6
name: qsTr("Create message")
image: "qrc:/ui/pencil-box-outline.svg"
}
ListElement {
index: 5
name: qsTr("Find databox")
......@@ -186,6 +191,13 @@ Component {
"statusBar": statusBar,
"userName": userName,
}, StackView.Immediate)
} else if (index == 6) {
pageView.replace(pageSendMessage, {
"pageView": pageView,
"statusBar": statusBar,
"userName": userName,
"action": "new"
}, StackView.Immediate)
} else {
pageView.pop(StackView.Immediate)
}
......
This diff is collapsed.
......@@ -35,6 +35,7 @@
<file>ui/account-plus.svg</file>
<file>ui/account-remove.svg</file>
<file>ui/account-search.svg</file>
<file>ui/add.svg</file>
<file>ui/alert.svg</file>
<file>ui/archive.svg</file>
<file>ui/arrow-down-bold-circle.svg</file>
......@@ -73,6 +74,7 @@
<file>ui/magnify.svg</file>
<file>ui/paperclip.svg</file>
<file>ui/pencil-box-outline.svg</file>
<file>ui/remove.svg</file>
<file>ui/reply.svg</file>
<file>ui/settings.svg</file>
<file>ui/tag-text-outline.svg</file>
......@@ -120,6 +122,7 @@
<file>../qml/pages/PageMessageDetail.qml</file>
<file>../qml/pages/PageMessageList.qml</file>
<file>../qml/pages/PageMessageSearch.qml</file>
<file>../qml/pages/PageSendMessage.qml</file>
<file>../qml/pages/PageSettingsAccount.qml</file>
<file>../qml/pages/PageSettingsGeneral.qml</file>
<file>../qml/pages/PageSettingsPin.qml</file>
......
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>
\ No newline at end of file
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
\ No newline at end of file
......@@ -95,6 +95,7 @@ const struct QmlTypeEntry qmlPages[] = {
{ "PageMessageDetail", 1, 0 },
{ "PageMessageList", 1, 0 },
{ "PageMessageSearch", 1, 0 },
{ "PageSendMessage", 1, 0 },
{ "PageSettingsAccount", 1, 0 },
{ "PageSettingsGeneral", 1, 0 },
{ "PageSettingsPin", 1, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment