diff --git a/CellFrameDashboardGUI/DapApplication.cpp b/CellFrameDashboardGUI/DapApplication.cpp index 7722edc097244895f149656985dc9b7ef3fd59c9..f62a3d6dc287865c3d84f010aa9b34d31774e442 100644 --- a/CellFrameDashboardGUI/DapApplication.cpp +++ b/CellFrameDashboardGUI/DapApplication.cpp @@ -15,6 +15,8 @@ DapApplication::DapApplication(int &argc, char **argv) this->setContextProperties(); qRegisterMetaType<DapNetwork::State>("DapNetwork::State"); + + connect(&DapServiceController::getInstance(), &DapServiceController::networksListReceived, this->networks(), &DapNetworksList::fill); } DapNetworksList *DapApplication::networks() diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index 3ea77f1898f2a59c5507e911cc47981c6200a728..940d52a2f9a49fc166362b1dce5931890608d88a 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -16,8 +16,6 @@ <file>main.qml</file> <file>resources/icons/cellframe-logo-dashboard.png</file> <file>screen/DapMainApplicationWindow.qml</file> - <file>screen/DapAbstractTopPanel.qml</file> - <file>screen/DapAbstractTopPanelForm.ui.qml</file> <file>screen/DapAbstractTab.qml</file> <file>screen/DapAbstractTabForm.ui.qml</file> <file>screen/DapAbstractScreen.qml</file> @@ -25,11 +23,8 @@ <file>screen/DapAbstractRightPanel.qml</file> <file>screen/DapAbstractRightPanelForm.ui.qml</file> <file>screen/desktop/Dashboard/DapDashboardScreen.qml</file> - <file>screen/desktop/Dashboard/DapDashboardScreenForm.ui.qml</file> <file>screen/desktop/Dashboard/DapDashboardTab.qml</file> - <file>screen/desktop/Dashboard/DapDashboardTabForm.ui.qml</file> <file>screen/desktop/Dashboard/DapDashboardTopPanel.qml</file> - <file>screen/desktop/Dashboard/DapDashboardTopPanelForm.ui.qml</file> <file>screen/desktop/Exchange/DapExchangeRightPanel.qml</file> <file>screen/desktop/Exchange/DapExchangeRightPanelForm.ui.qml</file> <file>screen/desktop/Exchange/DapExchangeScreen.qml</file> @@ -45,7 +40,6 @@ <file>screen/desktop/History/DapHistoryTab.qml</file> <file>screen/desktop/History/DapHistoryTabForm.ui.qml</file> <file>screen/desktop/History/DapHistoryTopPanel.qml</file> - <file>screen/desktop/History/DapHistoryTopPanelForm.ui.qml</file> <file>screen/mobile/Dashboard/DapDashboardRightPanel.qml</file> <file>screen/mobile/Dashboard/DapDashboardRightPanelForm.ui.qml</file> <file>screen/mobile/Dashboard/DapDashboardScreen.qml</file> @@ -79,7 +73,6 @@ <file>screen/desktop/Logs/DapLogsTab.qml</file> <file>screen/desktop/Logs/DapLogsTabForm.ui.qml</file> <file>screen/desktop/Logs/DapLogsTopPanel.qml</file> - <file>screen/desktop/Logs/DapLogsTopPanelForm.ui.qml</file> <file>screen/desktop/Logs/DapLogsScreen.qml</file> <file>screen/desktop/Logs/DapLogsScreenForm.ui.qml</file> <file>screen/desktop/Logs/DapLogsRightPanel.qml</file> @@ -105,7 +98,6 @@ <file>screen/desktop/Settings/DapSettingsTab.qml</file> <file>screen/desktop/Settings/DapSettingsTabForm.ui.qml</file> <file>screen/desktop/Settings/DapSettingsTopPanel.qml</file> - <file>screen/desktop/Settings/DapSettingsTopPanelForm.ui.qml</file> <file>screen/desktop/Settings/DapSettingsScreen.qml</file> <file>screen/desktop/Settings/DapSettingsScreenForm.ui.qml</file> <file>screen/desktop/Settings/DapSettingsRightPanel.qml</file> @@ -117,7 +109,6 @@ <file>screen/desktop/Console/DapConsoleScreen.qml</file> <file>screen/desktop/Console/DapConsoleScreenForm.ui.qml</file> <file>screen/desktop/Console/DapConsoleTopPanel.qml</file> - <file>screen/desktop/Console/DapConsoleTopPanelForm.ui.qml</file> <file>resources/icons/icon.ico</file> <file>resources/icons/ic_flag.png</file> <file>resources/icons/buy_icon.png</file> diff --git a/CellFrameDashboardGUI/screen/DapAbstractTopPanel.qml b/CellFrameDashboardGUI/screen/DapAbstractTopPanel.qml deleted file mode 100644 index b3fbfdb88a48dcf181be15d04f5185cffa49dcf2..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/DapAbstractTopPanel.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.4 - -DapAbstractTopPanelForm -{ - -} diff --git a/CellFrameDashboardGUI/screen/DapAbstractTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/DapAbstractTopPanelForm.ui.qml deleted file mode 100644 index 281abd6e11abe6a9d2158dded5c955b20368963a..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/DapAbstractTopPanelForm.ui.qml +++ /dev/null @@ -1,9 +0,0 @@ -import QtQuick 2.4 -import "qrc:/widgets" - -DapTopPanel -{ - dapFrame.height: 60 * pt - dapFrame.color: "#070023" - anchors.fill: parent -} diff --git a/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanel.qml index 787a411b17024265affed66b5b8dcb1250870df7..d4b3915cb68f7e0d006a350daa9455a5dd83d3ca 100644 --- a/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanel.qml @@ -1,6 +1,8 @@ import QtQuick 2.4 +import "../../" +import "qrc:/widgets" -DapConsoleTopPanelForm +DapTopPanel { } diff --git a/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanelForm.ui.qml deleted file mode 100644 index 893e3fab82ffd610d27655715f432e90ac0f8088..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Console/DapConsoleTopPanelForm.ui.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.4 -import "../../" - -DapAbstractTopPanelForm -{ - -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreen.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreen.qml index 2d04f2480c121db1c3f424ce9b53ec6042761e15..389f2e4f15d202c821a4b2acdd72eef736839f69 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreen.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreen.qml @@ -1,9 +1,178 @@ import QtQuick 2.4 import QtQuick.Layouts 1.2 import "qrc:/widgets" +import "../../" -DapDashboardScreenForm + +DapAbstractScreen { + id: dapDashboardScreen + dapFrame.color: "#FFFFFF" + anchors.fill: parent + anchors.leftMargin: 24 * pt + anchors.rightMargin: 24 * pt + + // Paths to currency emblems + property string bitCoinImagePath: "qrc:/resources/icons/tkn1_icon_light.png" + property string ethereumImagePath: "qrc:/resources/icons/tkn2_icon.png" + property string newGoldImagePath: "qrc:/resources/icons/ng_icon.png" + property string kelvinImagePath: "qrc:/resources/icons/ic_klvn.png" + ///@param dapButtonNewPayment Button to create a new payment. + property alias dapButtonNewPayment: buttonNewPayment + property alias dapListViewWallet: listViewWallet + property alias dapNameWalletTitle: titleText + property alias dapWalletCreateFrame: walletCreateFrame + property alias dapTitleBlock: titleBlock + property alias dapAddWalletButton: addWalletButton + + Rectangle + { + id: walletCreateFrame + anchors.fill: parent + anchors.horizontalCenter: parent.horizontalCenter + Column + { + anchors.horizontalCenter: parent.horizontalCenter + Rectangle + { + height: 200 * pt + width: parent.width + } + Image + { + id: iconCreateWallet + source: "qrc:/resources/icons/wallet.png" + width: 218 * pt + height: 180 * pt + anchors.horizontalCenter: parent.horizontalCenter + } + Rectangle + { + height: 24 * pt + width: parent.width + } + Text + { + id: titleTextWalletCreate + font.family: dapMainFonts.dapMainFontTheme.dapFontRobotoRegularCustom + font.pixelSize: 30 * pt + color: "#757184" + text: qsTr("Create our first wallet") + anchors.horizontalCenter: parent.horizontalCenter + } + Rectangle + { + height: 56 * pt + width: parent.width + } + DapButton + { + id: addWalletButton + implicitWidth: 124 * pt + implicitHeight: 40 * pt + textButton: "New wallet" + colorBackgroundHover: "#D51F5D" + colorBackgroundNormal: "#070023" + colorButtonTextNormal: "#FFFFFF" + colorButtonTextHover: "#FFFFFF" + fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + dapHorizontalAlignment: Qt.AlignHCenter + anchors.horizontalCenter: parent.horizontalCenter + } + Rectangle + { + height: Layout.fillHeight + width: parent.width + } + } + } + + Rectangle + { + id: titleBlock + anchors.top: parent.top + anchors.topMargin: 20 * pt + anchors.bottomMargin: 20 * pt + anchors.left: parent.left + anchors.right: parent.right + height: 36 * pt + + RowLayout + { + anchors.fill: parent + + Text + { + id: titleText + font.family: dapMainFonts.dapMainFontTheme.dapFontRobotoRegularCustom + font.pixelSize: 20 * pt + text: "My first crypto wallet" + width: 185 * pt + } + + MouseArea + { + id: walletNameEditButton + width: 16 * pt + height: 16 * pt + hoverEnabled: true + anchors.left: titleText.right + anchors.leftMargin: 12 * pt + + Image + { + id: walletNameEditButtonImage + anchors.fill: parent + source: parent.containsMouse ? "qrc:/resources/icons/ic_edit_hover.png" : "qrc:/resources/icons/ic_edit.png" + sourceSize.width: width + sourceSize.height: height + + } + } + + Item + { + Layout.fillWidth: true + Layout.fillHeight: true + } + + DapButton + { + id: buttonNewPayment + implicitWidth: 132 * pt + implicitHeight: 36 * pt + textButton: "New payment" + colorBackgroundHover: "#D51F5D" + colorBackgroundNormal: "#070023" + colorButtonTextNormal: "#FFFFFF" + colorButtonTextHover: "#FFFFFF" + normalImageButton: "qrc:/resources/icons/new-payment_icon.png" + hoverImageButton: "qrc:/resources/icons/new-payment_icon.png" + widthImageButton: 20 * pt + heightImageButton: 20 * pt + indentImageLeftButton: 15 * pt + indentTextRight: 15 * pt + fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + } + } + } + + ListView + { + id: listViewWallet + anchors.top: titleBlock.bottom + anchors.topMargin: 20 * pt + anchors.bottom: parent.bottom + width: parent.width + spacing: 5 * pt + clip: true + + delegate: delegateTokenView + } + + + + Component { id: delegateTokenView diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreenForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreenForm.ui.qml deleted file mode 100644 index 9b92ae528735473966693e32eefe0265d1ecdbdd..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardScreenForm.ui.qml +++ /dev/null @@ -1,172 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import QtQuick.Layouts 1.2 -import "qrc:/widgets" -import "../../" - -DapAbstractScreen -{ - id: dapDashboardScreen - dapFrame.color: "#FFFFFF" - anchors.fill: parent - anchors.leftMargin: 24 * pt - anchors.rightMargin: 24 * pt - - // Paths to currency emblems - property string bitCoinImagePath: "qrc:/resources/icons/tkn1_icon_light.png" - property string ethereumImagePath: "qrc:/resources/icons/tkn2_icon.png" - property string newGoldImagePath: "qrc:/resources/icons/ng_icon.png" - property string kelvinImagePath: "qrc:/resources/icons/ic_klvn.png" - ///@param dapButtonNewPayment Button to create a new payment. - property alias dapButtonNewPayment: buttonNewPayment - property alias dapListViewWallet: listViewWallet - property alias dapNameWalletTitle: titleText - property alias dapWalletCreateFrame: walletCreateFrame - property alias dapTitleBlock: titleBlock - property alias dapAddWalletButton: addWalletButton - - Rectangle - { - id: walletCreateFrame - anchors.fill: parent - anchors.horizontalCenter: parent.horizontalCenter - Column - { - anchors.horizontalCenter: parent.horizontalCenter - Rectangle - { - height: 200 * pt - width: parent.width - } - Image - { - id: iconCreateWallet - source: "qrc:/resources/icons/wallet.png" - width: 218 * pt - height: 180 * pt - anchors.horizontalCenter: parent.horizontalCenter - } - Rectangle - { - height: 24 * pt - width: parent.width - } - Text - { - id: titleTextWalletCreate - font.family: dapMainFonts.dapMainFontTheme.dapFontRobotoRegularCustom - font.pixelSize: 30 * pt - color: "#757184" - text: qsTr("Create our first wallet") - anchors.horizontalCenter: parent.horizontalCenter - } - Rectangle - { - height: 56 * pt - width: parent.width - } - DapButton - { - id: addWalletButton - implicitWidth: 124 * pt - implicitHeight: 40 * pt - textButton: "New wallet" - colorBackgroundHover: "#D51F5D" - colorBackgroundNormal: "#070023" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - dapHorizontalAlignment: Qt.AlignHCenter - anchors.horizontalCenter: parent.horizontalCenter - } - Rectangle - { - height: Layout.fillHeight - width: parent.width - } - } - } - - Rectangle - { - id: titleBlock - anchors.top: parent.top - anchors.topMargin: 20 * pt - anchors.bottomMargin: 20 * pt - anchors.left: parent.left - anchors.right: parent.right - height: 36 * pt - - RowLayout - { - anchors.fill: parent - - Text - { - id: titleText - font.family: dapMainFonts.dapMainFontTheme.dapFontRobotoRegularCustom - font.pixelSize: 20 * pt - text: "My first crypto wallet" - width: 185 * pt - } - - MouseArea - { - id: walletNameEditButton - width: 16 * pt - height: 16 * pt - hoverEnabled: true - anchors.left: titleText.right - anchors.leftMargin: 12 * pt - - Image - { - id: walletNameEditButtonImage - anchors.fill: parent - source: parent.containsMouse ? "qrc:/resources/icons/ic_edit_hover.png" : "qrc:/resources/icons/ic_edit.png" - sourceSize.width: width - sourceSize.height: height - - } - } - - Item - { - Layout.fillWidth: true - Layout.fillHeight: true - } - - DapButton - { - id: buttonNewPayment - implicitWidth: 132 * pt - implicitHeight: 36 * pt - textButton: "New payment" - colorBackgroundHover: "#D51F5D" - colorBackgroundNormal: "#070023" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - normalImageButton: "qrc:/resources/icons/new-payment_icon.png" - hoverImageButton: "qrc:/resources/icons/new-payment_icon.png" - widthImageButton: 20 * pt - heightImageButton: 20 * pt - indentImageLeftButton: 15 * pt - indentTextRight: 15 * pt - fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - } - } - } - - ListView - { - id: listViewWallet - anchors.top: titleBlock.bottom - anchors.topMargin: 20 * pt - anchors.bottom: parent.bottom - width: parent.width - spacing: 5 * pt - clip: true - - delegate: delegateTokenView - } -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml index f4ae2e19a1627ba66ea188f5744448219f419644..5388e64bc4351eb0181d0d1a7f74008638c8938a 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTab.qml @@ -1,9 +1,13 @@ import QtQuick 2.4 +import QtQuick.Controls 1.4 import "qrc:/" import "../../" -DapDashboardTabForm + + +DapAbstractTab { + ///@detalis Path to the right panel of transaction history. readonly property string transactionHistoryWallet: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapTransactionHistoryRightPanel.qml" ///@detalis Path to the right panel of input name wallet. @@ -19,25 +23,163 @@ DapDashboardTabForm ///@detalis Path to the right panel of new payment done. readonly property string newPaymentDone: "qrc:/screen/" + device + "/Dashboard/RightPanel/DapNewPaymentDoneRightPanel.qml" - // Setting the right pane by default - dapDashboardRightPanel.initialItem: Qt.resolvedUrl(lastActionsWallet); - property int dapIndexCurrentWallet: -1 - dapDashboardTopPanel.dapComboboxWallet.onCurrentIndexChanged: - { - if(dapDashboardTopPanel.dapComboboxWallet.currentIndex != -1) + id: dashboardTab + +// property alias dapDashboardRightPanel: stackViewRightPanel +// property alias dashboardTopPanel: dashboardTopPanel +// property alias dashboardTopPanel: dashboardScreen + + dapTopPanel: + DapDashboardTopPanel { - dapDashboardScreen.dapListViewWallet.model = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).networks - dapDashboardScreen.dapNameWalletTitle.text = dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).name - console.log("DapGetWalletHistoryCommand") - console.log(" network: " + dapServiceController.CurrentNetwork) - console.log(" chain: " + dapServiceController.CurrentChain) - console.log(" wallet address: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) - dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); - state = "WALLETSHOW" + id: dashboardTopPanel + dapComboboxWallet.onCurrentIndexChanged: + { + if(dapComboboxWallet.currentIndex != -1) + { + dashboardScreen.dapListViewWallet.model = dapModelWallets.get(dapComboboxWallet.currentIndex).networks + dashboardScreen.dapNameWalletTitle.text = dapModelWallets.get(dapComboboxWallet.currentIndex).name + console.log(dapComboboxWallet.currentIndex) + console.log(dapModelWallets.get(dapComboboxWallet.currentIndex)) + console.log("DapGetWalletHistoryCommand") + console.log(" network: " + dapServiceController.CurrentNetwork) + console.log(" chain: " + dapServiceController.CurrentChain) + console.log(" wallet address: " + dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) + dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); + dashboardTab.state = "WALLETSHOW" + } + } + dapAddWalletButton.onClicked: + { + createWallet() + dashboardTopPanel.dapWalletCreateFrame.visible = false; + dashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#D51F5D" + } } - } + + dapScreen: + DapDashboardScreen + { + id: dashboardScreen + dapAddWalletButton.onClicked: + { + createWallet() + dashboardTopPanel.dapWalletCreateFrame.visible = false; + dashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#D51F5D" + } + dapButtonNewPayment.onClicked: + { + console.log("New payment") + console.log("wallet from: " + dashboardTopPanel.dapComboboxWallet.mainLineText) + console.log("address wallet from: " + dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) + currentRightPanel = dapRightPanel.push({item:Qt.resolvedUrl(newPaymentMain), + properties: {dapCmboBoxTokenModel: dapModelWallets.get(dashboardTopPanel.dapComboboxWallet.currentIndex).networks, + dapCurrentWallet: dashboardTopPanel.dapComboboxWallet.mainLineText, + dapCmboBoxTokenModel: dapModelWallets.get(dashboardTopPanel.dapComboboxWallet.currentIndex).networks.get(dapServiceController.IndexCurrentNetwork).tokens, + dapTextSenderWalletAddress: dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)}}); + dashboardTopPanel.dapButtonNewPayment.colorBackgroundNormal = "#D51F5D" + } + } + + dapRightPanel: + StackView + { + id: stackViewRightPanel + initialItem: Qt.resolvedUrl(lastActionsWallet); + anchors.fill: parent + width: 400 + delegate: + StackViewDelegate + { + pushTransition: StackViewTransition { } + } + } + + state: "WALLETDEFAULT" + + states: + [ + State + { + name: "WALLETDEFAULT" + PropertyChanges + { + target: dashboardScreen.dapWalletCreateFrame; + visible: true + } + PropertyChanges + { + target: dashboardScreen.dapTitleBlock; + visible: false + } + PropertyChanges + { + target: dashboardScreen.dapListViewWallet; + visible: false + } + PropertyChanges + { + target: dapRightPanel; + visible: false + } + }, + State + { + name: "WALLETSHOW" + PropertyChanges + { + target: dashboardScreen.dapWalletCreateFrame; + visible: false + } + PropertyChanges + { + target: dashboardScreen.dapTitleBlock; + visible: true + } + PropertyChanges + { + target: dashboardScreen.dapListViewWallet; + visible: true + } + PropertyChanges + { + target: dapRightPanel; + visible: true + } + }, + State + { + name: "WALLETCREATE" + PropertyChanges + { + target: dashboardScreen.dapWalletCreateFrame; + visible: true + } + PropertyChanges + { + target: dashboardScreen.dapTitleBlock; + visible: false + } + PropertyChanges + { + target: dashboardScreen.dapListViewWallet; + visible: false + } + PropertyChanges + { + target: dapRightPanel; + visible: true + } + } + ] + + + + + + // Signal-slot connection realizing panel switching depending on predefined rules Connections @@ -51,8 +193,8 @@ DapDashboardTabForm console.log("DapGetWalletHistoryCommand") console.log(" network: " + dapServiceController.CurrentNetwork) console.log(" chain: " + dapServiceController.CurrentChain) - console.log(" wallet address: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) - dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); + console.log(" wallet address: " + dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) + dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); } } onPreviousActivated: @@ -63,8 +205,8 @@ DapDashboardTabForm console.log("DapGetWalletHistoryCommand") console.log(" network: " + dapServiceController.CurrentNetwork) console.log(" chain: " + dapServiceController.CurrentChain) - console.log(" wallet address: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) - dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); + console.log(" wallet address: " + dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) + dapServiceController.requestToService("DapGetWalletHistoryCommand", dapServiceController.CurrentNetwork, dapServiceController.CurrentChain, dapWallets[dashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)); } } } @@ -74,7 +216,7 @@ DapDashboardTabForm target: dapMainWindow onModelWalletsUpdated: { - dapDashboardTopPanel.dapComboboxWallet.currentIndex = dapIndexCurrentWallet == -1 ? (dapModelWallets.count > 0 ? 0 : -1) : dapIndexCurrentWallet + dashboardTopPanel.dapComboboxWallet.currentIndex = dapIndexCurrentWallet == -1 ? (dapModelWallets.count > 0 ? 0 : -1) : dapIndexCurrentWallet } } @@ -94,39 +236,10 @@ DapDashboardTabForm } } - dapDashboardScreen.dapAddWalletButton.onClicked: - { - createWallet() - dapDashboardScreen.dapWalletCreateFrame.visible = false; - dapDashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#D51F5D" - } - - dapDashboardTopPanel.dapAddWalletButton.onClicked: - { - createWallet() - dapDashboardScreen.dapWalletCreateFrame.visible = false; - dapDashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#D51F5D" - } - - // When you click on the button for creating a new payment, open the form to fill in the payment data - dapDashboardScreen.dapButtonNewPayment.onClicked: - { - console.log("New payment") - console.log("wallet from: " + dapDashboardTopPanel.dapComboboxWallet.mainLineText) - console.log("address wallet from: " + dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)) - currentRightPanel = dapDashboardRightPanel.push({item:Qt.resolvedUrl(newPaymentMain), - properties: {dapCmboBoxTokenModel: dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).networks, - dapCurrentWallet: dapDashboardTopPanel.dapComboboxWallet.mainLineText, - dapCmboBoxTokenModel: dapModelWallets.get(dapDashboardTopPanel.dapComboboxWallet.currentIndex).networks.get(dapServiceController.IndexCurrentNetwork).tokens, - dapTextSenderWalletAddress: dapWallets[dapDashboardTopPanel.dapComboboxWallet.currentIndex].findAddress(dapServiceController.CurrentNetwork)}}); - dapDashboardScreen.dapButtonNewPayment.colorBackgroundNormal = "#D51F5D" - } - - function update() { - dapIndexCurrentWallet = dapDashboardTopPanel.dapComboboxWallet.currentIndex + dapIndexCurrentWallet = dashboardTopPanel.dapComboboxWallet.currentIndex dapWallets.length = 0 dapModelWallets.clear() dapServiceController.requestToService("DapGetWalletsInfoCommand"); diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTabForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTabForm.ui.qml deleted file mode 100644 index 8b90b552b36ff693cab3a497640c52f07fbe69a5..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTabForm.ui.qml +++ /dev/null @@ -1,115 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 1.4 -import "qrc:/" -import "../../" - -DapAbstractTab -{ - id: dashboardTab - - property alias dapDashboardRightPanel: stackViewRightPanel - property alias dapDashboardTopPanel: dashboardTopPanel - property alias dapDashboardScreen: dashboardScreen - - dapTopPanel: - DapDashboardTopPanel - { - id: dashboardTopPanel - } - - dapScreen: - DapDashboardScreen - { - id: dashboardScreen - } - - dapRightPanel: - StackView - { - id: stackViewRightPanel - anchors.fill: parent - width: 400 - delegate: - StackViewDelegate - { - pushTransition: StackViewTransition { } - } - } - - state: "WALLETDEFAULT" - states: - [ - State - { - name: "WALLETDEFAULT" - PropertyChanges - { - target: dashboardScreen.dapWalletCreateFrame; - visible: true - } - PropertyChanges - { - target: dashboardScreen.dapTitleBlock; - visible: false - } - PropertyChanges - { - target: dashboardScreen.dapListViewWallet; - visible: false - } - PropertyChanges - { - target: dapRightPanel; - visible: false - } - }, - State - { - name: "WALLETSHOW" - PropertyChanges - { - target: dashboardScreen.dapWalletCreateFrame; - visible: false - } - PropertyChanges - { - target: dashboardScreen.dapTitleBlock; - visible: true - } - PropertyChanges - { - target: dashboardScreen.dapListViewWallet; - visible: true - } - PropertyChanges - { - target: dapRightPanel; - visible: true - } - }, - State - { - name: "WALLETCREATE" - PropertyChanges - { - target: dashboardScreen.dapWalletCreateFrame; - visible: true - } - PropertyChanges - { - target: dashboardScreen.dapTitleBlock; - visible: false - } - PropertyChanges - { - target: dashboardScreen.dapListViewWallet; - visible: false - } - PropertyChanges - { - target: dapRightPanel; - visible: true - } - } - ] -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanel.qml index c349919b55f048a2e7ca59da274c0808e03a17c6..ba84ba4a67247bb596b95c02df118b7208a57ca1 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanel.qml @@ -1,8 +1,131 @@ import QtQuick 2.4 +import QtQuick.Controls 2.0 import Demlabs 1.0 +import "../../" +import "qrc:/widgets" -DapDashboardTopPanelForm +DapTopPanel { + property alias dapAddWalletButton: addWalletButton + property alias dapComboboxWallet: comboboxWallet + + // Static text "Wallet" + Label + { + id: textHeaderWallet + text: qsTr("Wallet") + anchors.left: parent.left + anchors.leftMargin: 24 * pt + anchors.verticalCenter: parent.verticalCenter + font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + color: "#ACAAB5" + } + + // Wallet selection combo box + Rectangle + { + id: frameComboBoxWallet + + anchors.left: textHeaderWallet.right + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 30 * pt + width: 148 * pt + color: "transparent" + + DapComboBox + { + id: comboboxWallet + model: dapModelWallets + comboBoxTextRole: ["name"] + mainLineText: "all wallets" + isDefaultNeedToAppend: false + indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" + indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" + sidePaddingNormal: 0 * pt + sidePaddingActive: 16 * pt + normalColorText: "#070023" + hilightColorText: "#FFFFFF" + normalColorTopText: "#FFFFFF" + hilightColorTopText: "#070023" + hilightColor: "#330F54" + normalTopColor: "#070023" + widthPopupComboBoxNormal: 148 * pt + widthPopupComboBoxActive: 180 * pt + heightComboBoxNormal: 24 * pt + heightComboBoxActive: 44 * pt + bottomIntervalListElement: 8 * pt + topEffect: false + x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal + normalColor: "#FFFFFF" + hilightTopColor: normalColor + paddingTopItemDelegate: 8 * pt + heightListElement: 32 * pt + intervalListElement: 10 * pt + indicatorWidth: 24 * pt + indicatorHeight: indicatorWidth + indicatorLeftInterval: 8 * pt + colorTopNormalDropShadow: "#00000000" + colorDropShadow: "#40ABABAB" + fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] + colorMainTextComboBox: [["#FFFFFF", "#070023"]] + colorTextComboBox: [["#070023", "#FFFFFF"]] + + + } + } +//TODO: Disabled until the currency converter is implemented. +// // Static wallet balance text "Wallet balance" +// Label +// { +// id: headerWalletBalance +// text: qsTr("Wallet balance") +// anchors.left: frameComboBoxWallet.right +// anchors.leftMargin: 70 * pt +// anchors.verticalCenter: parent.verticalCenter +// font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 +// color: "#ACAAB5" +// } + +// // Dynamic wallet balance text +// Label +// { +// id: textWalletBalance +// text: "$ 0.00 USD" +// anchors.left: headerWalletBalance.right +// anchors.leftMargin: 18 * pt +// anchors.verticalCenter: parent.verticalCenter +// font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular16 +// color: "#FFFFFF" +// } + + // Wallet create button + DapButton + { + id: addWalletButton + textButton: "New wallet" + anchors.right: parent.right + anchors.rightMargin: 24 * pt + anchors.verticalCenter: parent.verticalCenter + normalImageButton: "qrc:/resources/icons/new-wallet_icon_dark.png" + hoverImageButton: "qrc:/resources/icons/new-wallet_icon_dark_hover.png" + implicitHeight: 36 * pt + implicitWidth: 120 * pt + widthImageButton: 28 * pt + heightImageButton: 28 * pt + indentImageLeftButton: 10 * pt + colorBackgroundNormal: "#070023" + colorBackgroundHover: "#D51F5D" + colorButtonTextNormal: "#FFFFFF" + colorButtonTextHover: "#FFFFFF" + indentTextRight: 10 * pt + fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + borderColorButton: "#000000" + borderWidthButton: 0 + horizontalAligmentText:Qt.AlignRight + colorTextButton: "#FFFFFF" + + } + Component.onCompleted: { if(dapModelWallets.count > 0) diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui.qml deleted file mode 100644 index 9af5cd36a84bc8557a726a3697da66734f7626c0..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/DapDashboardTopPanelForm.ui.qml +++ /dev/null @@ -1,127 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import "qrc:/widgets" -import "../../" - -DapAbstractTopPanel -{ - property alias dapAddWalletButton: addWalletButton - property alias dapComboboxWallet: comboboxWallet - - // Static text "Wallet" - Label - { - id: textHeaderWallet - text: qsTr("Wallet") - anchors.left: parent.left - anchors.leftMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - color: "#ACAAB5" - } - - // Wallet selection combo box - Rectangle - { - id: frameComboBoxWallet - - anchors.left: textHeaderWallet.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 148 * pt - color: "transparent" - - DapComboBox - { - id: comboboxWallet - model: dapModelWallets - comboBoxTextRole: ["name"] - mainLineText: "all wallets" - isDefaultNeedToAppend: false - indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" - indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" - sidePaddingNormal: 0 * pt - sidePaddingActive: 16 * pt - normalColorText: "#070023" - hilightColorText: "#FFFFFF" - normalColorTopText: "#FFFFFF" - hilightColorTopText: "#070023" - hilightColor: "#330F54" - normalTopColor: "#070023" - widthPopupComboBoxNormal: 148 * pt - widthPopupComboBoxActive: 180 * pt - heightComboBoxNormal: 24 * pt - heightComboBoxActive: 44 * pt - bottomIntervalListElement: 8 * pt - topEffect: false - x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal - normalColor: "#FFFFFF" - hilightTopColor: normalColor - paddingTopItemDelegate: 8 * pt - heightListElement: 32 * pt - intervalListElement: 10 * pt - indicatorWidth: 24 * pt - indicatorHeight: indicatorWidth - indicatorLeftInterval: 8 * pt - colorTopNormalDropShadow: "#00000000" - colorDropShadow: "#40ABABAB" - fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] - colorMainTextComboBox: [["#FFFFFF", "#070023"]] - colorTextComboBox: [["#070023", "#FFFFFF"]] - - - } - } -//TODO: Disabled until the currency converter is implemented. -// // Static wallet balance text "Wallet balance" -// Label -// { -// id: headerWalletBalance -// text: qsTr("Wallet balance") -// anchors.left: frameComboBoxWallet.right -// anchors.leftMargin: 70 * pt -// anchors.verticalCenter: parent.verticalCenter -// font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 -// color: "#ACAAB5" -// } - -// // Dynamic wallet balance text -// Label -// { -// id: textWalletBalance -// text: "$ 0.00 USD" -// anchors.left: headerWalletBalance.right -// anchors.leftMargin: 18 * pt -// anchors.verticalCenter: parent.verticalCenter -// font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular16 -// color: "#FFFFFF" -// } - - // Wallet create button - DapButton - { - id: addWalletButton - textButton: "New wallet" - anchors.right: parent.right - anchors.rightMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - normalImageButton: "qrc:/resources/icons/new-wallet_icon_dark.png" - hoverImageButton: "qrc:/resources/icons/new-wallet_icon_dark_hover.png" - implicitHeight: 36 * pt - implicitWidth: 120 * pt - widthImageButton: 28 * pt - heightImageButton: 28 * pt - indentImageLeftButton: 10 * pt - colorBackgroundNormal: "#070023" - colorBackgroundHover: "#D51F5D" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - indentTextRight: 10 * pt - fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - borderColorButton: "#000000" - borderWidthButton: 0 - horizontalAligmentText:Qt.AlignRight - colorTextButton: "#FFFFFF" - - } -} diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanel.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanel.qml index 57997c7be865add0cc2d64871d7a2a6cb69a833b..9f9da755e7c679b6eb071df19c49dfa6ec7cd672 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapDoneWalletRightPanel.qml @@ -6,12 +6,12 @@ DapDoneWalletRightPanelForm dapButtonDone.onClicked: { nextActivated(lastActionsWallet) - dapDashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" + dashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" } dapButtonClose.onClicked: { previousActivated(lastActionsWallet) - dapDashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" + dashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" } } diff --git a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml index 2cd0de692992eedaf290cfc9f78897b270d29dfb..2721853366775f898b91326e894fb4467561f31d 100644 --- a/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Dashboard/RightPanel/DapInputNewWalletNameRightPanel.qml @@ -22,7 +22,7 @@ DapInputNewWalletNameRightPanelForm dapButtonClose.onClicked: { previousActivated(lastActionsWallet) - dapDashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" + dashboardTopPanel.dapAddWalletButton.colorBackgroundNormal = "#070023" } Connections diff --git a/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanel.qml index 68a4f5b7f2fb6d3143330248460f12850b92aaf1..c0d56c015b076f3b9aaee5ebfeb2255fe7c2d2a0 100644 --- a/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanel.qml @@ -1,6 +1,322 @@ import QtQuick 2.4 +import QtQuick.Controls 1.4 +import QtQuick.Controls.Styles 1.4 +import QtQuick.Layouts 1.3 +import "qrc:/widgets" +import "../../" -DapHistoryTopPanelForm + +DapTopPanel { + property alias dapComboboxPeriod: comboboxPeriod + property alias dapComboboxWallet: comboboxWallet + property alias dapComboboxStatus: comboboxStatus + + // Frame icon search + Rectangle + { + id: frameIconSearch + anchors.left: parent.left + anchors.leftMargin: 16 * pt + anchors.verticalCenter: parent.verticalCenter + height: 15 * pt + width: 15 * pt + color: "transparent" + Image + { + id: iconSearch + anchors.fill: parent + source: "qrc:/resources/icons/ic_search.png" + } + } + + // Wallet selection combo box + Rectangle + { + id: frameTextFieldSearch + anchors.left: frameIconSearch.right + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 10 * pt + width: 252 * pt + height: layoutSearch.height + color: "transparent" + ColumnLayout + { + id: layoutSearch + width: parent.width + anchors.verticalCenter: parent.verticalCenter + TextField + { + id: textFieldSearch + anchors.top: parent.top + anchors.left: parent.left + anchors.leftMargin: 10 * pt + anchors.right: parent.right + placeholderText: qsTr("Search") + font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + style: + TextFieldStyle + { + textColor: "#ACAAB5" + placeholderTextColor: "#ACAAB5" + background: + Rectangle + { + border.width: 0 + color: "transparent" + } + } + } + Rectangle + { + anchors.top: textFieldSearch.bottom + width: parent.width + height: 1 * pt + color: "#59556C" + } + } + } + + // Static text "Period" + Label + { + id: textPeriod + text: qsTr("Period") + anchors.left: frameTextFieldSearch.right + anchors.leftMargin: 42 * pt + anchors.verticalCenter: parent.verticalCenter + font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + color: "#ACAAB5" + } + + // Period selection combo box + Rectangle + { + id: frameComboBoxPeriod + + anchors.left: textPeriod.right + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 30 * pt + width: 204 * pt + color: "transparent" + + ListModel + { + id: periodModel + ListElement { name: "today" } + ListElement { name: "yesterday" } + ListElement { name: "last week" } + ListElement { name: "last month" } + ListElement { name: "custom range"} + } + + DapComboBoxCustomRange + { + id: comboboxPeriod + model: periodModel + dapIndicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" + dapIndicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" + dapSidePaddingNormal: 0 * pt + dapSidePaddingActive: 16 * pt + dapNormalColorText: "#070023" + dapHilightColorText: "#FFFFFF" + dapNormalColorTopText: "#FFFFFF" + dapHilightColorTopText: "#070023" + dapHilightColor: "#330F54" + dapNormalTopColor: "#070023" + dapWidthPopupComboBoxNormal: 204 * pt + dapWidthPopupComboBoxActive: 236 * pt + dapHeightComboBoxNormal: 24 * pt + dapHeightComboBoxActive: 46 * pt + dapBottomIntervalListElement: 8 * pt + dapTopEffect: false + x: popup.visible ? dapSidePaddingActive * (-1) : dapSidePaddingNormal + dapNormalColor: "#FFFFFF" + dapHilightTopColor: dapNormalColor + dapPaddingTopItemDelegate: 8 * pt + dapHeightListElement: 32 * pt + dapIntervalListElement: 10 * pt + dapIndicatorWidth: 24 * pt + dapIndicatorHeight: dapIndicatorWidth + dapIndicatorLeftInterval: 16 * pt + dapColorTopNormalDropShadow: "#00000000" + dapColorDropShadow: "#40ABABAB" + dapTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + dapDefaultMainLineText: "all time" + dapIsDefaultNeedToAppend: true + dapRangeElementWidth: 74 * pt + dapRangeSpacing: 6 * pt + dapRangeDefaultText: "dd.mm.yyyy" + dapInactiveRangeTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + dapUnselectedRangeColorTopText: "#ACAAB5" + dapActiveRangeTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoMedium14 + dapSelectedRangeColorTopText: "#FFFFFF" + + dapCalendars: + DapCalendar + { + dapLeftPadding: 16 * pt + dapRightPadding: 16 * pt + dapTopPadding: 0 * pt + dapBottomPadding: 16 * pt + dapTitleTopPadding: 20 * pt + dapTitleBottomPadding: 14 * pt + dapButtonInterval: 8 * pt + dapTitleWidth: 108 * pt + dapDayWidth: 24 * pt + dapDayHeight: 24 * pt + dapDayLeftInterval: 8 * pt + dapDayTopInterval: 2 * pt + dapCalendarFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + dapCalendarBackgroundColor: "#FFFFFF" + dapNormalTextColor: "#070023" + dapSelectedTextColor: "#FFFFFF" + dapInvalidTextColor: "#908D9D" + dapNormalBackgroundColor: "#FFFFFF" + dapSelectedBackgroundColor: "#3E3853" + dapDayOfWeeksFormat: Locale.NarrowFormat + dapPreviousYearButtonImage: "qrc:/resources/icons/previous_year_icon.png" + dapPreviousMonthButtonImage: "qrc:/resources/icons/previous_month_icon.png" + dapNextMonthButtonImage: "qrc:/resources/icons/next_month_icon.png" + dapNextYearButtonImage: "qrc:/resources/icons/next_year_icon.png" + } + } + } + + // Static text "Wallet" + Label + { + id: textHeaderWallet + text: qsTr("Wallet") + anchors.left: frameComboBoxPeriod.right + anchors.leftMargin: 42 * pt + anchors.verticalCenter: parent.verticalCenter + font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + color: "#ACAAB5" + } + + // Wallet selection combo box + Rectangle + { + id: frameComboBoxWallet + + anchors.left: textHeaderWallet.right + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 30 * pt + width: 148 * pt + color: "transparent" + + DapComboBox + { + id: comboboxWallet + model: dapModelWallets + comboBoxTextRole: ["name"] + mainLineText: "all wallets" + currentIndex: -1 + isDefaultNeedToAppend: true + indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" + indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" + sidePaddingNormal: 0 * pt + sidePaddingActive: 16 * pt + normalColorText: "#070023" + hilightColorText: "#FFFFFF" + normalColorTopText: "#FFFFFF" + hilightColorTopText: "#070023" + hilightColor: "#330F54" + normalTopColor: "#070023" + widthPopupComboBoxNormal: 148 * pt + widthPopupComboBoxActive: 180 * pt + heightComboBoxNormal: 24 * pt + heightComboBoxActive: 44 * pt + bottomIntervalListElement: 8 * pt + topEffect: false + x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal + normalColor: "#FFFFFF" + hilightTopColor: normalColor + paddingTopItemDelegate: 8 * pt + heightListElement: 32 * pt + intervalListElement: 10 * pt + indicatorWidth: 24 * pt + indicatorHeight: indicatorWidth + indicatorLeftInterval: 8 * pt + colorTopNormalDropShadow: "#00000000" + colorDropShadow: "#40ABABAB" + fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] + colorMainTextComboBox: [["#FFFFFF", "#070023"]] + colorTextComboBox: [["#070023", "#FFFFFF"]] + } + } + + // Static text "Status" + Label + { + id: textHeaderStatus + text: qsTr("Status") + anchors.left: frameComboBoxWallet.right + anchors.leftMargin: 42 * pt + anchors.verticalCenter: parent.verticalCenter + font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 + color: "#ACAAB5" + } + + // Stats selection combo box + Rectangle + { + id: frameComboBoxStatus + + anchors.left: textHeaderStatus.right + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 30 * pt + width: 120 * pt + color: "transparent" + + ListModel + { + id: statusModel + ListElement { name: "Pending" } + ListElement { name: "Sent" } + ListElement { name: "Received" } + ListElement { name: "Error" } + } + DapComboBox + { + id: comboboxStatus + model: statusModel + comboBoxTextRole: ["name"] + mainLineText: "all statuses" + currentIndex: -1 + isDefaultNeedToAppend: true + indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" + indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" + sidePaddingNormal: 0 * pt + sidePaddingActive: 16 * pt + normalColorText: "#070023" + hilightColorText: "#FFFFFF" + normalColorTopText: "#FFFFFF" + hilightColorTopText: "#070023" + hilightColor: "#330F54" + normalTopColor: "#070023" + widthPopupComboBoxNormal: 120 * pt + widthPopupComboBoxActive: 152 * pt + heightComboBoxNormal: 24 * pt + heightComboBoxActive: 44 * pt + bottomIntervalListElement: 8 * pt + topEffect: false + x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal + normalColor: "#FFFFFF" + hilightTopColor: normalColor + paddingTopItemDelegate: 8 * pt + heightListElement: 32 * pt + intervalListElement: 10 * pt + indicatorWidth: 24 * pt + indicatorHeight: indicatorWidth + indicatorLeftInterval: 8 * pt + colorTopNormalDropShadow: "#00000000" + colorDropShadow: "#40ABABAB" + fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] + colorMainTextComboBox: [["#FFFFFF", "#070023"]] + colorTextComboBox: [["#070023", "#FFFFFF"]] + } + } } diff --git a/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanelForm.ui.qml deleted file mode 100644 index 219d18355bb81ccec9a2e05844709e631f5c2af9..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/History/DapHistoryTopPanelForm.ui.qml +++ /dev/null @@ -1,321 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 1.4 -import QtQuick.Controls.Styles 1.4 -import QtQuick.Layouts 1.3 -import "qrc:/widgets" -import "../../" - -DapAbstractTopPanelForm -{ - property alias dapComboboxPeriod: comboboxPeriod - property alias dapComboboxWallet: comboboxWallet - property alias dapComboboxStatus: comboboxStatus - - // Frame icon search - Rectangle - { - id: frameIconSearch - anchors.left: parent.left - anchors.leftMargin: 16 * pt - anchors.verticalCenter: parent.verticalCenter - height: 15 * pt - width: 15 * pt - color: "transparent" - Image - { - id: iconSearch - anchors.fill: parent - source: "qrc:/resources/icons/ic_search.png" - } - } - - // Wallet selection combo box - Rectangle - { - id: frameTextFieldSearch - anchors.left: frameIconSearch.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 10 * pt - width: 252 * pt - height: layoutSearch.height - color: "transparent" - ColumnLayout - { - id: layoutSearch - width: parent.width - anchors.verticalCenter: parent.verticalCenter - TextField - { - id: textFieldSearch - anchors.top: parent.top - anchors.left: parent.left - anchors.leftMargin: 10 * pt - anchors.right: parent.right - placeholderText: qsTr("Search") - font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - style: - TextFieldStyle - { - textColor: "#ACAAB5" - placeholderTextColor: "#ACAAB5" - background: - Rectangle - { - border.width: 0 - color: "transparent" - } - } - } - Rectangle - { - anchors.top: textFieldSearch.bottom - width: parent.width - height: 1 * pt - color: "#59556C" - } - } - } - - // Static text "Period" - Label - { - id: textPeriod - text: qsTr("Period") - anchors.left: frameTextFieldSearch.right - anchors.leftMargin: 42 * pt - anchors.verticalCenter: parent.verticalCenter - font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - color: "#ACAAB5" - } - - // Period selection combo box - Rectangle - { - id: frameComboBoxPeriod - - anchors.left: textPeriod.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 204 * pt - color: "transparent" - - ListModel - { - id: periodModel - ListElement { name: "today" } - ListElement { name: "yesterday" } - ListElement { name: "last week" } - ListElement { name: "last month" } - ListElement { name: "custom range"} - } - - DapComboBoxCustomRange - { - id: comboboxPeriod - model: periodModel - dapIndicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" - dapIndicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" - dapSidePaddingNormal: 0 * pt - dapSidePaddingActive: 16 * pt - dapNormalColorText: "#070023" - dapHilightColorText: "#FFFFFF" - dapNormalColorTopText: "#FFFFFF" - dapHilightColorTopText: "#070023" - dapHilightColor: "#330F54" - dapNormalTopColor: "#070023" - dapWidthPopupComboBoxNormal: 204 * pt - dapWidthPopupComboBoxActive: 236 * pt - dapHeightComboBoxNormal: 24 * pt - dapHeightComboBoxActive: 46 * pt - dapBottomIntervalListElement: 8 * pt - dapTopEffect: false - x: popup.visible ? dapSidePaddingActive * (-1) : dapSidePaddingNormal - dapNormalColor: "#FFFFFF" - dapHilightTopColor: dapNormalColor - dapPaddingTopItemDelegate: 8 * pt - dapHeightListElement: 32 * pt - dapIntervalListElement: 10 * pt - dapIndicatorWidth: 24 * pt - dapIndicatorHeight: dapIndicatorWidth - dapIndicatorLeftInterval: 16 * pt - dapColorTopNormalDropShadow: "#00000000" - dapColorDropShadow: "#40ABABAB" - dapTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - dapDefaultMainLineText: "all time" - dapIsDefaultNeedToAppend: true - dapRangeElementWidth: 74 * pt - dapRangeSpacing: 6 * pt - dapRangeDefaultText: "dd.mm.yyyy" - dapInactiveRangeTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - dapUnselectedRangeColorTopText: "#ACAAB5" - dapActiveRangeTextFont: dapMainFonts.dapMainFontTheme.dapFontRobotoMedium14 - dapSelectedRangeColorTopText: "#FFFFFF" - - dapCalendars: - DapCalendar - { - dapLeftPadding: 16 * pt - dapRightPadding: 16 * pt - dapTopPadding: 0 * pt - dapBottomPadding: 16 * pt - dapTitleTopPadding: 20 * pt - dapTitleBottomPadding: 14 * pt - dapButtonInterval: 8 * pt - dapTitleWidth: 108 * pt - dapDayWidth: 24 * pt - dapDayHeight: 24 * pt - dapDayLeftInterval: 8 * pt - dapDayTopInterval: 2 * pt - dapCalendarFont: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - dapCalendarBackgroundColor: "#FFFFFF" - dapNormalTextColor: "#070023" - dapSelectedTextColor: "#FFFFFF" - dapInvalidTextColor: "#908D9D" - dapNormalBackgroundColor: "#FFFFFF" - dapSelectedBackgroundColor: "#3E3853" - dapDayOfWeeksFormat: Locale.NarrowFormat - dapPreviousYearButtonImage: "qrc:/resources/icons/previous_year_icon.png" - dapPreviousMonthButtonImage: "qrc:/resources/icons/previous_month_icon.png" - dapNextMonthButtonImage: "qrc:/resources/icons/next_month_icon.png" - dapNextYearButtonImage: "qrc:/resources/icons/next_year_icon.png" - } - } - } - - // Static text "Wallet" - Label - { - id: textHeaderWallet - text: qsTr("Wallet") - anchors.left: frameComboBoxPeriod.right - anchors.leftMargin: 42 * pt - anchors.verticalCenter: parent.verticalCenter - font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - color: "#ACAAB5" - } - - // Wallet selection combo box - Rectangle - { - id: frameComboBoxWallet - - anchors.left: textHeaderWallet.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 148 * pt - color: "transparent" - - DapComboBox - { - id: comboboxWallet - model: dapModelWallets - comboBoxTextRole: ["name"] - mainLineText: "all wallets" - currentIndex: -1 - isDefaultNeedToAppend: true - indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" - indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" - sidePaddingNormal: 0 * pt - sidePaddingActive: 16 * pt - normalColorText: "#070023" - hilightColorText: "#FFFFFF" - normalColorTopText: "#FFFFFF" - hilightColorTopText: "#070023" - hilightColor: "#330F54" - normalTopColor: "#070023" - widthPopupComboBoxNormal: 148 * pt - widthPopupComboBoxActive: 180 * pt - heightComboBoxNormal: 24 * pt - heightComboBoxActive: 44 * pt - bottomIntervalListElement: 8 * pt - topEffect: false - x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal - normalColor: "#FFFFFF" - hilightTopColor: normalColor - paddingTopItemDelegate: 8 * pt - heightListElement: 32 * pt - intervalListElement: 10 * pt - indicatorWidth: 24 * pt - indicatorHeight: indicatorWidth - indicatorLeftInterval: 8 * pt - colorTopNormalDropShadow: "#00000000" - colorDropShadow: "#40ABABAB" - fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] - colorMainTextComboBox: [["#FFFFFF", "#070023"]] - colorTextComboBox: [["#070023", "#FFFFFF"]] - } - } - - // Static text "Status" - Label - { - id: textHeaderStatus - text: qsTr("Status") - anchors.left: frameComboBoxWallet.right - anchors.leftMargin: 42 * pt - anchors.verticalCenter: parent.verticalCenter - font: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular12 - color: "#ACAAB5" - } - - // Stats selection combo box - Rectangle - { - id: frameComboBoxStatus - - anchors.left: textHeaderStatus.right - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: 30 * pt - width: 120 * pt - color: "transparent" - - ListModel - { - id: statusModel - ListElement { name: "Pending" } - ListElement { name: "Sent" } - ListElement { name: "Received" } - ListElement { name: "Error" } - } - - DapComboBox - { - id: comboboxStatus - model: statusModel - comboBoxTextRole: ["name"] - mainLineText: "all statuses" - currentIndex: -1 - isDefaultNeedToAppend: true - indicatorImageNormal: "qrc:/resources/icons/ic_arrow_drop_down.png" - indicatorImageActive: "qrc:/resources/icons/ic_arrow_drop_up.png" - sidePaddingNormal: 0 * pt - sidePaddingActive: 16 * pt - normalColorText: "#070023" - hilightColorText: "#FFFFFF" - normalColorTopText: "#FFFFFF" - hilightColorTopText: "#070023" - hilightColor: "#330F54" - normalTopColor: "#070023" - widthPopupComboBoxNormal: 120 * pt - widthPopupComboBoxActive: 152 * pt - heightComboBoxNormal: 24 * pt - heightComboBoxActive: 44 * pt - bottomIntervalListElement: 8 * pt - topEffect: false - x: popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal - normalColor: "#FFFFFF" - hilightTopColor: normalColor - paddingTopItemDelegate: 8 * pt - heightListElement: 32 * pt - intervalListElement: 10 * pt - indicatorWidth: 24 * pt - indicatorHeight: indicatorWidth - indicatorLeftInterval: 8 * pt - colorTopNormalDropShadow: "#00000000" - colorDropShadow: "#40ABABAB" - fontComboBox: [dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14] - colorMainTextComboBox: [["#FFFFFF", "#070023"]] - colorTextComboBox: [["#070023", "#FFFFFF"]] - } - } -} diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml index 3b8b9c7b905b27b1528b85d85f691ec630aee681..fc65de57d0b9b6691342a5c4af3f84f30e16ba3d 100644 --- a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanel.qml @@ -1,9 +1,56 @@ import QtQuick 2.4 +import QtQuick.Controls 2.0 import Qt.labs.platform 1.0 + import "../../" +import "qrc:/widgets" -DapLogsTopPanelForm +DapTopPanel { + id:topLogsPanel + + property alias buttonNormalColor: exportLogButton.colorBackgroundNormal + + //Export log button + DapButton + { + id: exportLogButton + textButton: "Export log" + anchors.right: parent.right + anchors.rightMargin: 24 * pt + anchors.verticalCenter: parent.verticalCenter + normalImageButton: "qrc:/resources/icons/icon_export.png" + hoverImageButton: "qrc:/resources/icons/icon_export.png" + height: 36 * pt + width: 120 * pt + widthImageButton: 28 * pt + heightImageButton: 28 * pt + indentImageLeftButton: 10 * pt + colorBackgroundNormal:"#070023" + colorBackgroundHover: "#D2145D" + colorButtonTextNormal: "#FFFFFF" + colorButtonTextHover: "#FFFFFF" + indentTextRight: 10 * pt + borderColorButton: "#000000" + borderWidthButton: 0 + fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 + horizontalAligmentText:Qt.AlignRight + colorTextButton: "#FFFFFF" + } + + ///Handler for clicking the button exportLogButton + Connections + { + target: exportLogButton + onClicked: + { + grub(); + exportLogButton.colorBackgroundNormal = "#D2145D" + saveWindow.sourceComponent = saveFile; + } + } + + ///@detalis filterFileArray Array with filters for the file saving window. property var filterFileArray:["Text files (*.txt)", "Log files (*.log)"] diff --git a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml deleted file mode 100644 index 7e658995b88f668c76b6babd614717fd0ce42cae..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Logs/DapLogsTopPanelForm.ui.qml +++ /dev/null @@ -1,52 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import "../../" -import "qrc:/widgets" - -DapAbstractTopPanel -{ - id:topLogsPanel - - property alias buttonNormalColor: exportLogButton.colorBackgroundNormal - - //Export log button - DapButton - { - id: exportLogButton - textButton: "Export log" - anchors.right: parent.right - anchors.rightMargin: 24 * pt - anchors.verticalCenter: parent.verticalCenter - normalImageButton: "qrc:/resources/icons/icon_export.png" - hoverImageButton: "qrc:/resources/icons/icon_export.png" - height: 36 * pt - width: 120 * pt - widthImageButton: 28 * pt - heightImageButton: 28 * pt - indentImageLeftButton: 10 * pt - colorBackgroundNormal:"#070023" - colorBackgroundHover: "#D2145D" - colorButtonTextNormal: "#FFFFFF" - colorButtonTextHover: "#FFFFFF" - indentTextRight: 10 * pt - borderColorButton: "#000000" - borderWidthButton: 0 - fontButton: dapMainFonts.dapMainFontTheme.dapFontRobotoRegular14 - horizontalAligmentText:Qt.AlignRight - colorTextButton: "#FFFFFF" - } - - ///Handler for clicking the button exportLogButton - Connections - { - target: exportLogButton - onClicked: - { - grub(); - exportLogButton.colorBackgroundNormal = "#D2145D" - saveWindow.sourceComponent = saveFile; - } - } - -} - diff --git a/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanel.qml b/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanel.qml index 2ea8c942ea053b2b1ae889b3429f30efac516ed8..46b3b533aa2ca2c1867aea7ad4029117b256d369 100644 --- a/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanel.qml +++ b/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanel.qml @@ -1,6 +1,6 @@ -import QtQuick 2.4 +import "qrc:/widgets" -DapSettingsTopPanelForm +DapTopPanel { } diff --git a/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanelForm.ui.qml b/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanelForm.ui.qml deleted file mode 100644 index 893e3fab82ffd610d27655715f432e90ac0f8088..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/desktop/Settings/DapSettingsTopPanelForm.ui.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.4 -import "../../" - -DapAbstractTopPanelForm -{ - -} diff --git a/cellframe-ui-sdk b/cellframe-ui-sdk index 9db15afc70f9382737614d07f89b3f3e2a8e9707..ba1178d5ffb44f726c9548b069f62847d3d8e086 160000 --- a/cellframe-ui-sdk +++ b/cellframe-ui-sdk @@ -1 +1 @@ -Subproject commit 9db15afc70f9382737614d07f89b3f3e2a8e9707 +Subproject commit ba1178d5ffb44f726c9548b069f62847d3d8e086 diff --git a/dap-ui-sdk b/dap-ui-sdk index 2c62121ae0a291c1023059337c77b5dc2d572c59..8eaacda7a083a92e7d67e422049d8c97a7c167d5 160000 --- a/dap-ui-sdk +++ b/dap-ui-sdk @@ -1 +1 @@ -Subproject commit 2c62121ae0a291c1023059337c77b5dc2d572c59 +Subproject commit 8eaacda7a083a92e7d67e422049d8c97a7c167d5