Skip to content
Snippets Groups Projects
Commit 6dd78495 authored by littletux89@gmail.com's avatar littletux89@gmail.com
Browse files

[+] Added wallet creation dialog.

parent c5323154
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,11 @@ void DapServiceController::getNodeLogs(int aiTimeStamp, int aiRowCount) const
m_pDapCommandController->getNodeLogs(aiTimeStamp, aiRowCount);
}
void DapServiceController::addWallet(const QString &asName)
{
qDebug() << "NAME WALLET " << asName;
}
/// Handling service response for receiving node logs.
/// @param aNodeLogs List of node logs.
void DapServiceController::processGetNodeLogs(const QStringList &aNodeLogs)
......
......@@ -61,6 +61,8 @@ public:
DapLogModel getLogModel() const;
void setLogModel(const DapLogModel &dapLogModel);
Q_INVOKABLE void addWallet(const QString& asName);
signals:
/// The signal is emitted when the Brand company property changes.
void brandChanged(const QString &brand);
......
import QtQuick 2.9
import QtQuick.Controls 2.4
import KelvinDashboard 1.0
Dialog {
id: dialogAddWallet
focus: true
modal: true
title: qsTr("Add wallet...")
width: parent.width/1.5
height: 150
x: parent.width / 2 - width / 2
y: parent.height / 2 - height / 2
function show() {
dialogAddWallet.open();
}
contentItem:
Rectangle
{
anchors.fill: parent
TextField
{
background: Rectangle {
radius: 2
border.color: "gray"
border.width: 1
}
id: textFieldNameWallet
selectByMouse: true
height: 35
anchors.bottom: buttonOk.top
anchors.bottomMargin: 20
anchors.right: parent.right
anchors.rightMargin: 10
anchors.left: parent.left
anchors.leftMargin: 10
font.pixelSize: 20
clip: true
}
Button
{
id: buttonCancle
text: "Cancel"
width: 100
height: 30
anchors.right: buttonOk.left
anchors.rightMargin: 10
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
onClicked:
{
textFieldNameWallet.clear()
close()
}
}
Button
{
id: buttonOk
text: "OK"
width: 100
height: 30
anchors.right: parent.right
anchors.rightMargin: 10
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
onClicked:
{
dapServiceController.addWallet(textFieldNameWallet.text)
textFieldNameWallet.clear()
close()
}
}
}
}
import QtQuick 2.4
DapUiQmlWidgetChainWalletForm {
id: dapQmlWidgetChainWallet
save.onClicked: {
dialogAddWallet.show()
}
}
import QtQuick 2.9
import QtQuick 2.11
import QtQuick.Controls 2.2
Page {
id: dapUiQmlWidgetChainWallet
title: qsTr("Wallet")
property alias save: save
property alias dialogAddWallet: dialogAddWallet
ListView {
id: listViewWallet
anchors.fill: parent
anchors.margins: 10
spacing: 10
delegate: Item {
delegate: Item {
width: parent.width
height: 150
Rectangle {
id: rectangleWallet
anchors.fill: parent
color: "lightgray"
color: "lightgray"
opacity: 0.5
radius: 5
border.color: "gray"
......@@ -32,7 +35,7 @@ Page {
width: 140
border.color: "gray"
anchors.left: parent.left
anchors.leftMargin: 5
anchors.leftMargin: 5
anchors.verticalCenter: parent.verticalCenter
radius: 3.5
......@@ -43,7 +46,7 @@ Page {
}
}
Column
Column
{
anchors.verticalCenter: parent.verticalCenter
anchors.left: iconWallet.right
......@@ -62,7 +65,7 @@ Page {
Text {
id: lableAddress
text: "Address:"
text: "Address:"
font.pixelSize: 18
color: "gray"
}
......@@ -74,7 +77,7 @@ Page {
font.pixelSize: 16
wrapMode: Text.Wrap
selectByMouse: true
// clip: true
// clip: true
// elide: Text.ElideRight
}
}
......@@ -84,12 +87,12 @@ Page {
model: ListModel {
ListElement {
name: "mywallet"
address: "RpiDC8c1SxrTNbxwSTVP6mAHhXvUAgCthoCfpVmUSm889M3zt5JfBxo6iRoAPmJkCPihSWNxhRtdTxnd7LXwcj1nbVd5NQyW1kCgXyM6"
address: "RpiDC8c1SxrTNbxwSTVP6mAHhXvUAgCthoCfpVmUSm889M3zt5JfBxo6iRoAPmJkCPihSWNxhRtdTxnd7LXwcj1nbVd5NQyW1kCgXyM6"
}
ListElement {
name: "mywallet"
address: "RpiDC8c1SxrTNbxwSTVP6mAHhXvUAgCthoCfpVmUSm889M3zt5JfBxo6iRoAPmJkCPihSWNxhRtdTxnd7LXwcj1nbVd5NQyW1kCgXyM6"
address: "RpiDC8c1SxrTNbxwSTVP6mAHhXvUAgCthoCfpVmUSm889M3zt5JfBxo6iRoAPmJkCPihSWNxhRtdTxnd7LXwcj1nbVd5NQyW1kCgXyM6"
}
ListElement {
......@@ -103,8 +106,12 @@ Page {
}
}
}
DapUiQmlScreenDialogAddWallet {
id: dialogAddWallet
}
RoundButton {
id: save
text: qsTr("+")
highlighted: true
anchors.margins: 10
......@@ -112,3 +119,4 @@ Page {
anchors.bottom: parent.bottom
}
}
......@@ -7,7 +7,7 @@ DapUiQmlWidgetModel::DapUiQmlWidgetModel(QObject *parent) : QAbstractListModel(p
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Services client", "DapUiQmlWidgetChainServicesClient.ui.qml", "qrc:/Resources/Icons/add.png"));
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Services share control", "DapUiQmlWidgetChainServicesShareControl.ui.qml", "qrc:/Resources/Icons/add.png"));
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Settings", "DapUiQmlWidgetChainSettings.ui.qml", "qrc:/Resources/Icons/add.png"));
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Wallet", "DapUiQmlWidgetChainWallet.ui.qml", "qrc:/Resources/Icons/add.png"));
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Wallet", "DapUiQmlWidgetChainWallet.qml", "qrc:/Resources/Icons/add.png"));
m_dapUiQmlWidgets.append(new DapUiQmlWidget( "Logs", "DapUiQmlWidgetChainNodeLogs.ui.qml", "qrc:/Resources/Icons/add.png"));
}
......
......@@ -9,7 +9,6 @@
<file>DapUiQmlWidgetChainServicesClient.ui.qml</file>
<file>DapUiQmlWidgetChainServicesShareControl.ui.qml</file>
<file>DapUiQmlWidgetChainSettings.ui.qml</file>
<file>DapUiQmlWidgetChainWallet.ui.qml</file>
<file>DapUiQmlScreenDialog.qml</file>
<file>Resources/Icons/icon.png</file>
<file>DapUiQmlScreenAbout.ui.qml</file>
......@@ -27,5 +26,8 @@
<file>Resources/Icons/settings.png</file>
<file>Resources/Icons/dialog.png</file>
<file>Resources/Icons/exit.png</file>
<file>DapUiQmlScreenDialogAddWallet.qml</file>
<file>DapUiQmlWidgetChainWallet.qml</file>
<file>DapUiQmlWidgetChainWalletForm.ui.qml</file>
</qresource>
</RCC>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment