diff --git a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml index 1f3448be19e976eb3a863b82206df0ff3cdc13e9..b6afd02356207ed2e61610d2b207907f00ea9ccd 100644 --- a/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml +++ b/CellFrameDashboardGUI/DapUiQmlScreenMainWindowForm.ui.qml @@ -77,106 +77,13 @@ Page { } } - Rectangle { + DapUiQmlWidgetStatusBar { id: rectangleStatusBar anchors.left: rectangleTabsBorder.right anchors.top: parent.top anchors.right: parent.right color: "#B5B5B5" 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 { diff --git a/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml new file mode 100644 index 0000000000000000000000000000000000000000..5fd520f8af64c68f3c776ea03338083d85138390 --- /dev/null +++ b/CellFrameDashboardGUI/DapUiQmlWidgetStatusBar.qml @@ -0,0 +1,115 @@ +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 + } + } + } + } +} diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index efc40e67400d799a61b9b692822867e8365dcdca..5bb5d9f83af2b52967f235971fee2a73d86c585d 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -42,7 +42,6 @@ <file>DapUiQmlWidgetExchangeOrderContentForm.ui.qml</file> <file>DapUiQmlWidgetExchangeOrderButtonForm.ui.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_hover.png</file> <file>Resources/Icons/ic_scroll-up.png</file> @@ -63,5 +62,6 @@ <file>DapUiQmlWidgetConsoleForm.ui.qml</file> <file>Resources/Icons/ic_arrow_drop_down.png</file> <file>Resources/Icons/ic_arrow_drop_up.png</file> + <file>DapUiQmlWidgetStatusBar.qml</file> </qresource> </RCC>