diff --git a/CellFrameDashboardGUI/main.cpp b/CellFrameDashboardGUI/main.cpp index 942af0aef38cbcc1f7a0c536dfb3170244940b4d..5551f314584da2b900c747d295db3cff93dd3ed7 100644 --- a/CellFrameDashboardGUI/main.cpp +++ b/CellFrameDashboardGUI/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) app.setOrganizationDomain("demlabs.net"); app.setApplicationName("CellFrame Dashboard"); app.setWindowIcon(QIcon(":/res/icons/icon.ico")); - + DapLogger dapLogger; /// TODO: The code is commented out at the time of developing the logging strategy in the project //#ifndef QT_DEBUG diff --git a/CellFrameDashboardGUI/qml.qrc b/CellFrameDashboardGUI/qml.qrc index e3b3644cc91cdd19ddd1fbc03b385f400d7ebd36..0eea336228eea0018f352218e666c1b01f09ccae 100755 --- a/CellFrameDashboardGUI/qml.qrc +++ b/CellFrameDashboardGUI/qml.qrc @@ -1,6 +1,8 @@ <RCC> <qresource prefix="/"> <file>CellFrameDashboardGUI.conf</file> + <file>res/icons/ic_arrow_drop_down_dark_blue.png</file> + <file>res/icons/ic_arrow_drop_up_dark_blue.png</file> <file>res/cellframe-logo.svg</file> <file>res/Settings.json</file> <file>res/fonts/roboto_light.ttf</file> @@ -43,9 +45,6 @@ <file>screen/DapUiQmlScreen.qml</file> <file>screen/DapUiQmlScreenMainWindow.qml</file> <file>screen/DapUiQmlScreenMainWindowForm.ui.qml</file> - <file>screen/DapUiQmlWidgetStatusBarComboBox.qml</file> - <file>screen/DapUiQmlWidgetStatusBarComboBoxDelegate.qml</file> - <file>screen/DapUiQmlWidgetStatusBarContentItem.qml</file> <file>screen/main.qml</file> <file>screen/Console/DapUiQmlScreenConsoleForm.ui.qml</file> <file>screen/Console/DapUiQmlWidgetConsole.qml</file> @@ -54,7 +53,6 @@ <file>screen/Console/DapUiQmlWidgetConsoleLastActionsForm.qml</file> <file>screen/Dashboard/DapUiQmlScreenDashboard.qml</file> <file>screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml</file> - <file>screen/Exchange/DapUiQmlWidgetChainExchanges.ui.qml</file> <file>screen/Exchange/DapUiQmlWidgetExchangeOrderButtonForm.ui.qml</file> <file>screen/Exchange/DapUiQmlWidgetExchangeOrderContentForm.ui.qml</file> <file>screen/Exchange/DapUiQmlWidgetExchangeOrderForm.ui.qml</file> @@ -80,8 +78,6 @@ <file>screen/LastAction/DapUiQmlWidgetRightPanel.qml</file> <file>screen/LastAction/DapUiQmlWidgetRightPanelForm.ui.qml</file> <file>screen/LastAction/DapUiQmlWidgetScreenDialogAddWallet.ui.qml</file> - <file>screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml</file> - <file>screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml</file> <file>screen/LastAction/DapRadioButton.qml</file> <file>screen/Log/DapUiQmlWidgetChainNodeLogs.qml</file> <file>screen/Log/DapUiQmlWidgetChainNodeLogsForm.ui.qml</file> @@ -92,8 +88,6 @@ <file>screen/Settings/DapUiQmlWidgetSettingsNetworkForm.ui.qml</file> <file>screen/StatusBar/DapUiQmlWidgetStatusBar.qml</file> <file>screen/StatusBar/DapUiQmlWidgetStatusBarButtonForm.ui.qml</file> - <file>screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWallet.qml</file> - <file>screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml</file> <file>screen/VPN/DapUiQmlScreenVpn.qml</file> <file>screen/VPN/DapUiQmlScreenVpnForm.ui.qml</file> <file>screen/VPN/DapUiQmlWidgetSettingsVpn.qml</file> diff --git a/CellFrameDashboardGUI/res/icons/ic_arrow_drop_down_dark_blue.png b/CellFrameDashboardGUI/res/icons/ic_arrow_drop_down_dark_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..1ac87aaa588bca2ae4b208cab2e93b3606f7b1e3 Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_arrow_drop_down_dark_blue.png differ diff --git a/CellFrameDashboardGUI/res/icons/ic_arrow_drop_up_dark_blue.png b/CellFrameDashboardGUI/res/icons/ic_arrow_drop_up_dark_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..3fe34c8940c90afcecbe24eefd9a9db045be19fb Binary files /dev/null and b/CellFrameDashboardGUI/res/icons/ic_arrow_drop_up_dark_blue.png differ diff --git a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBox.qml b/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBox.qml deleted file mode 100644 index 73018d6d08980bbe1fcc5d40f7f3b63531a7b0f4..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBox.qml +++ /dev/null @@ -1,84 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import QtGraphicalEffects 1.0 - -ComboBox { - property alias headerTextColor: headerText.color - property alias widthArrow: arrow.width - property alias heightArrow: arrow.height - property alias sourceArrow: arrow.source - - id: customComboBox - width: 190 * pt - indicator: Image { - id: arrow - source: parent.popup.visible ? "qrc:/res/icons/ic_arrow_drop_up.png" : "qrc:/res/icons/ic_arrow_drop_down.png" - width: 24 * pt - height: 24 * pt - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 16 * pt - } - - background: Rectangle { - anchors.fill: parent - color: parent.popup.visible ? "#FFFFFF" : "transparent" - radius: 2 * pt - } - - contentItem: Text { - id: headerText - anchors.fill: parent - anchors.leftMargin: 12 * pt - anchors.rightMargin: 48 * pt - anchors.topMargin: 0 * pt - text: parent.displayText - font.family: fontRobotoRegular.name - font.pixelSize: 14 * pt - color: parent.popup.visible ? "#332F49" : "#FFFFFF" - verticalAlignment: Text.AlignTop - elide: Text.ElideRight - } - - popup: Popup { - y: parent.height - 1 - width: parent.width + 1 - implicitHeight: contentItem.implicitHeight - padding: 1 - - contentItem: ListView { - clip: true - implicitHeight: contentHeight - model: customComboBox.popup.visible ? customComboBox.delegateModel : null - currentIndex: customComboBox.highlightedIndex - - ScrollIndicator.vertical: ScrollIndicator { } - } - - background: Rectangle { - width: customComboBox.background.width - - Rectangle { - id: contentCorner - anchors.fill: parent - } - - DropShadow { - anchors.fill: parent - source: contentCorner - verticalOffset: 9 * pt - samples: 13 * pt - color: "#40000000" - } - } - } - - DropShadow { - anchors.fill: parent - source: background - verticalOffset: 9 * pt - samples: 13 * pt - color: "#40000000" - } - -} diff --git a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBoxDelegate.qml b/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBoxDelegate.qml deleted file mode 100644 index 8fe211f723680907b47ecfa285b3d0000f93a4cc..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarComboBoxDelegate.qml +++ /dev/null @@ -1,27 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -ItemDelegate { - property string delegateContentText: "" - - width: parent.width - height: 42 * pt - contentItem: DapUiQmlWidgetStatusBarContentItem { - anchors.fill: parent - anchors.topMargin: 8 * pt - anchors.leftMargin: 12 * pt - anchors.rightMargin: 16 * pt - verticalAlignment: Qt.AlignTop - text: delegateContentText - color: hovered ? "#FFFFFF" : "#332F49" - } - - background: Rectangle { - anchors.fill: parent - anchors.bottomMargin: 10 * pt - color: hovered ? "#332F49" : "#FFFFFF" - } - - highlighted: parent.highlightedIndex === index - -} diff --git a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarContentItem.qml b/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarContentItem.qml deleted file mode 100644 index fe2799bc9270810ed67190bc86cc8dbb11f15889..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/DapUiQmlWidgetStatusBarContentItem.qml +++ /dev/null @@ -1,10 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.0 - -Text { - color: "#A7A7A7" - font.family: fontRobotoRegular.name - font.pixelSize: 14 * pt - elide: Text.ElideRight - verticalAlignment: Text.AlignVCenter -} diff --git a/CellFrameDashboardGUI/screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml b/CellFrameDashboardGUI/screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml index 0a18e53a63a850a88a61d4fabeab7e60a82cf567..ef5bb59b8eacc9fed794355edfa00916237934e6 100644 --- a/CellFrameDashboardGUI/screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml +++ b/CellFrameDashboardGUI/screen/Exchange/DapUiQmlScreenExchangeForm.ui.qml @@ -1,8 +1,140 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 +import "../../" Page { + ///Top panel in tab Exchange + Rectangle{ + id:topPanelExchange + anchors.left: parent.left + anchors.right: parent.right + anchors.top: parent.top + anchors.leftMargin: 24*pt + anchors.topMargin: 12*pt + anchors.rightMargin: 24*pt + height:42 * pt + + ///Token ComboBox + Rectangle{ + id:leftComboBox + anchors.top: topPanelExchange.top + anchors.left: topPanelExchange.left + width:112 * pt + height:parent.height + + DapComboBox{ + model: ListModel{ + id:ÑonversionList + ListElement{text:"TKN1/NGD"} + ListElement{text:"TKN2/NGD"} + ListElement{text:"NGD/KLVN"} + ListElement{text:"KLVN/USD"} + } + fontSizeComboBox: 16*pt + widthPopupComboBoxActive: 144 *pt + widthPopupComboBoxNormal: 112 *pt + sidePaddingActive: 16*pt + sidePaddingNormal: 0 + x:popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal + } + + } + + ///Time ComboBox + Rectangle{ + id:rightComboBox + anchors.left: leftComboBox.right + anchors.leftMargin: 72*pt + anchors.top: topPanelExchange.top + width:100 * pt + height:parent.height + DapComboBox{ + model: ListModel{ + ListElement{text:"1 minute"} + ListElement{text:"5 minute"} + ListElement{text:"15 minute"} + ListElement{text:"30 minute"} + ListElement{text:"1 hour"} + ListElement{text:"4 hour"} + ListElement{text:"12 hour"} + ListElement{text:"24 hour"} + } + fontSizeComboBox: 14*pt + widthPopupComboBoxActive: 132 *pt + widthPopupComboBoxNormal: 100 *pt + sidePaddingActive: 16*pt + sidePaddingNormal: 0 + x:popup.visible ? sidePaddingActive * (-1) : sidePaddingNormal + } + } + + ///Value Last price + Rectangle{ + id: lastPrice + height: parent.height + width: 150*pt + anchors.right: volume24.left + anchors.rightMargin: 30 * pt + Text{ + anchors.left: lastPrice.left + anchors.bottom: value_lastPrice.top + anchors.bottomMargin: 6 * pt + color: "#757184" + font.pixelSize: 10 * pt + font.family: fontRobotoRegular.name + text: qsTr("Last price") + + } + Text { + id: value_lastPrice + anchors.left: lastPrice.left + anchors.bottom: lastPrice.bottom + color: "#070023" + font.pixelSize: 12 * pt + font.family: fontRobotoRegular.name + text: qsTr("$ 10 807.35 NGD") + } + Text { + anchors.left: value_lastPrice.right + anchors.bottom: lastPrice.bottom + anchors.leftMargin: 6 * pt + color: "#6F9F00" + font.pixelSize: 10 * pt + font.family: fontRobotoRegular.name + text: qsTr("+3.59%") + } + } + ///Value 24h volume + Rectangle{ + id: volume24 + + height: parent.height + width: 75*pt + anchors.right: topPanelExchange.right + + Text{ + anchors.right: volume24.right + anchors.bottom: value_valume24.top + anchors.bottomMargin: 6 * pt + color: "#757184" + font.pixelSize: 10 * pt + font.family: fontRobotoRegular.name + text: qsTr("24h volume") + + } + Text { + id: value_valume24 + anchors.right: volume24.right + anchors.bottom: volume24.bottom + color: "#070023" + font.pixelSize: 12 * pt + font.family: fontRobotoRegular.name + text: qsTr("9 800 TKN1") + } +} + } + ///Left down panel Row { anchors.left: parent.left anchors.bottom: parent.bottom diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml index 9814195959ff24198dc10f76fc76d434059bb82d..9833a58331d2b6958a9841be2311bc14ddde81cd 100644 --- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml +++ b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlScreenDialogAddWalletForm.ui.qml @@ -1,6 +1,7 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 +import "../../" import "../" DapUiQmlScreen { @@ -88,28 +89,45 @@ DapUiQmlScreen { } Rectangle { - id: chooseSignatureTypeArea - height: 68 - color: "#F8F7FA" - anchors.leftMargin: 1 - anchors.left: parent.left - anchors.right: parent.right - anchors.top: chooseSignatureTypeTextArea.bottom - - DapUiQmlWidgetSignatureTypeComboBox { - id: comboBoxChooseSignatureType - width: 368 - height: 20 - anchors { - verticalCenter: chooseSignatureTypeArea.verticalCenter - fill: parent - topMargin: 24 - bottomMargin: 24 - leftMargin: 8 - rightMargin: 32 - } - } - } + id: chooseSignatureTypeArea + + height: 68 * pt + color: "#EDEFF2" + anchors.leftMargin: 1 * pt + anchors.left: parent.left + anchors.right: parent.right + anchors.top: chooseSignatureTypeTextArea.bottom + + ///ComboBox right panel + Rectangle{ + id:areaDapComboBoxRightPanel + anchors.fill: parent + anchors.leftMargin: 16*pt + anchors.rightMargin: 16*pt + anchors.topMargin:12*pt + anchors.bottomMargin: 12*pt + color: parent.color + + DapComboBox{ + property Label fieldBalance: Label {} + + model: ListModel { + id: signatureType + ListElement {signatureName: "Dilithium"} + ListElement {signatureName: "Bliss"} + ListElement {signatureName: "Picnic"} + ListElement {signatureName: "Tesla"} + } + normalColorText: "#070023" + hilightColorText: "#FFFFFF" + fontSizeComboBox: 16 * pt + hilightColor: "#330F54" + sidePaddingNormal: 20 * pt + indicatorWidth: 20 * pt + } + + } + } Rectangle { id: recoveryMethodTextArea @@ -197,10 +215,3 @@ DapUiQmlScreen { } } } - -/*##^## -Designer { - D{i:0;autoSize:true;height:480;width:640} -} -##^##*/ - diff --git a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml b/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml deleted file mode 100644 index 59053baf974f7c16da93b9014d03e2d5b7930b6e..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/LastAction/DapUiQmlWidgetSignatureTypeComboBox.qml +++ /dev/null @@ -1,51 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import "../" - -DapUiQmlWidgetStatusBarComboBox { - - model: ListModel { - id: signatureType - ListElement { - signatureName: "Dilithium" - } - ListElement { - signatureName: "Bliss" - } - ListElement { - signatureName: "Picnic" - } - ListElement { - signatureName: "Tesla" - } - } - - headerTextColor: "#070023" - widthArrow: 20 * pt - heightArrow: 20 * pt - - font { - pointSize: 16 - family: "Roboto" - styleName: "Normal" - weight: Font.Normal - } - - currentIndex: 0 - displayText: currentText - - delegate: ItemDelegate { - width: parent.width - contentItem: DapUiQmlWidgetStatusBarContentItem { - text: signatureName - color: hovered ? "#FFFFFF" : "#070023" - } - - background: Rectangle { - height: 32 * pt - color: hovered ? "#330F54" : "#FFFFFF" - } - - highlighted: parent.highlightedIndex === index - } -} diff --git a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml index 3c37d7ae883a3cf4a1b8d7afbc0032439bdb716a..7280bcfbb8273669aaec7909a6254a512bf5eab7 100644 --- a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml +++ b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBar.qml @@ -1,5 +1,9 @@ import QtQuick 2.0 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.5 +import QtQuick.Controls.Styles 1.4 +import QtGraphicalEffects 1.0 +import QtQuick.Layouts 1.3 +import "../../" Rectangle { Rectangle { @@ -24,11 +28,22 @@ Rectangle { color: "#A7A7A7" } - DapUiQmlWidgetStatusBarComboBoxWallet { + DapComboBox { id: comboboxWallet + width: 190*pt anchors.top: parent.top anchors.bottom: parent.bottom - fieldBalance: fieldWalletBalance + + property Label fieldBalance: Label {} + model: dapWalletModel.wallets + + indicatorImageNormal:"qrc:/res/icons/ic_arrow_drop_down.png" + indicatorImageActive: "qrc:/res/icons/ic_arrow_drop_up.png" + sidePaddingNormal:12 * pt + normalColorText:"#FFFFFF" + hilightColorTopText:"#332F49" + hilightColor: "#332F49" + fontSizeComboBox: 14*px } Label { diff --git a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWallet.qml b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWallet.qml deleted file mode 100644 index 4b2d77acec1f3ad0542c3b599e9409618758b96b..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWallet.qml +++ /dev/null @@ -1,17 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Controls 2.0 -import "../" - -DapUiQmlWidgetStatusBarComboBoxWalletForm { - property Label fieldBalance: Label {} - model: dapWalletModel.wallets - - delegate: DapUiQmlWidgetStatusBarComboBoxDelegate { - delegateContentText: modelData - } - - onCurrentTextChanged: { - dapWalletFilterModel.setWalletFilter(currentText); - - } -} diff --git a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml b/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml deleted file mode 100644 index 45b59b8c6bad38dc1f6a96b096a7f823a27beffc..0000000000000000000000000000000000000000 --- a/CellFrameDashboardGUI/screen/StatusBar/DapUiQmlWidgetStatusBarComboBoxWalletForm.ui.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.0 -import "../" - -DapUiQmlWidgetStatusBarComboBox { - -} diff --git a/libdap b/libdap index 483286aa342741bc1cce8f10a880891faec1b01c..1c0614797a3a2a2f4c179630025600e177637a65 160000 --- a/libdap +++ b/libdap @@ -1 +1 @@ -Subproject commit 483286aa342741bc1cce8f10a880891faec1b01c +Subproject commit 1c0614797a3a2a2f4c179630025600e177637a65 diff --git a/libdap-qt-ui-qml b/libdap-qt-ui-qml index 257d070fbe0228bd5c6c6be433c48160eaaefb28..8dfd465e991656dca083c0fd3a0ff5825d61fe86 160000 --- a/libdap-qt-ui-qml +++ b/libdap-qt-ui-qml @@ -1 +1 @@ -Subproject commit 257d070fbe0228bd5c6c6be433c48160eaaefb28 +Subproject commit 8dfd465e991656dca083c0fd3a0ff5825d61fe86