Skip to content
Snippets Groups Projects
Commit 57294123 authored by jonymt's avatar jonymt
Browse files

[*] connected with test list model

parent b45eb8d8
No related branches found
No related tags found
1 merge request!21Features 2410
Pipeline #896 passed with stage
in 3 minutes and 19 seconds
...@@ -77,106 +77,13 @@ Page { ...@@ -77,106 +77,13 @@ Page {
} }
} }
Rectangle { DapUiQmlWidgetStatusBar {
id: rectangleStatusBar id: rectangleStatusBar
anchors.left: rectangleTabsBorder.right anchors.left: rectangleTabsBorder.right
anchors.top: parent.top anchors.top: parent.top
anchors.right: parent.right anchors.right: parent.right
color: "#B5B5B5" color: "#B5B5B5"
height: 60 * pt height: 60 * pt
Rectangle {
anchors.fill: parent
anchors.bottomMargin: 1
color: "#F2F2F4"
ComboBox {
id: comboboxWallet
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: 30 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
model: dapChainWalletsModel
textRole: "name"
indicator: Image {
source: comboboxWallet.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png"
width: 24 * pt
height: 24 * pt
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10 * pt
}
}
Label {
id: titleWalletBalance
anchors.top: parent.top
anchors.left: comboboxWallet.right
anchors.bottom: parent.bottom
anchors.leftMargin: 40 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
verticalAlignment: Qt.AlignVCenter
text: "Wallet balance:"
font.family: "Regular"
font.pixelSize: 12 * pt
color: "#A7A7A7"
}
Label {
id: fieldWalletBalance
anchors.top: parent.top
anchors.left: titleWalletBalance.right
anchors.bottom: parent.bottom
anchors.leftMargin: 16 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
verticalAlignment: Qt.AlignVCenter
font.family: "Regular"
font.pixelSize: 16 * pt
color: "#797979"
text: "$ 0"
}
Button {
width: 130 * pt
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 10 * pt
anchors.rightMargin: 20 * pt
anchors.bottom: parent.bottom
anchors.bottomMargin: 10 * pt
contentItem: Rectangle {
anchors.fill: parent
border.color: "#B5B5B5"
border.width: 1 * pt
color: "transparent"
Text {
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
anchors.rightMargin: 20 * pt
font.family: "Regular"
color: "#505559"
text: qsTr("New wallet")
}
Image {
id: iconNewWallet
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10 * pt
source: "qrc:/Resources/Icons/defaul_icon.png"
width: 28 * pt
height: 28 * pt
}
}
}
}
} }
Rectangle { Rectangle {
......
import QtQuick 2.0
import QtQuick.Controls 2.12
Rectangle {
Rectangle {
anchors.fill: parent
anchors.bottomMargin: 1
color: "#F2F2F4"
ListModel {
id: testModel
ListElement {
name: "First wallet"
balance: "$ 3 000"
}
ListElement {
name: "Second wallet"
balance: "$ 1 500"
}
}
ComboBox {
id: comboboxWallet
anchors.left: parent.left
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.leftMargin: 30 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
// model: dapChainWalletsModel
model: testModel
textRole: "name"
indicator: Image {
source: comboboxWallet.popup.visible ? "qrc:/Resources/Icons/ic_arrow_drop_up.png" : "qrc:/Resources/Icons/ic_arrow_drop_down.png"
width: 24 * pt
height: 24 * pt
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10 * pt
}
onCurrentIndexChanged: {
fieldWalletBalance.text = testModel.get(currentIndex).balance;
}
}
Label {
id: titleWalletBalance
anchors.top: parent.top
anchors.left: comboboxWallet.right
anchors.bottom: parent.bottom
anchors.leftMargin: 40 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
verticalAlignment: Qt.AlignVCenter
text: "Wallet balance:"
font.family: "Regular"
font.pixelSize: 12 * pt
color: "#A7A7A7"
}
Label {
id: fieldWalletBalance
anchors.top: parent.top
anchors.left: titleWalletBalance.right
anchors.bottom: parent.bottom
anchors.leftMargin: 16 * pt
anchors.topMargin: 10 * pt
anchors.bottomMargin: 10 * pt
verticalAlignment: Qt.AlignVCenter
font.family: "Regular"
font.pixelSize: 16 * pt
color: "#797979"
}
Button {
width: 130 * pt
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: 10 * pt
anchors.rightMargin: 20 * pt
anchors.bottom: parent.bottom
anchors.bottomMargin: 10 * pt
contentItem: Rectangle {
anchors.fill: parent
border.color: "#B5B5B5"
border.width: 1 * pt
color: "transparent"
Text {
anchors.fill: parent
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignRight
anchors.rightMargin: 20 * pt
font.family: "Regular"
color: "#505559"
text: qsTr("New wallet")
}
Image {
id: iconNewWallet
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 10 * pt
source: "qrc:/Resources/Icons/defaul_icon.png"
width: 28 * pt
height: 28 * pt
}
}
}
}
}
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
<file>DapUiQmlWidgetExchangeOrderContentForm.ui.qml</file> <file>DapUiQmlWidgetExchangeOrderContentForm.ui.qml</file>
<file>DapUiQmlWidgetExchangeOrderButtonForm.ui.qml</file> <file>DapUiQmlWidgetExchangeOrderButtonForm.ui.qml</file>
<file>DapUiQmlScreenHistory.qml</file> <file>DapUiQmlScreenHistory.qml</file>
<file>Resources/Icons/defaul_icon.png</file>
<file>Resources/Icons/ic_scroll-down.png</file> <file>Resources/Icons/ic_scroll-down.png</file>
<file>Resources/Icons/ic_scroll-down_hover.png</file> <file>Resources/Icons/ic_scroll-down_hover.png</file>
<file>Resources/Icons/ic_scroll-up.png</file> <file>Resources/Icons/ic_scroll-up.png</file>
...@@ -63,5 +62,6 @@ ...@@ -63,5 +62,6 @@
<file>DapUiQmlWidgetConsoleForm.ui.qml</file> <file>DapUiQmlWidgetConsoleForm.ui.qml</file>
<file>Resources/Icons/ic_arrow_drop_down.png</file> <file>Resources/Icons/ic_arrow_drop_down.png</file>
<file>Resources/Icons/ic_arrow_drop_up.png</file> <file>Resources/Icons/ic_arrow_drop_up.png</file>
<file>DapUiQmlWidgetStatusBar.qml</file>
</qresource> </qresource>
</RCC> </RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment