diff --git a/KelvinDashboardGUI/DapUiQmlScreenDialog.qml b/KelvinDashboardGUI/DapUiQmlScreenDialog.qml index 1b98ea59d14d267b693ede0324c13e46b57c8926..4ace742929a23307d9859a054d2265e469bdd8bc 100644 --- a/KelvinDashboardGUI/DapUiQmlScreenDialog.qml +++ b/KelvinDashboardGUI/DapUiQmlScreenDialog.qml @@ -58,5 +58,5 @@ Page { } } - DapUiQmlWidgetLastActions {} + DapUiQmlWidgetLastActionsForms {} } diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActions.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActions.ui.qml deleted file mode 100644 index 90de7fee183bb14bc3bf210cf29612b50c726373..0000000000000000000000000000000000000000 --- a/KelvinDashboardGUI/DapUiQmlWidgetLastActions.ui.qml +++ /dev/null @@ -1,269 +0,0 @@ -import QtQuick 2.9 -import QtQml 2.12 -import QtQuick.Controls 2.2 -import QtQuick.Layouts 1.12 - -import DapTransactionHistory 1.0 - -Rectangle { - width: 400 * pt - border.color: "#B5B5B5" - border.width: 1 * pt - color: "#EDEFF2" - - anchors { - top: parent.top - right: parent.right - bottom: parent.bottom - } - - MouseArea { - id: mainMouseArea - anchors.fill: parent - hoverEnabled: true - - onEntered: { - if(!buttonListScroll.isHovered) - buttonListScroll.visible = true; - } - - onExited: { - if(!buttonListScroll.isHovered) - buttonListScroll.visible = false; - } - } - -// Rectangle { -// id: dapHeader -// width: parent.width -// height: 36 * pt -// color: "#EDEFF2" - -// Item { -// width: childrenRect.width -// height: childrenRect.height -// anchors.top: parent.top -// anchors.left: parent.left - -// anchors.leftMargin: 16 * pt -// anchors.topMargin: 13 - -// Text { -// text: qsTr("Last actions") -// font.family: "Roboto" -// font.pixelSize: 12 * pt -// color: "#5F5F63" -// } -// } -// } - - DapUiQmlWidgetLastActionsHeader { - id: dapHeader - } - - ListView { - id: dapListView - anchors.top: dapHeader.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - clip: true - - model: dapHistoryModel -// delegate: dapDelegate - delegate: DapUiQmlWidgetLastActionsDelegate {} - section.property: "date" - section.criteria: ViewSection.FullString -// section.delegate: dapDate - section.delegate: DapUiQmlWidgetLastActionsSection {} - - property var contentPos: 0.0; - onContentYChanged: { - if(atYBeginning) buttonListScroll.state = "goUp"; - else if(atYEnd) buttonListScroll.state = "goDown" - else if(contentPos < contentItem.y) buttonListScroll.state = "goUp"; - else buttonListScroll.state = "goDown"; - - contentPos = contentItem.y; - } - -// Component { -// id: dapDate -// Rectangle { -// width: dapListView.width -// height: 30 * pt -// color: "#C2CAD1" - -// Text { -// anchors.fill: parent -// verticalAlignment: Qt.AlignVCenter -// horizontalAlignment: Qt.AlignLeft -// color: "#797979" -// text: section -// font.family: "Roboto" -// font.pixelSize: 12 * pt -// leftPadding: 16 * pt -// } -// } -// } - - - -// Component { -// id: dapDelegate - -// Rectangle { -// id: dapContentDelegate -// width: parent.width -// height: 50 * pt -// color: "transparent" - -// border.color: "#C2CAD1" -// border.width: 1 * pt - -// Rectangle { -// id: dapData -// width: childrenRect.width -// height: childrenRect.height -// Layout.alignment: Qt.AlignVCenter -// anchors.left: dapContentDelegate.left -// anchors.leftMargin: 16 * pt -// anchors.top: parent.top -// anchors.topMargin: 13 - -// Column { -// anchors.fill: parent -// spacing: 2 - -// Text { -// text: tokenName -// color: "#5F5F63" -// font.family: "Roboto Regular" -// font.pixelSize: 14 * pt -// } - -// Text { -// text: txStatus -// color: "#A7A7A7" -// font.family: "Roboto" -// font.pixelSize: 12 * pt -// } -// } -// } - -// Text { -// anchors.left: dapData.right -// anchors.top: parent.top -// anchors.right: parent.right -// anchors.bottom: parent.bottom -// anchors.rightMargin: 20 * pt - -// horizontalAlignment: Qt.AlignRight -// verticalAlignment: Qt.AlignVCenter -// color: "#505559" -// text: cryptocurrency; -// font.family: "Roboto" -// font.pixelSize: 14 * pt -// } - -// Rectangle { -// width: parent.width -// height: 1 * pt -// color: "#C7C9CC" -// anchors.bottom: parent.bottom -// } -// } -// } - - DapUiQmlWidgetLastActionsButton { - id: buttonListScroll - viewData: dapListView - } - -// Item { -// id: buttonListScroll - -// property bool listDown: true - -// width: 36 * pt -// height: width -// anchors.right: dapListView.right -// anchors.bottom: dapListView.bottom -// anchors.bottomMargin: 10 * pt -// anchors.topMargin: 10 * pt -// anchors.rightMargin: 10 * pt -// visible: false - -// Image { -// id: imageButton -// anchors.fill: parent -// fillMode: Image.PreserveAspectFit -// source: "qrc:/Resources/Icons/ic_scroll-down.png" -// } - -// states: [ -// State { -// name: "goDown" -// PropertyChanges { -// target: buttonListScroll -// onStateChanged: { -// buttonListScroll.anchors.top = undefined; -// buttonListScroll.anchors.bottom = dapListView.bottom; -// buttonMouseArea.exited(); -// } -// } -// }, - -// State { -// name: "goUp" -// PropertyChanges { -// target: buttonListScroll -// onStateChanged: { -// buttonListScroll.anchors.bottom = undefined; -// buttonListScroll.anchors.top = dapListView.top; -// buttonMouseArea.exited(); -// } -// } -// } -// ] - -// state: "goDown" - -// MouseArea { -// id: buttonMouseArea -// anchors.fill: parent -// hoverEnabled: true - -// onEntered: { -// mainMouseArea.hoveredButton = true; -// if(buttonListScroll.state === "goUp") -// imageButton.source = "qrc:/Resources/Icons/ic_scroll-down_hover.png"; -// else if(buttonListScroll.state === "goDown") -// imageButton.source = "qrc:/Resources/Icons/ic_scroll-up_hover.png"; - -// } - -// onExited: { -// mainMouseArea.hoveredButton = false; -// if(buttonListScroll.state === "goUp") -// imageButton.source = "qrc:/Resources/Icons/ic_scroll-down.png"; -// else if(buttonListScroll.state === "goDown") -// imageButton.source = "qrc:/Resources/Icons/ic_scroll-up.png"; -// } - -// onClicked: { -// if(buttonListScroll.state === "goUp") -// { -// dapListView.positionViewAtEnd(); -// buttonListScroll.state = "goDown"; -// } -// else if(buttonListScroll.state === "goDown") -// { -// dapListView.positionViewAtBeginning(); -// buttonListScroll.state = "goUp"; -// } -// } -// } -// } - } -} diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsButton.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsButtonForms.qml similarity index 100% rename from KelvinDashboardGUI/DapUiQmlWidgetLastActionsButton.ui.qml rename to KelvinDashboardGUI/DapUiQmlWidgetLastActionsButtonForms.qml diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegate.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegateForms.qml similarity index 98% rename from KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegate.ui.qml rename to KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegateForms.qml index 1d8acff144ab933013e3ec572107e7dc4dadb294..66af5b4500966a15ef2c9ca47832ebf634d4faec 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegate.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsDelegateForms.qml @@ -4,8 +4,6 @@ import QtQuick.Controls 2.2 import QtQuick.Layouts 1.12 Component { -// id: dapDelegate - Rectangle { id: dapContentDelegate width: parent.width diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForms.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForms.qml new file mode 100644 index 0000000000000000000000000000000000000000..379cd00b82150d3a05b1abedecaf5d22724e505e --- /dev/null +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsForms.qml @@ -0,0 +1,69 @@ +import QtQuick 2.9 +import QtQml 2.12 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.12 + +import DapTransactionHistory 1.0 + +Rectangle { + width: 400 * pt + border.color: "#B5B5B5" + border.width: 1 * pt + color: "#EDEFF2" + + anchors { + top: parent.top + right: parent.right + bottom: parent.bottom + } + + MouseArea { + id: mainMouseArea + anchors.fill: parent + hoverEnabled: true + + onEntered: { + if(!buttonListScroll.isHovered) + buttonListScroll.visible = true; + } + + onExited: { + if(!buttonListScroll.isHovered) + buttonListScroll.visible = false; + } + } + + DapUiQmlWidgetLastActionsHeaderForms { + id: dapHeader + } + + ListView { + id: dapListView + anchors.top: dapHeader.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + clip: true + + model: dapHistoryModel + delegate: DapUiQmlWidgetLastActionsDelegateForms {} + section.property: "date" + section.criteria: ViewSection.FullString + section.delegate: DapUiQmlWidgetLastActionsSectionForms {} + + property var contentPos: 0.0; + onContentYChanged: { + if(atYBeginning) buttonListScroll.state = "goUp"; + else if(atYEnd) buttonListScroll.state = "goDown" + else if(contentPos < contentItem.y) buttonListScroll.state = "goUp"; + else buttonListScroll.state = "goDown"; + + contentPos = contentItem.y; + } + + DapUiQmlWidgetLastActionsButtonForms { + id: buttonListScroll + viewData: dapListView + } + } +} diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsHeader.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsHeaderForms.qml similarity index 100% rename from KelvinDashboardGUI/DapUiQmlWidgetLastActionsHeader.ui.qml rename to KelvinDashboardGUI/DapUiQmlWidgetLastActionsHeaderForms.qml diff --git a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsSection.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsSectionForms.qml similarity index 96% rename from KelvinDashboardGUI/DapUiQmlWidgetLastActionsSection.ui.qml rename to KelvinDashboardGUI/DapUiQmlWidgetLastActionsSectionForms.qml index 7b3137157d53b6e52f4817641829da0a52a8e631..2f57446cc5f0365f4aefd64d9538c37c21d1d724 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetLastActionsSection.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetLastActionsSectionForms.qml @@ -4,7 +4,6 @@ import QtQuick.Controls 2.2 import QtQuick.Layouts 1.12 Component { -// id: dapDate Rectangle { width: dapListView.width height: 30 * pt diff --git a/KelvinDashboardGUI/qml.qrc b/KelvinDashboardGUI/qml.qrc index 565dfeceac810344125be7db26fee1f3e0b30226..aa9389073691678c6a8412b4649f27d38e441bb3 100755 --- a/KelvinDashboardGUI/qml.qrc +++ b/KelvinDashboardGUI/qml.qrc @@ -29,14 +29,14 @@ <file>DapUiQmlWidgetNodeNetworkExplorer.qml</file> <file>DapUiQmlScreenHistory.qml</file> <file>Resources/Icons/defaul_icon.png</file> - <file>DapUiQmlWidgetLastActions.ui.qml</file> + <file>DapUiQmlWidgetLastActionsForms.qml</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> <file>Resources/Icons/ic_scroll-up_hover.png</file> - <file>DapUiQmlWidgetLastActionsButton.ui.qml</file> - <file>DapUiQmlWidgetLastActionsDelegate.ui.qml</file> - <file>DapUiQmlWidgetLastActionsSection.ui.qml</file> - <file>DapUiQmlWidgetLastActionsHeader.ui.qml</file> + <file>DapUiQmlWidgetLastActionsButtonForms.qml</file> + <file>DapUiQmlWidgetLastActionsDelegateForms.qml</file> + <file>DapUiQmlWidgetLastActionsSectionForms.qml</file> + <file>DapUiQmlWidgetLastActionsHeaderForms.qml</file> </qresource> </RCC>