line 2") + translationManager.emptyString
}
Text {
+ id: unlockedBalanceText
anchors.left: parent.left
anchors.leftMargin: 50
font.family: "Arial"
font.pixelSize: 18
color: "#000000"
- text: "2324.9239845"
+ text: "N/A"
}
}
@@ -171,13 +184,17 @@ Rectangle {
anchors.right: parent.right
anchors.top: parent.top
- property var previousButton: dashboardButton
+ property var previousButton: transferButton
+
+ // ------------- Dashboard tab ---------------
+
+ /*
MenuButton {
id: dashboardButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("Dashboard")
- symbol: qsTr("D")
+ text: qsTr("Dashboard") + translationManager.emptyString
+ symbol: qsTr("D") + translationManager.emptyString
dotColor: "#FFE00A"
checked: true
onClicked: {
@@ -187,6 +204,7 @@ Rectangle {
}
}
+
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
@@ -194,13 +212,16 @@ Rectangle {
color: dashboardButton.checked || transferButton.checked ? "#1C1C1C" : "#505050"
height: 1
}
+ */
+
+ // ------------- Transfer tab ---------------
MenuButton {
id: transferButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("Transfer")
- symbol: qsTr("T")
+ text: qsTr("Transfer") + translationManager.emptyString
+ symbol: qsTr("T") + translationManager.emptyString
dotColor: "#FF6C3C"
onClicked: {
parent.previousButton.checked = false
@@ -213,16 +234,41 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 16
- color: transferButton.checked || historyButton.checked ? "#1C1C1C" : "#505050"
+ color: transferButton.checked || receiveButton.checked ? "#1C1C1C" : "#505050"
height: 1
}
+ // ------------- Receive tab ---------------
+ MenuButton {
+ id: receiveButton
+ anchors.left: parent.left
+ anchors.right: parent.right
+ text: qsTr("Receive") + translationManager.emptyString
+ symbol: qsTr("R") + translationManager.emptyString
+ dotColor: "#AAFFBB"
+ onClicked: {
+ parent.previousButton.checked = false
+ parent.previousButton = receiveButton
+ panel.receiveClicked()
+ }
+ }
+ /*
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.leftMargin: 16
+ color: transferButton.checked || historyButton.checked ? "#1C1C1C" : "#505050"
+ height: 1
+ }*/
+
+ // ------------- History tab ---------------
+ /*
MenuButton {
id: historyButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("History")
- symbol: qsTr("H")
+ text: qsTr("History") + translationManager.emptyString
+ symbol: qsTr("H") + translationManager.emptyString
dotColor: "#6B0072"
onClicked: {
parent.previousButton.checked = false
@@ -238,13 +284,14 @@ Rectangle {
color: historyButton.checked || addressBookButton.checked ? "#1C1C1C" : "#505050"
height: 1
}
+ // ------------- AddressBook tab ---------------
MenuButton {
id: addressBookButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("Address book")
- symbol: qsTr("B")
+ text: qsTr("Address book") + translationManager.emptyString
+ symbol: qsTr("B") + translationManager.emptyString
dotColor: "#FF4F41"
onClicked: {
parent.previousButton.checked = false
@@ -261,12 +308,13 @@ Rectangle {
height: 1
}
+ // ------------- Mining tab ---------------
MenuButton {
id: miningButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("Mining")
- symbol: qsTr("M")
+ text: qsTr("Mining") + translationManager.emptyString
+ symbol: qsTr("M") + translationManager.emptyString
dotColor: "#FFD781"
onClicked: {
parent.previousButton.checked = false
@@ -283,12 +331,13 @@ Rectangle {
height: 1
}
+ // ------------- Settings tab ---------------
MenuButton {
id: settingsButton
anchors.left: parent.left
anchors.right: parent.right
- text: qsTr("Settings")
- symbol: qsTr("S")
+ text: qsTr("Settings") + translationManager.emptyString
+ symbol: qsTr("S") + translationManager.emptyString
dotColor: "#36B25C"
onClicked: {
parent.previousButton.checked = false
@@ -296,13 +345,23 @@ Rectangle {
panel.settingsClicked()
}
}
+ */
}
NetworkStatusItem {
+ id: networkStatus
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
- connected: true
+ connected: false
}
}
+ // indicate disabled state
+ Desaturate {
+ anchors.fill: parent
+ source: parent
+ desaturation: panel.enabled ? 0.0 : 1.0
+ }
+
+
}
diff --git a/MiddlePanel.qml b/MiddlePanel.qml
index 62072af9..a2cabc1c 100644
--- a/MiddlePanel.qml
+++ b/MiddlePanel.qml
@@ -27,9 +27,13 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.2
+import QtGraphicalEffects 1.0
Rectangle {
+ id: root
color: "#F0EEEE"
+ signal paymentClicked(string address, string paymentId, double amount, int mixinCount, int priority)
+ signal generatePaymentIdInvoked()
states: [
State {
@@ -41,6 +45,9 @@ Rectangle {
}, State {
name: "Transfer"
PropertyChanges { target: loader; source: "pages/Transfer.qml" }
+ }, State {
+ name: "Receive"
+ PropertyChanges { target: loader; source: "pages/Receive.qml" }
}, State {
name: "AddressBook"
PropertyChanges { target: loader; source: "pages/AddressBook.qml" }
@@ -72,6 +79,20 @@ Rectangle {
anchors.right: parent.right
anchors.top: styledRow.bottom
anchors.bottom: parent.bottom
+ onLoaded: {
+ console.log("Loaded " + item);
+ }
+
+ }
+
+ /* connect "payment" click */
+ Connections {
+ ignoreUnknownSignals: false
+ target: loader.item
+ onPaymentClicked : {
+ console.log("MiddlePanel: paymentClicked")
+ paymentClicked(address, paymentId, amount, mixinCount, priority)
+ }
}
Rectangle {
@@ -97,4 +118,11 @@ Rectangle {
height: 1
color: "#DBDBDB"
}
+
+ // indicate disabled state
+ Desaturate {
+ anchors.fill: parent
+ source: parent
+ desaturation: root.enabled ? 0.0 : 1.0
+ }
}
diff --git a/README.md b/README.md
index b10c94cf..29f6df9c 100644
--- a/README.md
+++ b/README.md
@@ -61,4 +61,67 @@ Redistribution and use in source and binary forms, with or without modification,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Parts of the project are originally copyright (c) 2012-2013 The Cryptonote developers
\ No newline at end of file
+Parts of the project are originally copyright (c) 2012-2013 The Cryptonote developers
+
+## Compiling Monero-core
+
+### Overview:
+
+Dependencies: TODO
+
+Process: TODO
+
+
+### On Linux:
+
+(Tested on Ubuntu 16.04 i386 and Linux Mint 18 "Sarah" - Cinnamon (64-bit))
+
+1. Install Bitmonero dependencies.
+
+`sudo apt install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev`
+
+2. Go to the repository where the most recent version is.
+
+`git clone https://github.com/mbg033/monero-core.git`
+
+3. Go into the repository.
+
+`cd monero-core`
+
+4. Use the script to compile the bitmonero libs necessary to run the GUI.
+
+`./get_libwallet_api.sh`
+
+5. Install the GUI dependencies.
+
+ a) For Ubuntu 16.04 i386
+
+`sudo apt-get install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-xmllistmodel qttools5-dev-tools qml-module-qtquick-dialogs`
+
+ b) For Linux Mint 18 "Sarah" - Cinnamon (64-bit)
+
+`sudo apt install qml-module-qt-labs-settings qml-module-qtgraphicaleffects`
+
+6. Build the GUI.
+
+`qmake`
+
+`make`
+
+7. Before running the GUI, it's recommended you have a copy of bitmonero running in the background.
+
+`./bitmonerod --rpc-bind-port 38081`
+
+8. Run the GUI client.
+
+`./release/bin/monero-core`
+
+### On OS X:
+1. install homebrew
+2. install dependencies:
+`brew install boost --c++11`
+`brew install pkgconfig`
+
+
+### On Windows:
+TODO
diff --git a/RightPanel.qml b/RightPanel.qml
index b29cb28a..d27b8b73 100644
--- a/RightPanel.qml
+++ b/RightPanel.qml
@@ -29,13 +29,21 @@
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
+import QtGraphicalEffects 1.0
+
import "tabs"
import "components"
Rectangle {
+ id: root
width: 330
color: "#FFFFFF"
+ function updateTweets() {
+ tabView.twitter.item.updateTweets()
+ }
+
+
TabView {
id: tabView
anchors.left: parent.left
@@ -45,11 +53,17 @@ Rectangle {
anchors.leftMargin: 14
anchors.rightMargin: 14
anchors.topMargin: 40
+ property alias twitter: twitter
+
+
+
+
+ Tab { id: twitter; title: qsTr("Twitter"); source: "tabs/Twitter.qml" }
+ Tab { title: qsTr("News") + translationManager.emptyString }
+ Tab { title: qsTr("Help") + translationManager.emptyString }
+ Tab { title: qsTr("About") + translationManager.emptyString }
+
- Tab { title: qsTr("Twitter"); source: "tabs/Twitter.qml" }
- Tab { title: "News" }
- Tab { title: "Help" }
- Tab { title: "About" }
style: TabViewStyle {
frameOverlap: 0
@@ -134,4 +148,11 @@ Rectangle {
width: 1
color: "#DBDBDB"
}
+
+ // indicate disabled state
+ Desaturate {
+ anchors.fill: parent
+ source: parent
+ desaturation: root.enabled ? 0.0 : 1.0
+ }
}
diff --git a/TranslationManager.cpp b/TranslationManager.cpp
new file mode 100644
index 00000000..fa39d35a
--- /dev/null
+++ b/TranslationManager.cpp
@@ -0,0 +1,67 @@
+#include "TranslationManager.h"
+
+#include
+#include
+#include
+#include
+#include
+
+
+TranslationManager * TranslationManager::m_instance = nullptr;
+
+
+TranslationManager::TranslationManager(QObject *parent) : QObject(parent)
+{
+ m_translator = new QTranslator(this);
+}
+
+bool TranslationManager::setLanguage(const QString &language)
+{
+ qDebug() << __FUNCTION__ << " " << language;
+ // if language is "en", remove translator
+ if (language.toLower() == "en") {
+ qApp->removeTranslator(m_translator);
+ emit languageChanged();
+ return true;
+ }
+
+ // translations are compiled into app binary
+#ifdef Q_OS_MACX
+ QString dir = qApp->applicationDirPath() + "/../Resources/translations";
+#else
+ QString dir = qApp->applicationDirPath() + "/translations";
+#endif
+
+ QString filename = "monero-core_" + language;
+
+ qDebug("%s: loading translation file '%s' from '%s",
+ __FUNCTION__, qPrintable(filename), qPrintable(dir));
+
+
+ if (m_translator->load(filename, dir)) {
+ qDebug("%s: translation for language '%s' loaded successfully",
+ __FUNCTION__, qPrintable(language));
+ // TODO: apply locale?
+ qApp->installTranslator(m_translator);
+ emit languageChanged();
+ return true;
+ } else {
+ qCritical("%s: error loading translation for language '%s'",
+ __FUNCTION__, qPrintable(language));
+ return false;
+ }
+}
+
+TranslationManager *TranslationManager::instance()
+{
+ if (!m_instance) {
+ m_instance = new TranslationManager();
+ }
+ return m_instance;
+}
+
+QString TranslationManager::emptyString()
+{
+ return "";
+}
+
diff --git a/TranslationManager.h b/TranslationManager.h
new file mode 100644
index 00000000..94d0e50e
--- /dev/null
+++ b/TranslationManager.h
@@ -0,0 +1,29 @@
+#ifndef TRANSLATIONMANAGER_H
+#define TRANSLATIONMANAGER_H
+
+#include
+
+class QTranslator;
+class TranslationManager : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString emptyString READ emptyString NOTIFY languageChanged)
+public:
+ Q_INVOKABLE bool setLanguage(const QString &language);
+ static TranslationManager *instance();
+
+ QString emptyString();
+
+signals:
+ void languageChanged();
+
+private:
+ explicit TranslationManager(QObject *parent = 0);
+
+private:
+ static TranslationManager * m_instance;
+ QTranslator * m_translator;
+
+};
+
+#endif // TRANSLATIONMANAGER_H
diff --git a/build.sh b/build.sh
new file mode 100755
index 00000000..7b0024d5
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+pushd $(pwd)
+ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+BITMOMERO_DIR=bitmonero
+
+if [ ! -d $BITMOMERO_DIR ]; then
+ $SHELL get_libwallet_api.sh
+fi
+
+if [ ! -d build ]; then mkdir build; fi
+cd build
+
+qmake ../monero-core.pro "CONFIG+=release"
+make
+make deploy
+popd
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/AddressBookTable.qml b/components/AddressBookTable.qml
index ab4bf61d..756445f7 100644
--- a/components/AddressBookTable.qml
+++ b/components/AddressBookTable.qml
@@ -44,7 +44,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
- text: qsTr("No more results")
+ text: qsTr("No more results") + translationManager.emptyString
}
}
@@ -103,7 +103,7 @@ ListView {
font.pixelSize: 12
font.letterSpacing: -1
color: "#535353"
- text: qsTr("Payment ID:")
+ text: qsTr("Payment ID:") + + translationManager.emptyString
}
Text {
diff --git a/components/DashboardTable.qml b/components/DashboardTable.qml
index 07fe6ac2..05b23c6e 100644
--- a/components/DashboardTable.qml
+++ b/components/DashboardTable.qml
@@ -44,7 +44,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
- text: qsTr("No more results")
+ text: qsTr("No more results") + translationManager.emptyString
}
}
@@ -134,7 +134,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Date")
+ text: qsTr("Date") + translationManager.emptyString
}
Row {
@@ -169,7 +169,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Balance")
+ text: qsTr("Balance") + translationManager.emptyString
}
Text {
@@ -190,7 +190,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Amount")
+ text: qsTr("Amount") + translationManager.emptyString
}
Row {
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml
index 3ee8c82c..db92aa69 100644
--- a/components/HistoryTable.qml
+++ b/components/HistoryTable.qml
@@ -44,7 +44,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 14
color: "#545454"
- text: qsTr("No more results")
+ text: qsTr("No more results") + translationManager.emptyString
}
}
@@ -126,7 +126,7 @@ ListView {
font.pixelSize: 12
font.letterSpacing: -1
color: "#535353"
- text: paymentId !== "" ? qsTr("Payment ID:") : ""
+ text: paymentId !== "" ? qsTr("Payment ID:") + translationManager.emptyString : ""
}
Text {
@@ -164,7 +164,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Date")
+ text: qsTr("Date") + translationManager.emptyString
}
Row {
@@ -199,7 +199,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Balance")
+ text: qsTr("Balance") + translationManager.emptyString
}
Text {
@@ -220,7 +220,7 @@ ListView {
font.family: "Arial"
font.pixelSize: 12
color: "#545454"
- text: qsTr("Amount")
+ text: qsTr("Amount") + translationManager.emptyString
}
Row {
diff --git a/components/IconButton.qml b/components/IconButton.qml
new file mode 100644
index 00000000..042439f1
--- /dev/null
+++ b/components/IconButton.qml
@@ -0,0 +1,72 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+import QtQuick 2.0
+
+Item {
+ property alias imageSource : buttonImage.source
+
+ signal clicked(var mouse)
+
+
+ id: button
+ width: parent.height
+ height: parent.height
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+
+ Image {
+ id: buttonImage
+ source: ""
+ x : (parent.width - width) / 2
+ y : (parent.height - height) /2
+ z: 100
+ }
+
+ MouseArea {
+ id: buttonArea
+ anchors.fill: parent
+
+
+ onPressed: {
+ buttonImage.x = buttonImage.x + 2
+ buttonImage.y = buttonImage.y + 2
+ }
+ onReleased: {
+ buttonImage.x = buttonImage.x - 2
+ buttonImage.y = buttonImage.y - 2
+ }
+
+ onClicked: {
+ parent.clicked(mouse)
+ }
+ }
+
+}
diff --git a/components/Input.qml b/components/Input.qml
index c10994d0..78bec8ea 100644
--- a/components/Input.qml
+++ b/components/Input.qml
@@ -32,6 +32,7 @@ import QtQuick 2.2
TextField {
font.family: "Arial"
+ horizontalAlignment: TextInput.AlignLeft
style: TextFieldStyle {
textColor: "#3F3F3F"
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index 6994b75f..81786881 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -31,7 +31,11 @@ import QtQuick 2.0
Item {
property alias placeholderText: input.placeholderText
property alias text: input.text
+ property alias validator: input.validator
+ property alias readOnly : input.readOnly
property int fontSize: 18
+
+
height: 37
Rectangle {
diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml
index 720fe536..6fb1d2eb 100644
--- a/components/NetworkStatusItem.qml
+++ b/components/NetworkStatusItem.qml
@@ -63,7 +63,7 @@ Row {
font.family: "Arial"
font.pixelSize: 18
color: item.connected ? "#FF6C3B" : "#AAAAAA"
- text: item.connected ? qsTr("Connected") : qsTr("Disconnected")
+ text: (item.connected ? qsTr("Connected") : qsTr("Disconnected")) + translationManager.emptyString
}
}
}
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml
new file mode 100644
index 00000000..a8ff294a
--- /dev/null
+++ b/components/PasswordDialog.qml
@@ -0,0 +1,68 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import QtQuick 2.0
+import QtQuick.Controls 1.4
+import QtQuick.Dialogs 1.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls.Styles 1.4
+
+// import "../components"
+
+Dialog {
+ id: root
+ readonly property alias password: passwordInput.text
+ standardButtons: StandardButton.Ok + StandardButton.Cancel
+ ColumnLayout {
+ id: column
+ height: 40
+ anchors.fill: parent
+
+ Label {
+ text: qsTr("Please enter wallet password")
+ Layout.columnSpan: 2
+ Layout.fillWidth: true
+ font.family: "Arial"
+ font.pixelSize: 32
+ }
+
+ TextField {
+ id : passwordInput
+
+ echoMode: TextInput.Password
+ focus: true
+ Layout.fillWidth: true
+ font.family: "Arial"
+ font.pixelSize: 24
+ style: TextFieldStyle {
+ passwordCharacter: "•"
+ }
+ }
+ }
+}
+
diff --git a/components/PrivacyLevelSmall.qml b/components/PrivacyLevelSmall.qml
index 21c794ef..cb1cd36e 100644
--- a/components/PrivacyLevelSmall.qml
+++ b/components/PrivacyLevelSmall.qml
@@ -36,6 +36,13 @@ Item {
height: 40
clip: true
+ onFillLevelChanged: {
+ if (!interactive) {
+ //print("fillLevel: " + fillLevel)
+ fillRect.width = row.positions[fillLevel].currentX + row.x
+ }
+ }
+
Rectangle {
anchors.left: parent.left
anchors.right: parent.right
@@ -92,7 +99,7 @@ Item {
font.bold: true
color: "#000000"
x: row.x + (row.positions[0] !== undefined ? row.positions[0].currentX - 3 : 0) - width
- text: qsTr("LOW")
+ text: qsTr("LOW") + translationManager.emptyString
}
Text {
@@ -103,7 +110,7 @@ Item {
font.bold: true
color: "#000000"
x: row.x + (row.positions[4] !== undefined ? row.positions[4].currentX - 3 : 0) - width
- text: qsTr("MEDIUM")
+ text: qsTr("MEDIUM") + translationManager.emptyString
}
Text {
@@ -114,7 +121,7 @@ Item {
font.bold: true
color: "#000000"
x: row.x + (row.positions[13] !== undefined ? row.positions[13].currentX - 3 : 0) - width
- text: qsTr("HIGH")
+ text: qsTr("HIGH") + translationManager.emptyString
}
MouseArea {
@@ -134,6 +141,7 @@ Item {
if(index !== -1) {
fillRect.width = Qt.binding(function(){ return row.positions[index].currentX + row.x })
item.fillLevel = index
+ print ("fillLevel: " + item.fillLevel)
}
}
@@ -148,7 +156,7 @@ Item {
anchors.rightMargin: 8
anchors.top: bar.bottom
anchors.topMargin: 5
- property var positions: new Array()
+ property var positions: []
Row {
id: row2
diff --git a/components/ProcessingSplash.qml b/components/ProcessingSplash.qml
new file mode 100644
index 00000000..f98feb3b
--- /dev/null
+++ b/components/ProcessingSplash.qml
@@ -0,0 +1,63 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import QtQuick 2.0
+import QtQuick.Window 2.1
+import QtQuick.Controls 1.4
+import QtQuick.Layouts 1.1
+
+Window {
+ id: splash
+ modality: Qt.ApplicationModal
+ flags: Qt.SplashScreen
+ property alias message: message.text
+ width: 200
+ height: 100
+ opacity: 0.5
+
+ ColumnLayout {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+
+ BusyIndicator {
+ running: parent.visible
+ Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
+ }
+
+ Text {
+ id: message
+ text: "Please wait..."
+ font {
+ pointSize: 22
+ }
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
+
+
+}
diff --git a/components/SearchInput.qml b/components/SearchInput.qml
index b104247c..35be896f 100644
--- a/components/SearchInput.qml
+++ b/components/SearchInput.qml
@@ -66,7 +66,7 @@ Item {
anchors.leftMargin: 45
font.pixelSize: 18
verticalAlignment: TextInput.AlignVCenter
- placeholderText: qsTr("Search by...")
+ placeholderText: qsTr("Search by...") + translationManager.emptyString
}
Item {
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index 208d90d3..5a088fbf 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -47,7 +47,10 @@ Item {
height: parent.height - 1
y: buttonArea.pressed ? 0 : 1
//radius: 4
- color: buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor
+ color: {
+ parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor)
+ : Qt.lighter(parent.shadowReleasedColor)
+ }
}
Rectangle {
@@ -55,7 +58,11 @@ Item {
anchors.right: parent.right
height: parent.height - 1
y: buttonArea.pressed ? 1 : 0
- color: buttonArea.pressed ? parent.pressedColor : parent.releasedColor
+ color: {
+ parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor)
+ : Qt.lighter(parent.releasedColor)
+
+ }
//radius: 4
}
diff --git a/components/TickDelegate.qml b/components/TickDelegate.qml
index 70ef1b50..2163d3e7 100644
--- a/components/TickDelegate.qml
+++ b/components/TickDelegate.qml
@@ -52,9 +52,9 @@ Item {
font.pixelSize: 12
color: "#4A4949"
text: {
- if(currentIndex === 0) return qsTr("LOW")
- if(currentIndex === 3) return qsTr("MEDIUM")
- if(currentIndex === 13) return qsTr("HIGH")
+ if(currentIndex === 0) return qsTr("LOW") + translationManager.emptyString
+ if(currentIndex === 3) return qsTr("MEDIUM") + translationManager.emptyString
+ if(currentIndex === 13) return qsTr("HIGH") + translationManager.emptyString
return ""
}
}
diff --git a/components/TitleBar.qml b/components/TitleBar.qml
index f27caf73..8e1c9e32 100644
--- a/components/TitleBar.qml
+++ b/components/TitleBar.qml
@@ -35,7 +35,7 @@ Rectangle {
color: "#000000"
y: -height
property int mouseX: 0
- property string title: "Monero - Donations"
+ property string title
property bool containsMouse: false
property alias maximizeButtonVisible: maximizeButton.visible
property alias basicButtonVisible: goToBasicVersionButton.visible
diff --git a/get_libwallet_api.sh b/get_libwallet_api.sh
new file mode 100755
index 00000000..bbfdb04c
--- /dev/null
+++ b/get_libwallet_api.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+
+BITMONERO_URL=https://github.com/mbg033/bitmonero.git
+BITMONERO_BRANCH=develop
+# thanks to SO: http://stackoverflow.com/a/20283965/4118915
+CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)
+pushd $(pwd)
+ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+
+INSTALL_DIR=$ROOT_DIR/wallet
+BITMONERO_DIR=$ROOT_DIR/bitmonero
+
+
+if [ ! -d $BITMONERO_DIR ]; then
+ git clone --depth=1 $BITMONERO_URL $BITMONERO_DIR --branch $BITMONERO_BRANCH --single-branch
+else
+ cd $BITMONERO_DIR;
+ git checkout $BITMONERO_BRANCH
+ git pull;
+fi
+
+echo "cleaning up existing bitmonero build dir, libs and includes"
+rm -fr $BITMONERO_DIR/build
+rm -fr $BITMONERO_DIR/lib
+rm -fr $BITMONERO_DIR/include
+
+mkdir -p $BITMONERO_DIR/build/release
+pushd $BITMONERO_DIR/build/release
+
+
+if [ "$(uname)" == "Darwin" ]; then
+ # Do something under Mac OS X platform
+ cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../..
+elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
+ # Do something under GNU/Linux platform
+ cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" ../..
+elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then
+ # Do something under Windows NT platform
+ cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../..
+elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
+ # Do something under Windows NT platform
+ cmake -D CMAKE_BUILD_TYPE=Release -D STATIC=ON -D CMAKE_INSTALL_PREFIX="$BITMONERO_DIR" -G "MSYS Makefiles" ../..
+fi
+
+
+pushd $BITMONERO_DIR/build/release/src/wallet
+make -j$CPU_CORE_COUNT
+make install -j$CPU_CORE_COUNT
+popd
+popd
+
+
+
+
+
+
+
+
+
+
+
diff --git a/images/appicon.icns b/images/appicon.icns
new file mode 100755
index 00000000..b87cae95
Binary files /dev/null and b/images/appicon.icns differ
diff --git a/images/appicon.ico b/images/appicon.ico
new file mode 100644
index 00000000..abb4d57a
Binary files /dev/null and b/images/appicon.ico differ
diff --git a/images/appicons/128x128.png b/images/appicons/128x128.png
new file mode 100755
index 00000000..15d5dcf5
Binary files /dev/null and b/images/appicons/128x128.png differ
diff --git a/images/appicons/16x16.png b/images/appicons/16x16.png
new file mode 100755
index 00000000..0d8eb3fd
Binary files /dev/null and b/images/appicons/16x16.png differ
diff --git a/images/appicons/24x24.png b/images/appicons/24x24.png
new file mode 100755
index 00000000..1d3d140d
Binary files /dev/null and b/images/appicons/24x24.png differ
diff --git a/images/appicons/256x256.png b/images/appicons/256x256.png
new file mode 100755
index 00000000..9293a3d6
Binary files /dev/null and b/images/appicons/256x256.png differ
diff --git a/images/appicons/32x32.png b/images/appicons/32x32.png
new file mode 100755
index 00000000..d547a469
Binary files /dev/null and b/images/appicons/32x32.png differ
diff --git a/images/appicons/48x48.png b/images/appicons/48x48.png
new file mode 100755
index 00000000..17a5d040
Binary files /dev/null and b/images/appicons/48x48.png differ
diff --git a/images/appicons/64x64.png b/images/appicons/64x64.png
new file mode 100755
index 00000000..c504f89e
Binary files /dev/null and b/images/appicons/64x64.png differ
diff --git a/images/appicons/96x96.png b/images/appicons/96x96.png
new file mode 100755
index 00000000..f01ea8c4
Binary files /dev/null and b/images/appicons/96x96.png differ
diff --git a/lang/flags/bangladesh.png b/lang/flags/bangladesh.png
index 099b7eee..6fc33574 100644
Binary files a/lang/flags/bangladesh.png and b/lang/flags/bangladesh.png differ
diff --git a/lang/flags/brazil.png b/lang/flags/brazil.png
index baa62b9d..1438aa0d 100644
Binary files a/lang/flags/brazil.png and b/lang/flags/brazil.png differ
diff --git a/lang/flags/china.png b/lang/flags/china.png
index 5f3c6fc8..dfe1fb66 100644
Binary files a/lang/flags/china.png and b/lang/flags/china.png differ
diff --git a/lang/flags/german.png b/lang/flags/german.png
index 7756bf59..320b24ef 100644
Binary files a/lang/flags/german.png and b/lang/flags/german.png differ
diff --git a/lang/flags/india.png b/lang/flags/india.png
index bf27a173..1e56cb3b 100644
Binary files a/lang/flags/india.png and b/lang/flags/india.png differ
diff --git a/lang/flags/italy.png b/lang/flags/italy.png
new file mode 100644
index 00000000..177716ad
Binary files /dev/null and b/lang/flags/italy.png differ
diff --git a/lang/flags/palestine.png b/lang/flags/palestine.png
index 78f5b1d4..66b5939e 100644
Binary files a/lang/flags/palestine.png and b/lang/flags/palestine.png differ
diff --git a/lang/flags/rpa.png b/lang/flags/rpa.png
index 61de692d..07c4655f 100644
Binary files a/lang/flags/rpa.png and b/lang/flags/rpa.png differ
diff --git a/lang/flags/russia.png b/lang/flags/russia.png
index 905e6bab..1fc22e50 100644
Binary files a/lang/flags/russia.png and b/lang/flags/russia.png differ
diff --git a/lang/flags/uk.png b/lang/flags/uk.png
index cb68609c..cbd99556 100644
Binary files a/lang/flags/uk.png and b/lang/flags/uk.png differ
diff --git a/lang/flags/usa.png b/lang/flags/usa.png
index fd501324..bd70935c 100644
Binary files a/lang/flags/usa.png and b/lang/flags/usa.png differ
diff --git a/lang/languages.xml b/lang/languages.xml
index eacfcad5..cc47eaa1 100644
--- a/lang/languages.xml
+++ b/lang/languages.xml
@@ -1,13 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/main.cpp b/main.cpp
index b1bd1a72..e356659c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -29,18 +29,82 @@
#include
#include
#include
+#include
+#include
#include "clipboardAdapter.h"
#include "filter.h"
+#include "oscursor.h"
+#include "oshelper.h"
+#include "WalletManager.h"
+#include "Wallet.h"
+#include "PendingTransaction.h"
+#include "TranslationManager.h"
+
+
+
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+
+ qDebug() << "app startd";
+
+ app.setApplicationName("monero-core");
+ app.setOrganizationDomain("getmonero.org");
+ app.setOrganizationName("The Monero Project");
+
filter *eventFilter = new filter;
app.installEventFilter(eventFilter);
qmlRegisterType("moneroComponents", 1, 0, "Clipboard");
+ qmlRegisterUncreatableType("Bitmonero.Wallet", 1, 0, "Wallet", "Wallet can't be instantiated directly");
+
+ qmlRegisterUncreatableType("Bitmonero.PendingTransaction", 1, 0, "PendingTransaction",
+ "PendingTransaction can't be instantiated directly");
+
+ qmlRegisterUncreatableType("Bitmonero.WalletManager", 1, 0, "WalletManager",
+ "WalletManager can't be instantiated directly");
+
+ qmlRegisterUncreatableType("moneroComponents", 1, 0, "TranslationManager",
+ "TranslationManager can't be instantiated directly");
+
+ qRegisterMetaType();
+
+
+
+
QQmlApplicationEngine engine;
+
+ OSCursor cursor;
+ engine.rootContext()->setContextProperty("globalCursor", &cursor);
+ OSHelper osHelper;
+ engine.rootContext()->setContextProperty("oshelper", &osHelper);
+
+ engine.rootContext()->setContextProperty("walletManager", WalletManager::instance());
+
+ engine.rootContext()->setContextProperty("translationManager", TranslationManager::instance());
+
+
+// export to QML monero accounts root directory
+// wizard is talking about where
+// to save the wallet file (.keys, .bin), they have to be user-accessible for
+// backups - I reckon we save that in My Documents\Monero Accounts\ on
+// Windows, ~/Monero Accounts/ on nix / osx
+
+#ifdef Q_OS_WIN
+ QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation);
+#elif defined(Q_OS_UNIX)
+ QStringList moneroAccountsRootDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
+#endif
+
+ if (!moneroAccountsRootDir.empty()) {
+ QString moneroAccountsDir = moneroAccountsRootDir.at(0) + "/Monero Accounts";
+ QDir tempDir;
+ tempDir.mkpath(moneroAccountsDir);
+ engine.rootContext()->setContextProperty("moneroAccountsDir", moneroAccountsDir);
+ }
+
engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QObject *rootObject = engine.rootObjects().first();
@@ -50,5 +114,7 @@ int main(int argc, char *argv[])
QObject::connect(eventFilter, SIGNAL(mousePressed(QVariant,QVariant,QVariant)), rootObject, SLOT(mousePressed(QVariant,QVariant,QVariant)));
QObject::connect(eventFilter, SIGNAL(mouseReleased(QVariant,QVariant,QVariant)), rootObject, SLOT(mouseReleased(QVariant,QVariant,QVariant)));
+ WalletManager::instance()->setLogLevel(WalletManager::LogLevel_Silent);
+
return app.exec();
}
diff --git a/main.qml b/main.qml
index d629a248..6d57b634 100644
--- a/main.qml
+++ b/main.qml
@@ -30,23 +30,37 @@ import QtQuick 2.2
import QtQuick.Window 2.0
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
+import QtQuick.Dialogs 1.2
+import Qt.labs.settings 1.0
+import Bitmonero.Wallet 1.0
+import Bitmonero.PendingTransaction 1.0
+
+
import "components"
import "wizard"
ApplicationWindow {
id: appWindow
- objectName: "appWindow"
+
+
property var currentItem
property bool whatIsEnable: false
property bool ctrlPressed: false
- property bool rightPanelExpanded: true
+ property bool rightPanelExpanded: false
property bool osx: false
+ property alias persistentSettings : persistentSettings
+ property var currentWallet;
+ property var transaction;
+ property alias password : passwordDialog.password
+
function altKeyReleased() { ctrlPressed = false; }
+
function showPageRequest(page) {
middlePanel.state = page
leftPanel.selectItem(page)
}
+
function sequencePressed(obj, seq) {
if(seq === undefined)
return
@@ -86,30 +100,235 @@ ApplicationWindow {
}
function mousePressed(obj, mouseX, mouseY) {
- if(obj.objectName === "appWindow")
- obj = rootItem
+// if(obj.objectName === "appWindow")
+// obj = rootItem
- var tmp = rootItem.mapFromItem(obj, mouseX, mouseY)
- if(tmp !== undefined) {
- mouseX = tmp.x
- mouseY = tmp.y
- }
+// var tmp = rootItem.mapFromItem(obj, mouseX, mouseY)
+// if(tmp !== undefined) {
+// mouseX = tmp.x
+// mouseY = tmp.y
+// }
- if(currentItem !== undefined) {
- var tmp_x = rootItem.mapToItem(currentItem, mouseX, mouseY).x
- var tmp_y = rootItem.mapToItem(currentItem, mouseX, mouseY).y
+// if(currentItem !== undefined) {
+// var tmp_x = rootItem.mapToItem(currentItem, mouseX, mouseY).x
+// var tmp_y = rootItem.mapToItem(currentItem, mouseX, mouseY).y
- if(!currentItem.containsPoint(tmp_x, tmp_y)) {
- currentItem.hide()
- currentItem = undefined
- }
- }
+// if(!currentItem.containsPoint(tmp_x, tmp_y)) {
+// currentItem.hide()
+// currentItem = undefined
+// }
+// }
}
function mouseReleased(obj, mouseX, mouseY) {
}
+
+ function initialize() {
+ console.log("initializing..")
+
+ // setup language
+ var locale = persistentSettings.locale
+ if (locale !== "") {
+ translationManager.setLanguage(locale.split("_")[0]);
+ }
+
+ middlePanel.paymentClicked.connect(handlePayment);
+ // basicPanel.paymentClicked.connect(handlePayment);
+
+
+ // wallet already opened with wizard, we just need to initialize it
+ if (typeof wizard.settings['wallet'] !== 'undefined') {
+ connectWallet(wizard.settings['wallet'])
+ } else {
+ var wallet_path = walletPath();
+ console.log("opening wallet at: ", wallet_path, "with password: ", appWindow.password);
+ walletManager.openWalletAsync(wallet_path, appWindow.password,
+ persistentSettings.testnet);
+ }
+ }
+
+
+ function connectWallet(wallet) {
+ showProcessingSplash()
+ currentWallet = wallet
+ currentWallet.refreshed.connect(onWalletRefresh)
+ currentWallet.updated.connect(onWalletUpdate)
+ console.log("initializing with daemon address: ", persistentSettings.daemon_address)
+ currentWallet.initAsync(persistentSettings.daemon_address, 0);
+ }
+
+ function walletPath() {
+ var wallet_path = persistentSettings.wallet_path + "/" + persistentSettings.account_name + "/"
+ + persistentSettings.account_name;
+ return wallet_path;
+ }
+
+ function onWalletOpened(wallet) {
+ console.log(">>> wallet opened: " + wallet)
+ if (wallet.status !== Wallet.Status_Ok) {
+ if (appWindow.password === '') {
+ console.error("Error opening wallet with empty password: ", wallet.errorString);
+ console.log("closing wallet async : " + wallet.address)
+ walletManager.closeWalletAsync(wallet)
+ // try to open wallet with password;
+ passwordDialog.open();
+ } else {
+ // opening with password but password doesn't match
+ console.error("Error opening wallet with password: ", wallet.errorString);
+
+ informationPopup.title = qsTr("Error") + translationManager.emptyString;
+ informationPopup.text = qsTr("Couldn't open wallet: ") + wallet.errorString;
+ informationPopup.icon = StandardIcon.Critical
+ console.log("closing wallet async : " + wallet.address)
+ walletManager.closeWalletAsync(wallet);
+ informationPopup.open()
+ informationPopup.onCloseCallback = function() {
+ passwordDialog.open()
+ }
+ }
+ return;
+ }
+
+ // wallet opened successfully, subscribing for wallet updates
+ connectWallet(wallet)
+
+ }
+
+
+ function onWalletClosed(walletAddress) {
+ console.log(">>> wallet closed: " + walletAddress)
+ }
+
+ function onWalletUpdate() {
+ console.log(">>> wallet updated")
+ basicPanel.unlockedBalanceText = leftPanel.unlockedBalanceText =
+ walletManager.displayAmount(currentWallet.unlockedBalance);
+ basicPanel.balanceText = leftPanel.balanceText = walletManager.displayAmount(currentWallet.balance);
+ }
+
+ function onWalletRefresh() {
+ console.log(">>> wallet refreshed")
+ if (splash.visible) {
+ hideProcessingSplash()
+ }
+
+ leftPanel.networkStatus.connected = currentWallet.connected
+ onWalletUpdate();
+ }
+
+
+ function walletsFound() {
+ var wallets = walletManager.findWallets(moneroAccountsDir);
+ if (wallets.length === 0) {
+ wallets = walletManager.findWallets(applicationDirectory);
+ }
+ print(wallets);
+ return wallets.length > 0;
+ }
+
+
+
+
+ // called on "transfer"
+ function handlePayment(address, paymentId, amount, mixinCount, priority) {
+ console.log("Creating transaction: ")
+ console.log("\taddress: ", address,
+ ", payment_id: ", paymentId,
+ ", amount: ", amount,
+ ", mixins: ", mixinCount,
+ ", priority: ", priority);
+
+
+ // validate amount;
+ var amountxmr = walletManager.amountFromString(amount);
+ console.log("integer amount: ", amountxmr);
+ if (amountxmr <= 0) {
+ informationPopup.title = qsTr("Error") + translationManager.emptyString;
+ informationPopup.text = qsTr("Amount is wrong: expected number from %1 to %2")
+ .arg(walletManager.displayAmount(0))
+ .arg(walletManager.maximumAllowedAmountAsSting())
+ + translationManager.emptyString
+
+ informationPopup.icon = StandardIcon.Critical
+ informationPopup.onCloseCallback = null
+ informationPopup.open()
+ return;
+ }
+
+ // validate address;
+ transaction = currentWallet.createTransaction(address, paymentId, amountxmr, mixinCount, priority);
+ if (transaction.status !== PendingTransaction.Status_Ok) {
+ console.error("Can't create transaction: ", transaction.errorString);
+ informationPopup.title = qsTr("Error") + translationManager.emptyString;
+ informationPopup.text = qsTr("Can't create transaction: ") + transaction.errorString
+ informationPopup.icon = StandardIcon.Critical
+ informationPopup.onCloseCallback = null
+ informationPopup.open();
+ // deleting transaction object, we don't want memleaks
+ currentWallet.disposeTransaction(transaction);
+
+ } else {
+ console.log("Transaction created, amount: " + walletManager.displayAmount(transaction.amount)
+ + ", fee: " + walletManager.displayAmount(transaction.fee));
+
+ // here we show confirmation popup;
+
+ transactionConfirmationPopup.title = qsTr("Confirmation") + translationManager.emptyString
+ transactionConfirmationPopup.text = qsTr("Please confirm transaction:\n\n")
+ + qsTr("\nAddress: ") + address
+ + qsTr("\nPayment ID: ") + paymentId
+ + qsTr("\nAmount: ") + walletManager.displayAmount(transaction.amount)
+ + qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee)
+ + translationManager.emptyString
+ transactionConfirmationPopup.icon = StandardIcon.Question
+ transactionConfirmationPopup.open()
+ // committing transaction
+ }
+ }
+
+ // called after user confirms transaction
+ function handleTransactionConfirmed() {
+ if (!transaction.commit()) {
+ console.log("Error committing transaction: " + transaction.errorString);
+ informationPopup.title = qsTr("Error") + translationManager.emptyString
+ informationPopup.text = qsTr("Couldn't send the money: ") + transaction.errorString
+ informationPopup.icon = StandardIcon.Critical
+ } else {
+ informationPopup.title = qsTr("Information") + translationManager.emptyString
+ informationPopup.text = qsTr("Money sent successfully") + translationManager.emptyString
+ informationPopup.icon = StandardIcon.Information
+ }
+ informationPopup.onCloseCallback = null
+ informationPopup.open()
+ currentWallet.refresh()
+ currentWallet.disposeTransaction(transaction)
+ }
+
+ // blocks UI if wallet can't be opened or no connection to the daemon
+ function enableUI(enable) {
+ middlePanel.enabled = enable;
+ leftPanel.enabled = enable;
+ rightPanel.enabled = enable;
+ basicPanel.enabled = enable;
+ }
+
+ function showProcessingSplash(message) {
+ console.log("Displaying processing splash")
+ if (typeof message != 'undefined') {
+ splash.message = message
+ }
+ splash.show()
+ }
+
+ function hideProcessingSplash() {
+ console.log("Hiding processing splash")
+ splash.hide()
+ }
+
+
+ objectName: "appWindow"
visible: true
width: rightPanelExpanded ? 1269 : 1269 - 300
height: 800
@@ -117,11 +336,92 @@ ApplicationWindow {
flags: Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint
onWidthChanged: x -= 0
+
Component.onCompleted: {
x = (Screen.width - width) / 2
y = (Screen.height - height) / 2
+ //
+ walletManager.walletOpened.connect(onWalletOpened);
+ walletManager.walletClosed.connect(onWalletClosed);
+
+ rootItem.state = walletsFound() ? "normal" : "wizard";
+ if (rootItem.state === "normal") {
+ initialize(persistentSettings)
+ }
}
+ onRightPanelExpandedChanged: {
+ if (rightPanelExpanded) {
+ rightPanel.updateTweets()
+ }
+ }
+
+
+ Settings {
+ id: persistentSettings
+ property string language
+ property string locale
+ property string account_name
+ property string wallet_path
+ property bool auto_donations_enabled : true
+ property int auto_donations_amount : 50
+ property bool allow_background_mining : true
+ property bool testnet: true
+ property string daemon_address: "localhost:38081"
+ property string payment_id
+ }
+
+ // TODO: replace with customized popups
+
+ // Information dialog
+ MessageDialog {
+ // dynamically change onclose handler
+ property var onCloseCallback
+ id: informationPopup
+ standardButtons: StandardButton.Ok
+ onAccepted: {
+ if (onCloseCallback) {
+ onCloseCallback()
+ }
+ }
+ }
+
+ // Confrirmation aka question dialog
+ MessageDialog {
+ id: transactionConfirmationPopup
+ standardButtons: StandardButton.Ok + StandardButton.Cancel
+ onAccepted: {
+ handleTransactionConfirmed()
+ }
+ }
+
+ PasswordDialog {
+ id: passwordDialog
+ standardButtons: StandardButton.Ok + StandardButton.Cancel
+ onAccepted: {
+ appWindow.currentWallet = null
+ appWindow.initialize();
+ }
+ onRejected: {
+ appWindow.enableUI(false)
+ }
+ onDiscard: {
+ appWindow.enableUI(false)
+ }
+ }
+
+
+ ProcessingSplash {
+ id: splash
+ width: appWindow.width / 2
+ height: appWindow.height / 2
+ x: (appWindow.width - width) / 2 + appWindow.x
+ y: (appWindow.height - height) / 2 + appWindow.y
+ message: qsTr("Please wait...")
+ }
+
+
+
Item {
id: rootItem
anchors.fill: parent
@@ -142,7 +442,7 @@ ApplicationWindow {
PropertyChanges { target: titleBar; maximizeButtonVisible: false }
PropertyChanges { target: frameArea; blocked: true }
PropertyChanges { target: titleBar; y: 0 }
- PropertyChanges { target: titleBar; title: "Program setup wizard" }
+ PropertyChanges { target: titleBar; title: qsTr("Program setup wizard") + translationManager.emptyString }
}, State {
name: "normal"
PropertyChanges { target: leftPanel; visible: true }
@@ -156,7 +456,7 @@ ApplicationWindow {
PropertyChanges { target: titleBar; maximizeButtonVisible: true }
PropertyChanges { target: frameArea; blocked: false }
PropertyChanges { target: titleBar; y: -titleBar.height }
- PropertyChanges { target: titleBar; title: "Monero - Donations" }
+ PropertyChanges { target: titleBar; title: qsTr("Monero") + translationManager.emptyString }
}
]
@@ -168,6 +468,7 @@ ApplicationWindow {
onDashboardClicked: middlePanel.state = "Dashboard"
onHistoryClicked: middlePanel.state = "History"
onTransferClicked: middlePanel.state = "Transfer"
+ onReceiveClicked: middlePanel.state = "Receive"
onAddressBookClicked: middlePanel.state = "AddressBook"
onMiningClicked: middlePanel.state = "Minning"
onSettingsClicked: middlePanel.state = "Settings"
@@ -182,18 +483,19 @@ ApplicationWindow {
visible: appWindow.rightPanelExpanded
}
+
MiddlePanel {
id: middlePanel
anchors.bottom: parent.bottom
anchors.left: leftPanel.right
anchors.right: rightPanel.left
height: parent.height
- state: "Dashboard"
+ state: "Transfer"
}
TipItem {
id: tipItem
- text: "send to the same destination"
+ text: qsTr("send to the same destination") + translationManager.emptyString
visible: false
}
@@ -201,6 +503,9 @@ ApplicationWindow {
id: basicPanel
x: 0
anchors.bottom: parent.bottom
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
visible: false
}
@@ -331,7 +636,10 @@ ApplicationWindow {
WizardMain {
id: wizard
anchors.fill: parent
- onUseMoneroClicked: rootItem.state = "normal"
+ onUseMoneroClicked: {
+ rootItem.state = "normal" // TODO: listen for this state change in appWindow;
+ appWindow.initialize();
+ }
}
property int maxWidth: leftPanel.width + 655 + rightPanel.width
@@ -355,17 +663,18 @@ ApplicationWindow {
"images/resize.png"
}
- property int previousX: 0
- property int previousY: 0
+ property var previousPosition
+
onPressed: {
- previousX = mouseX
- previousY = mouseY
+ previousPosition = globalCursor.getPosition()
}
onPositionChanged: {
if(!pressed) return
- var dx = previousX - mouseX
- var dy = previousY - mouseY
+ var pos = globalCursor.getPosition()
+ //var delta = previousPosition - pos
+ var dx = previousPosition.x - pos.x
+ var dy = previousPosition.y - pos.y
if(appWindow.width - dx > parent.maxWidth)
appWindow.width -= dx
@@ -374,6 +683,7 @@ ApplicationWindow {
if(appWindow.height - dy > parent.maxHeight)
appWindow.height -= dy
else appWindow.height = parent.maxHeight
+ previousPosition = pos
}
}
@@ -390,13 +700,16 @@ ApplicationWindow {
property var previousPosition
anchors.fill: parent
propagateComposedEvents: true
- onPressed: previousPosition = Qt.point(mouseX, mouseY)
+ onPressed: previousPosition = globalCursor.getPosition()
onPositionChanged: {
if (pressedButtons == Qt.LeftButton) {
- var dx = mouseX - previousPosition.x
- var dy = mouseY - previousPosition.y
+ var pos = globalCursor.getPosition()
+ var dx = pos.x - previousPosition.x
+ var dy = pos.y - previousPosition.y
+
appWindow.x += dx
appWindow.y += dy
+ previousPosition = pos
}
}
}
diff --git a/monero-core.pro b/monero-core.pro
index 75812a7e..2dde61fe 100644
--- a/monero-core.pro
+++ b/monero-core.pro
@@ -2,24 +2,170 @@ TEMPLATE = app
QT += qml quick widgets
+WALLET_ROOT=$$PWD/bitmonero
+
+CONFIG += c++11
+
+# cleaning "auto-generated" bitmonero directory on "make distclean"
+QMAKE_DISTCLEAN += -r $$WALLET_ROOT
+
+INCLUDEPATH += $$WALLET_ROOT/include \
+ $$PWD/src/libwalletqt
+
HEADERS += \
filter.h \
- clipboardAdapter.h
+ clipboardAdapter.h \
+ oscursor.h \
+ src/libwalletqt/WalletManager.h \
+ src/libwalletqt/Wallet.h \
+ src/libwalletqt/PendingTransaction.h \
+ src/libwalletqt/TransactionHistory.h \
+ src/libwalletqt/TransactionInfo.h \
+ oshelper.h \
+ TranslationManager.h
SOURCES += main.cpp \
filter.cpp \
- clipboardAdapter.cpp
+ clipboardAdapter.cpp \
+ oscursor.cpp \
+ src/libwalletqt/WalletManager.cpp \
+ src/libwalletqt/Wallet.cpp \
+ src/libwalletqt/PendingTransaction.cpp \
+ src/libwalletqt/TransactionHistory.cpp \
+ src/libwalletqt/TransactionInfo.cpp \
+ oshelper.cpp \
+ TranslationManager.cpp
+
+lupdate_only {
+SOURCES = *.qml \
+ components/*.qml \
+ pages/*.qml \
+ wizard/*.qml
+}
+
+LIBS += -L$$WALLET_ROOT/lib \
+ -lwallet_merged \
+ -lwallet_merged2
+
+win32 {
+ #QMAKE_LFLAGS += -static
+ LIBS+= \
+ -Wl,-Bstatic \
+ -lboost_serialization-mt \
+ -lboost_thread-mt \
+ -lboost_system-mt \
+ -lboost_date_time-mt \
+ -lboost_filesystem-mt \
+ -lboost_regex-mt \
+ -lboost_chrono-mt \
+ -lboost_program_options-mt \
+ -lssl \
+ -lcrypto \
+ -Wl,-Bdynamic \
+ -lws2_32 \
+ -lwsock32 \
+ -lIphlpapi \
+ -lgdi32
+}
+
+linux {
+ LIBS+= \
+ -Wl,-Bstatic \
+ -lboost_serialization \
+ -lboost_thread \
+ -lboost_system \
+ -lboost_date_time \
+ -lboost_filesystem \
+ -lboost_regex \
+ -lboost_chrono \
+ -lboost_program_options \
+ -lssl \
+ -lcrypto \
+ -Wl,-Bdynamic \
+ -ldl
+}
+
+macx {
+ LIBS+= \
+ -L/usr/local/lib \
+ -lboost_serialization \
+ -lboost_thread-mt \
+ -lboost_system \
+ -lboost_date_time \
+ -lboost_filesystem \
+ -lboost_regex \
+ -lboost_chrono \
+ -lboost_program_options \
+ -lssl \
+ -lcrypto \
+ -ldl
+
+}
+
+
+# translation stuff
+TRANSLATIONS = \ # English is default language, no explicit translation file
+ $$PWD/translations/monero-core_de.ts \ # Deutsch
+ $$PWD/translations/monero-core_zh.ts \ # Chineese
+ $$PWD/translations/monero-core_ru.ts \ # Russian
+ $$PWD/translations/monero-core_it.ts \ # Italian
+ $$PWD/translations/monero-core_pl.ts \ # Polish
CONFIG(release, debug|release) {
- DESTDIR=release
+ DESTDIR = release/bin
+ LANGUPD_OPTIONS = -locations relative -no-ui-lines
+ LANGREL_OPTIONS = -compress -nounfinished -removeidentical
+
+} else {
+ DESTDIR = debug/bin
+ LANGUPD_OPTIONS =
+ LANGREL_OPTIONS = -markuntranslated "MISS_TR "
}
-CONFIG(debug, debug|release) {
- DESTDIR=debug
+TARGET_FULL_PATH = $$OUT_PWD/$$DESTDIR
+TRANSLATION_TARGET_DIR = $$TARGET_FULL_PATH/translations
+
+macx {
+ TARGET_FULL_PATH = $$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET)
+ TRANSLATION_TARGET_DIR = $$TARGET_FULL_PATH/Contents/Resources/translations
}
+
+isEmpty(QMAKE_LUPDATE) {
+ win32:LANGUPD = $$[QT_INSTALL_BINS]\lupdate.exe
+ else:LANGUPD = $$[QT_INSTALL_BINS]/lupdate
+}
+
+isEmpty(QMAKE_LRELEASE) {
+ win32:LANGREL = $$[QT_INSTALL_BINS]\lrelease.exe
+ else:LANGREL = $$[QT_INSTALL_BINS]/lrelease
+}
+
+langupd.command = \
+ $$LANGUPD $$LANGUPD_OPTIONS $$shell_path($$_PRO_FILE) -ts $$_PRO_FILE_PWD/$$TRANSLATIONS
+
+
+
+langrel.depends = langupd
+langrel.input = TRANSLATIONS
+langrel.output = $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
+langrel.commands = \
+ $$LANGREL $$LANGREL_OPTIONS ${QMAKE_FILE_IN} -qm $$TRANSLATION_TARGET_DIR/${QMAKE_FILE_BASE}.qm
+langrel.CONFIG += no_link
+
+QMAKE_EXTRA_TARGETS += langupd deploy deploy_win
+QMAKE_EXTRA_COMPILERS += langrel
+
+
+
+# temporary: do not update/release translations for "Debug" build,
+# as we have an issue with linking
+CONFIG(release, debug|release) {
+ PRE_TARGETDEPS += langupd compiler_langrel_make_all
+}
+
RESOURCES += qml.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
@@ -27,4 +173,27 @@ QML_IMPORT_PATH =
# Default rules for deployment.
include(deployment.pri)
+macx {
+ deploy.commands += macdeployqt $$sprintf("%1/%2/%3.app", $$OUT_PWD, $$DESTDIR, $$TARGET) -qmldir=$$PWD
+}
+win32 {
+ deploy.commands += windeployqt $$sprintf("%1/%2/%3.exe", $$OUT_PWD, $$DESTDIR, $$TARGET) -qmldir=$$PWD
+ deploy.commands += $$escape_expand(\n\t) $$PWD/windeploy_helper.sh $$DESTDIR
+}
+
+
+
+OTHER_FILES += \
+ .gitignore \
+ $$TRANSLATIONS
+
+DISTFILES += \
+ notes.txt
+
+
+# windows application icon
+RC_FILE = monero-core.rc
+
+# mac application icon
+ICON = $$PWD/images/appicon.icns
diff --git a/monero-core.pro.user b/monero-core.pro.user
deleted file mode 100644
index 7c1cd126..00000000
--- a/monero-core.pro.user
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 80
- true
- true
- 1
- true
- false
- 0
- true
- 0
- 8
- true
- 1
- true
- true
- true
- false
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop Qt 5.3 MinGW 32bit
- Desktop Qt 5.3 MinGW 32bit
- qt.53.win32_mingw482_kit
- 0
- 0
- 0
-
- G:/RPA/build-bitmonero-Desktop_Qt_5_3_0_MinGW_32bit-Debug
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- false
-
-
-
- 2
- budowania
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- true
- clean
-
-
- 1
- czyszczenia
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Debug
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
- true
-
-
- G:/RPA/build-bitmonero-Desktop_Qt_5_3_0_MinGW_32bit-Release
-
-
- true
- qmake
-
- QtProjectManager.QMakeBuildStep
- false
- true
-
- false
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- false
-
-
-
- 2
- budowania
-
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Make
-
- Qt4ProjectManager.MakeStep
-
- true
- clean
-
-
- 1
- czyszczenia
-
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- Release
-
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- true
-
- 2
-
-
- 0
- instalacji
-
- ProjectExplorer.BuildSteps.Deploy
-
- 1
- Zainstaluj lokalnie
-
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
-
-
- false
- false
- false
- false
- true
- 0.01
- 10
- true
- 1
- 25
-
- 1
- true
- false
- true
- valgrind
-
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
-
- 2
-
- monero-core
-
- Qt4ProjectManager.Qt4RunConfiguration:G:/RPA/bitmonero/monero-core.pro
-
- monero-core.pro
- false
- false
-
- 3768
- false
- true
- false
- false
- true
-
- 1
-
-
-
- ProjectExplorer.Project.TargetCount
- 1
-
-
- ProjectExplorer.Project.Updater.EnvironmentId
- {20382c58-78e1-43a4-9d27-354b0656be87}
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 15
-
-
diff --git a/monero-core.rc b/monero-core.rc
new file mode 100644
index 00000000..47a4b532
--- /dev/null
+++ b/monero-core.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "images/appicon.ico"
diff --git a/oscursor.cpp b/oscursor.cpp
new file mode 100644
index 00000000..0d9c1acc
--- /dev/null
+++ b/oscursor.cpp
@@ -0,0 +1,10 @@
+#include "oscursor.h"
+#include
+OSCursor::OSCursor(QObject *parent)
+ : QObject(parent)
+{
+}
+QPoint OSCursor::getPosition() const
+{
+ return QCursor::pos();
+}
diff --git a/oscursor.h b/oscursor.h
new file mode 100644
index 00000000..db19227d
--- /dev/null
+++ b/oscursor.h
@@ -0,0 +1,25 @@
+#ifndef OSCURSOR_H
+#define OSCURSOR_H
+
+
+#include
+#include
+#include
+class OSCursor : public QObject
+{
+ Q_OBJECT
+ //QObject();
+public:
+ //QObject(QObject* aParent);
+ //OSCursor();
+ explicit OSCursor(QObject *parent = 0);
+ Q_INVOKABLE QPoint getPosition() const;
+};
+
+//OSCursor::OSCursor() : QObject(NULL){
+
+//}
+
+
+//Q_DECLARE_METATYPE(OSCursor)
+#endif // OSCURSOR_H
diff --git a/oshelper.cpp b/oshelper.cpp
new file mode 100644
index 00000000..cecae38e
--- /dev/null
+++ b/oshelper.cpp
@@ -0,0 +1,24 @@
+#include "oshelper.h"
+#include
+#include
+
+OSHelper::OSHelper(QObject *parent) : QObject(parent)
+{
+
+}
+
+QString OSHelper::temporaryFilename() const
+{
+ QString tempFileName;
+ {
+ QTemporaryFile f;
+ f.open();
+ tempFileName = f.fileName();
+ }
+ return tempFileName;
+}
+
+QString OSHelper::temporaryPath() const
+{
+ return QDir::tempPath();
+}
diff --git a/oshelper.h b/oshelper.h
new file mode 100644
index 00000000..809058cb
--- /dev/null
+++ b/oshelper.h
@@ -0,0 +1,22 @@
+#ifndef OSHELPER_H
+#define OSHELPER_H
+
+#include
+/**
+ * @brief The OSHelper class - exports to QML some OS-related functions
+ */
+class OSHelper : public QObject
+{
+ Q_OBJECT
+public:
+ explicit OSHelper(QObject *parent = 0);
+
+ Q_INVOKABLE QString temporaryFilename() const;
+ Q_INVOKABLE QString temporaryPath() const;
+
+signals:
+
+public slots:
+};
+
+#endif // OSHELPER_H
diff --git a/pages/AddressBook.qml b/pages/AddressBook.qml
index 2fcd939a..7ca79f35 100644
--- a/pages/AddressBook.qml
+++ b/pages/AddressBook.qml
@@ -44,7 +44,7 @@ Rectangle {
font.family: "Arial"
font.pixelSize: 18
color: "#4A4949"
- text: qsTr("Add new entry")
+ text: qsTr("Add new entry") + translationManager.emptyString
}
Label {
@@ -55,7 +55,7 @@ Rectangle {
anchors.topMargin: 17
text: qsTr("Address")
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
LineEdit {
@@ -74,9 +74,10 @@ Rectangle {
anchors.top: addressLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
- text: qsTr("Payment ID (Optional)")
+ text: qsTr("Payment ID (Optional)") + translationManager.emptyString
fontSize: 14
tipText: qsTr("Payment ID
A unique user name used in the address book. It is not a transfer of information sent during thevtransfer")
+ + translationManager.emptyString
}
LineEdit {
@@ -95,9 +96,9 @@ Rectangle {
anchors.top: paymentIdLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
- text: qsTr("Description (Local database)")
+ text: qsTr("Description (Local database)") + translationManager.emptyString
fontSize: 14
- tipText: qsTr("Tip tekst test
A unique user name used in the address book. It is not a transfer of information sent during thevtransfer")
+ + translationManager.emptyString
}
LineEdit {
@@ -95,9 +96,9 @@ Rectangle {
anchors.top: paymentIdLine.bottom
anchors.leftMargin: 17
anchors.topMargin: 17
- text: qsTr("Description (Local database)")
+ text: qsTr("Description (Local database)") + translationManager.emptyString
fontSize: 14
- tipText: qsTr("Tip tekst test
test line 2")
+ tipText: qsTr("Tip tekst test
test line 2") + translationManager.emptyString
}
LineEdit {
@@ -117,9 +118,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
- text: qsTr("Date from")
+ text: qsTr("Date from") + translationManager.emptyString
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
DatePicker {
@@ -139,7 +140,7 @@ Rectangle {
anchors.topMargin: 17
text: qsTr("To")
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
DatePicker {
@@ -185,9 +186,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
- text: qsTr("Type of transation")
+ text: qsTr("Type of transation") + translationManager.emptyString
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
ListModel {
@@ -219,9 +220,9 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 156
- text: qsTr("Amount from")
+ text: qsTr("Amount from") + translationManager.emptyString
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
LineEdit {
@@ -242,7 +243,7 @@ Rectangle {
width: 156
text: qsTr("To")
fontSize: 14
- tipText: qsTr("Tip tekst test")
+ tipText: qsTr("Tip tekst test") + translationManager.emptyString
}
LineEdit {
diff --git a/pages/Receive.qml b/pages/Receive.qml
new file mode 100644
index 00000000..1218ed7c
--- /dev/null
+++ b/pages/Receive.qml
@@ -0,0 +1,184 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import QtQuick 2.0
+import QtQuick.Controls 1.4
+import QtQuick.Controls.Styles 1.4
+import QtQuick.Layouts 1.1
+
+import "../components"
+import moneroComponents 1.0
+
+Rectangle {
+
+ color: "#F0EEEE"
+ property alias addressText : addressLine.text
+ property alias paymentIdText : paymentIdLine.text
+ property alias integratedAddressText : integratedAddressLine.text
+
+ function updatePaymentId() {
+ var payment_id = appWindow.persistentSettings.payment_id
+ if (payment_id.length === 0) {
+ payment_id = appWindow.wallet.generatePaymentId()
+ appWindow.persistentSettings.payment_id = payment_id
+ appWindow.wallet.payment_id = payment_id
+ }
+ paymentIdLine.text = payment_id
+ addressLine.text = appWindow.wallet.address
+ integratedAddressLine.text = appWindow.wallet.integratedAddress(payment_id)
+ }
+
+ Clipboard { id: clipboard }
+
+
+ /* main layout */
+ ColumnLayout {
+ id: mainLayout
+ anchors.margins: 40
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.right: parent.right
+
+ spacing: 20
+ property int labelWidth: 120
+ property int editWidth: 400
+ property int lineEditFontSize: 12
+
+
+ RowLayout {
+ id: addressRow
+
+ Label {
+ id: addressLabel
+ fontSize: 14
+ text: qsTr("Address") + translationManager.emptyString
+ width: mainLayout.labelWidth
+ }
+
+ LineEdit {
+ id: addressLine
+ fontSize: mainLayout.lineEditFontSize
+ placeholderText: qsTr("ReadOnly wallet address displayed here") + translationManager.emptyString;
+ readOnly: true
+ width: mainLayout.editWidth
+ Layout.fillWidth: true
+ IconButton {
+ imageSource: "../images/copyToClipboard.png"
+ onClicked: {
+ if (addressLine.text.length > 0) {
+ clipboard.setText(addressLine.text)
+ }
+ }
+ }
+ }
+ }
+
+ RowLayout {
+ id: integratedAddressRow
+ Label {
+ id: integratedAddressLabel
+ fontSize: 14
+ text: qsTr("Integrated address") + translationManager.emptyString
+ width: mainLayout.labelWidth
+ }
+
+
+ LineEdit {
+
+ id: integratedAddressLine
+ fontSize: mainLayout.lineEditFontSize
+ placeholderText: qsTr("ReadOnly wallet integrated address displayed here") + translationManager.emptyString
+ readOnly: true
+ width: mainLayout.editWidth
+ Layout.fillWidth: true
+ IconButton {
+ imageSource: "../images/copyToClipboard.png"
+ onClicked: {
+ if (integratedAddressLine.text.length > 0) {
+ clipboard.setText(integratedAddressLine.text)
+ }
+ }
+ }
+
+ }
+ }
+
+ RowLayout {
+ id: paymentIdRow
+ Label {
+ id: paymentIdLabel
+ fontSize: 14
+ text: qsTr("Payment ID") + translationManager.emptyString
+ width: mainLayout.labelWidth
+ }
+
+
+ LineEdit {
+ id: paymentIdLine
+ fontSize: mainLayout.lineEditFontSize
+ placeholderText: qsTr("PaymentID here") + translationManager.emptyString;
+ readOnly: false
+
+ width: mainLayout.editWidth
+ Layout.fillWidth: true
+
+ IconButton {
+ imageSource: "../images/copyToClipboard.png"
+ onClicked: {
+ if (paymentIdLine.text.length > 0) {
+ clipboard.setText(paymentIdLine.text)
+ }
+ }
+ }
+ }
+
+ StandardButton {
+ id: generatePaymentId
+ width: 80
+ fontSize: 14
+ shadowReleasedColor: "#FF4304"
+ shadowPressedColor: "#B32D00"
+ releasedColor: "#FF6C3C"
+ pressedColor: "#FF4304"
+ text: qsTr("Generate")
+ anchors.right: parent.right
+ onClicked: {
+ appWindow.persistentSettings.payment_id = appWindow.wallet.generatePaymentId();
+ updatePaymentId()
+ }
+ }
+ }
+
+ }
+
+ Component.onCompleted: {
+ console.log("Receive page loaded");
+ updatePaymentId()
+ }
+
+}
diff --git a/pages/Transfer.qml b/pages/Transfer.qml
index 2535b8fe..508b32af 100644
--- a/pages/Transfer.qml
+++ b/pages/Transfer.qml
@@ -27,11 +27,27 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
+import Bitmonero.PendingTransaction 1.0
import "../components"
+
Rectangle {
+ id: root
+ signal paymentClicked(string address, string paymentId, double amount, int mixinCount,
+ int priority)
+
color: "#F0EEEE"
+ function scaleValueToMixinCount(scaleValue) {
+ var scaleToMixinCount = [2,3,4,5,5,5,6,7,8,9,10,15,20,25];
+ if (scaleValue < scaleToMixinCount.length) {
+ return scaleToMixinCount[scaleValue];
+ } else {
+ return 0;
+ }
+ }
+
+
Label {
id: amountLabel
anchors.left: parent.left
@@ -39,7 +55,7 @@ Rectangle {
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 17
- text: qsTr("Amount")
+ text: qsTr("Amount") + translationManager.emptyString
fontSize: 14
}
@@ -49,10 +65,11 @@ Rectangle {
anchors.topMargin: 17
fontSize: 14
x: (parent.width - 17) / 2 + 17
- text: qsTr("Transaction prority")
+ text: qsTr("Transaction priority") + translationManager.emptyString
}
Row {
+ id: amountRow
anchors.top: amountLabel.bottom
anchors.topMargin: 5
anchors.left: parent.left
@@ -67,18 +84,28 @@ Rectangle {
source: "../images/moneroIcon.png"
}
}
-
+ // Amount input
LineEdit {
- placeholderText: qsTr("Amount...")
+ id: amountLine
+ placeholderText: qsTr("Amount...") + translationManager.emptyString
width: parent.width - 37 - 17
+ validator: DoubleValidator {
+ bottom: 0.0
+ notation: DoubleValidator.StandardNotation
+ locale: "C"
+ }
}
}
ListModel {
id: priorityModel
- ListElement { column1: "LOW"; column2: "( fee: 0.0002 )" }
- ListElement { column1: "MEDIUM"; column2: "( fee: 0.0004 )" }
- ListElement { column1: "HIGH"; column2: "( fee: 0.0008 )" }
+ // ListElement: cannot use script for property value, so
+ // code like this wont work:
+ // ListElement { column1: qsTr("LOW") + translationManager.emptyString ; column2: ""; priority: PendingTransaction.Priority_Low }
+
+ ListElement { column1: qsTr("LOW") ; column2: ""; priority: PendingTransaction.Priority_Low }
+ ListElement { column1: qsTr("MEDIUM") ; column2: ""; priority: PendingTransaction.Priority_Medium }
+ ListElement { column1: qsTr("HIGH") ; column2: ""; priority: PendingTransaction.Priority_High }
}
StandardDropdown {
@@ -96,16 +123,18 @@ Rectangle {
z: 1
}
+
+
Label {
id: privacyLabel
anchors.left: parent.left
anchors.right: parent.right
- anchors.top: priorityDropdown.bottom
+ anchors.top: amountRow.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 30
fontSize: 14
- text: qsTr("Privacy Level")
+ text: qsTr("Privacy Level") + translationManager.emptyString
}
PrivacyLevel {
@@ -116,8 +145,25 @@ Rectangle {
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 5
+ onFillLevelChanged: {
+ print ("PrivacyLevel changed:" + fillLevel)
+ print ("mixin count:" + scaleValueToMixinCount(fillLevel))
+ }
}
+
+ Label {
+ id: costLabel
+ anchors.right: parent.right
+ anchors.top: amountRow.bottom
+ anchors.leftMargin: 17
+ anchors.rightMargin: 17
+ anchors.topMargin: 30
+ fontSize: 14
+ text: qsTr("Cost")
+ }
+
+
Label {
id: addressLabel
anchors.left: parent.left
@@ -130,10 +176,11 @@ Rectangle {
textFormat: Text.RichText
text: qsTr("\
Address ( Type in or select from Address book )")
+ + translationManager.emptyString
onLinkActivated: appWindow.showPageRequest("AddressBook")
}
-
+ // recipient address input
LineEdit {
id: addressLine
anchors.left: parent.left
@@ -142,10 +189,11 @@ Rectangle {
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 5
+ // validator: RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }
}
Label {
- id: paymentLabel
+ id: paymentIdLabel
anchors.left: parent.left
anchors.right: parent.right
anchors.top: addressLine.bottom
@@ -153,29 +201,32 @@ Rectangle {
anchors.rightMargin: 17
anchors.topMargin: 17
fontSize: 14
- text: qsTr("Payment ID ( Optional )")
+ text: qsTr("Payment ID ( Optional )") + translationManager.emptyString
}
+ // payment id input
LineEdit {
- id: paymentLine
+ id: paymentIdLine
anchors.left: parent.left
anchors.right: parent.right
- anchors.top: paymentLabel.bottom
+ anchors.top: paymentIdLabel.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 5
+ // validator: DoubleValidator { top: 0.0 }
}
Label {
id: descriptionLabel
anchors.left: parent.left
anchors.right: parent.right
- anchors.top: paymentLine.bottom
+ anchors.top: paymentIdLine.bottom
anchors.leftMargin: 17
anchors.rightMargin: 17
anchors.topMargin: 17
fontSize: 14
text: qsTr("Description ( An optional description that will be saved to the local address book if entered )")
+ + translationManager.emptyString
}
LineEdit {
@@ -195,10 +246,20 @@ Rectangle {
anchors.leftMargin: 17
anchors.topMargin: 17
width: 60
- text: qsTr("SEND")
+ text: qsTr("SEND") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
+ enabled : addressLine.text.length > 0 && amountLine.text.length > 0
+ onClicked: {
+ console.log("Transfer: paymentClicked")
+ var priority = priorityModel.get(priorityDropdown.currentIndex).priority
+ console.log("priority: " + priority)
+ console.log("amount: " + amountLine.text)
+ root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, scaleValueToMixinCount(privacyLevelItem.fillLevel),
+ priority)
+ }
}
}
+
diff --git a/qml.qrc b/qml.qrc
index e2e774af..a44266b9 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -107,5 +107,14 @@
lang/flags/russia.pnglang/flags/uk.pnglang/flags/usa.png
+ wizard/WizardManageWalletUI.qml
+ wizard/WizardRecoveryWallet.qml
+ wizard/WizardMemoTextInput.qml
+ wizard/utils.js
+ pages/Receive.qml
+ components/IconButton.qml
+ lang/flags/italy.png
+ components/PasswordDialog.qml
+ components/ProcessingSplash.qml
diff --git a/src/libwalletqt/PendingTransaction.cpp b/src/libwalletqt/PendingTransaction.cpp
new file mode 100644
index 00000000..8c0d8c29
--- /dev/null
+++ b/src/libwalletqt/PendingTransaction.cpp
@@ -0,0 +1,38 @@
+#include "PendingTransaction.h"
+
+
+PendingTransaction::Status PendingTransaction::status() const
+{
+ return static_cast(m_pimpl->status());
+}
+
+QString PendingTransaction::errorString() const
+{
+ return QString::fromStdString(m_pimpl->errorString());
+}
+
+bool PendingTransaction::commit()
+{
+ return m_pimpl->commit();
+}
+
+quint64 PendingTransaction::amount() const
+{
+ return m_pimpl->amount();
+}
+
+quint64 PendingTransaction::dust() const
+{
+ return m_pimpl->dust();
+}
+
+quint64 PendingTransaction::fee() const
+{
+ return m_pimpl->fee();
+}
+
+PendingTransaction::PendingTransaction(Bitmonero::PendingTransaction *pt, QObject *parent)
+ : QObject(parent), m_pimpl(pt)
+{
+
+}
diff --git a/src/libwalletqt/PendingTransaction.h b/src/libwalletqt/PendingTransaction.h
new file mode 100644
index 00000000..8f5fca1c
--- /dev/null
+++ b/src/libwalletqt/PendingTransaction.h
@@ -0,0 +1,50 @@
+#ifndef PENDINGTRANSACTION_H
+#define PENDINGTRANSACTION_H
+
+#include
+
+#include
+
+//namespace Bitmonero {
+//class PendingTransaction;
+//}
+
+class PendingTransaction : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(Status status READ status)
+ Q_PROPERTY(QString errorString READ errorString)
+ Q_PROPERTY(quint64 amount READ amount)
+ Q_PROPERTY(quint64 dust READ dust)
+ Q_PROPERTY(quint64 fee READ fee)
+
+public:
+ enum Status {
+ Status_Ok = Bitmonero::PendingTransaction::Status_Ok,
+ Status_Error = Bitmonero::PendingTransaction::Status_Error
+ };
+ Q_ENUM(Status)
+
+ enum Priority {
+ Priority_Low = Bitmonero::PendingTransaction::Priority_Low,
+ Priority_Medium = Bitmonero::PendingTransaction::Priority_Medium,
+ Priority_High = Bitmonero::PendingTransaction::Priority_High
+ };
+ Q_ENUM(Priority)
+
+
+ Status status() const;
+ QString errorString() const;
+ Q_INVOKABLE bool commit();
+ quint64 amount() const;
+ quint64 dust() const;
+ quint64 fee() const;
+private:
+ explicit PendingTransaction(Bitmonero::PendingTransaction * pt, QObject *parent = 0);
+
+private:
+ friend class Wallet;
+ Bitmonero::PendingTransaction * m_pimpl;
+};
+
+#endif // PENDINGTRANSACTION_H
diff --git a/src/libwalletqt/TransactionHistory.cpp b/src/libwalletqt/TransactionHistory.cpp
new file mode 100644
index 00000000..2c2c9f73
--- /dev/null
+++ b/src/libwalletqt/TransactionHistory.cpp
@@ -0,0 +1,50 @@
+#include "TransactionHistory.h"
+#include "TransactionInfo.h"
+#include
+
+
+int TransactionHistory::count() const
+{
+ return m_pimpl->count();
+}
+
+TransactionInfo *TransactionHistory::transaction(int index)
+{
+ // box up Bitmonero::TransactionInfo
+ Bitmonero::TransactionInfo * impl = m_pimpl->transaction(index);
+ TransactionInfo * result = new TransactionInfo(impl, this);
+ return result;
+}
+
+TransactionInfo *TransactionHistory::transaction(const QString &id)
+{
+ // box up Bitmonero::TransactionInfo
+ Bitmonero::TransactionInfo * impl = m_pimpl->transaction(id.toStdString());
+ TransactionInfo * result = new TransactionInfo(impl, this);
+ return result;
+}
+
+QList TransactionHistory::getAll() const
+{
+ qDeleteAll(m_tinfo);
+ m_tinfo.clear();
+ TransactionHistory * parent = const_cast(this);
+ for (const auto i : m_pimpl->getAll()) {
+ TransactionInfo * ti = new TransactionInfo(i, parent);
+ m_tinfo.append(ti);
+ }
+ return m_tinfo;
+}
+
+void TransactionHistory::refresh()
+{
+ // XXX this invalidates previously saved history that might be used by clients
+ m_pimpl->refresh();
+ emit invalidated();
+}
+
+TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent)
+ : QObject(parent), m_pimpl(pimpl)
+{
+
+}
diff --git a/src/libwalletqt/TransactionHistory.h b/src/libwalletqt/TransactionHistory.h
new file mode 100644
index 00000000..a6287506
--- /dev/null
+++ b/src/libwalletqt/TransactionHistory.h
@@ -0,0 +1,42 @@
+#ifndef TRANSACTIONHISTORY_H
+#define TRANSACTIONHISTORY_H
+
+#include
+#include
+
+namespace Bitmonero {
+class TransactionHistory;
+}
+
+class TransactionInfo;
+
+class TransactionHistory : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(int count READ count)
+
+public:
+ int count() const;
+ Q_INVOKABLE TransactionInfo *transaction(int index);
+ Q_INVOKABLE TransactionInfo * transaction(const QString &id);
+ Q_INVOKABLE QList getAll() const;
+ Q_INVOKABLE void refresh();
+
+signals:
+ void invalidated();
+
+public slots:
+
+
+private:
+ explicit TransactionHistory(Bitmonero::TransactionHistory * pimpl, QObject *parent = 0);
+
+private:
+ friend class Wallet;
+
+ Bitmonero::TransactionHistory * m_pimpl;
+ mutable QList m_tinfo;
+
+};
+
+#endif // TRANSACTIONHISTORY_H
diff --git a/src/libwalletqt/TransactionInfo.cpp b/src/libwalletqt/TransactionInfo.cpp
new file mode 100644
index 00000000..192e85e5
--- /dev/null
+++ b/src/libwalletqt/TransactionInfo.cpp
@@ -0,0 +1,55 @@
+#include "TransactionInfo.h"
+#include
+
+TransactionInfo::Direction TransactionInfo::direction() const
+{
+ return static_cast(m_pimpl->direction());
+}
+
+bool TransactionInfo::isPending() const
+{
+ return m_pimpl->isPending();
+}
+
+bool TransactionInfo::isFailed() const
+{
+ return m_pimpl->isFailed();
+}
+
+quint64 TransactionInfo::amount() const
+{
+ return m_pimpl->amount();
+}
+
+quint64 TransactionInfo::fee() const
+{
+ return m_pimpl->fee();
+
+}
+
+quint64 TransactionInfo::blockHeight() const
+{
+ return m_pimpl->blockHeight();
+}
+
+QString TransactionInfo::hash() const
+{
+ return QString::fromStdString(m_pimpl->hash());
+}
+
+QString TransactionInfo::timestamp()
+{
+ QString result = QDateTime::fromTime_t(m_pimpl->timestamp()).toString(Qt::ISODate);
+ return result;
+}
+
+QString TransactionInfo::paymentId()
+{
+ return QString::fromStdString(m_pimpl->paymentId());
+}
+
+TransactionInfo::TransactionInfo(Bitmonero::TransactionInfo *pimpl, QObject *parent)
+ : QObject(parent), m_pimpl(pimpl)
+{
+
+}
diff --git a/src/libwalletqt/TransactionInfo.h b/src/libwalletqt/TransactionInfo.h
new file mode 100644
index 00000000..62c26e2f
--- /dev/null
+++ b/src/libwalletqt/TransactionInfo.h
@@ -0,0 +1,54 @@
+#ifndef TRANSACTIONINFO_H
+#define TRANSACTIONINFO_H
+
+#include
+#include
+
+class TransactionInfo : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(Direction direction READ direction)
+ Q_PROPERTY(bool isPending READ isPending)
+ Q_PROPERTY(bool isFailed READ isFailed)
+ Q_PROPERTY(quint64 amount READ amount)
+ Q_PROPERTY(quint64 fee READ fee)
+ Q_PROPERTY(quint64 blockHeight READ blockHeight)
+ Q_PROPERTY(QString hash READ hash)
+ Q_PROPERTY(QString timestamp READ timestamp)
+ Q_PROPERTY(QString paymentId READ paymentId)
+
+public:
+ enum Direction {
+ Direction_In = Bitmonero::TransactionInfo::Direction_In,
+ Direction_Out = Bitmonero::TransactionInfo::Direction_Out
+ };
+
+// TODO: implement as separate class;
+
+// struct Transfer {
+// Transfer(uint64_t _amount, const std::string &address);
+// const uint64_t amount;
+// const std::string address;
+// };
+ Direction direction() const;
+ bool isPending() const;
+ bool isFailed() const;
+ quint64 amount() const;
+ quint64 fee() const;
+ quint64 blockHeight() const;
+ //! transaction_id
+ QString hash() const;
+ QString timestamp();
+ QString paymentId();
+
+ // TODO: implement it
+ //! only applicable for output transactions
+ // virtual const std::vector & transfers() const = 0;
+private:
+ explicit TransactionInfo(Bitmonero::TransactionInfo * pimpl, QObject *parent = 0);
+private:
+ friend class TransactionHistory;
+ Bitmonero::TransactionInfo * m_pimpl;
+};
+
+#endif // TRANSACTIONINFO_H
diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp
new file mode 100644
index 00000000..4c6995cb
--- /dev/null
+++ b/src/libwalletqt/Wallet.cpp
@@ -0,0 +1,206 @@
+#include "Wallet.h"
+#include "PendingTransaction.h"
+#include "TransactionHistory.h"
+#include "wallet/wallet2_api.h"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace {
+
+
+}
+
+class WalletListenerImpl : public Bitmonero::WalletListener
+{
+public:
+ WalletListenerImpl(Wallet * w)
+ : m_wallet(w)
+ {
+
+ }
+
+ virtual void moneySpent(const std::string &txId, uint64_t amount)
+ {
+ // TODO
+ Q_UNUSED(txId)
+ Q_UNUSED(amount)
+ qDebug() << __FUNCTION__;
+ }
+
+ virtual void moneyReceived(const std::string &txId, uint64_t amount)
+ {
+ // TODO
+ Q_UNUSED(txId)
+ Q_UNUSED(amount)
+ qDebug() << __FUNCTION__;
+ }
+
+ virtual void updated()
+ {
+ qDebug() << __FUNCTION__;
+ emit m_wallet->updated();
+ }
+
+ // called when wallet refreshed by background thread or explicitly
+ virtual void refreshed()
+ {
+ qDebug() << __FUNCTION__;
+ emit m_wallet->refreshed();
+ }
+
+private:
+ Wallet * m_wallet;
+};
+
+
+
+QString Wallet::getSeed() const
+{
+ return QString::fromStdString(m_walletImpl->seed());
+}
+
+QString Wallet::getSeedLanguage() const
+{
+ return QString::fromStdString(m_walletImpl->getSeedLanguage());
+}
+
+void Wallet::setSeedLanguage(const QString &lang)
+{
+ m_walletImpl->setSeedLanguage(lang.toStdString());
+}
+
+Wallet::Status Wallet::status() const
+{
+ return static_cast(m_walletImpl->status());
+}
+
+bool Wallet::connected() const
+{
+ return m_walletImpl->connected();
+}
+
+QString Wallet::errorString() const
+{
+ return QString::fromStdString(m_walletImpl->errorString());
+}
+
+bool Wallet::setPassword(const QString &password)
+{
+ return m_walletImpl->setPassword(password.toStdString());
+}
+
+QString Wallet::address() const
+{
+ return QString::fromStdString(m_walletImpl->address());
+}
+
+bool Wallet::store(const QString &path)
+{
+ return m_walletImpl->store(path.toStdString());
+}
+
+bool Wallet::init(const QString &daemonAddress, quint64 upperTransactionLimit)
+{
+ return m_walletImpl->init(daemonAddress.toStdString(), upperTransactionLimit);
+}
+
+void Wallet::initAsync(const QString &daemonAddress, quint64 upperTransactionLimit)
+{
+ m_walletImpl->initAsync(daemonAddress.toStdString(), upperTransactionLimit);
+}
+
+bool Wallet::connectToDaemon()
+{
+ return m_walletImpl->connectToDaemon();
+}
+
+void Wallet::setTrustedDaemon(bool arg)
+{
+ m_walletImpl->setTrustedDaemon(arg);
+}
+
+quint64 Wallet::balance() const
+{
+ return m_walletImpl->balance();
+}
+
+quint64 Wallet::unlockedBalance() const
+{
+ return m_walletImpl->unlockedBalance();
+}
+
+bool Wallet::refresh()
+{
+ bool result = m_walletImpl->refresh();
+ if (result)
+ emit updated();
+ return result;
+}
+
+void Wallet::refreshAsync()
+{
+ m_walletImpl->refreshAsync();
+}
+
+PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QString &payment_id,
+ quint64 amount, quint32 mixin_count,
+ PendingTransaction::Priority priority)
+{
+ Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
+ dst_addr.toStdString(), payment_id.toStdString(), amount, mixin_count,
+ static_cast(priority));
+ PendingTransaction * result = new PendingTransaction(ptImpl, this);
+ return result;
+}
+
+void Wallet::disposeTransaction(PendingTransaction *t)
+{
+ m_walletImpl->disposeTransaction(t->m_pimpl);
+ delete t;
+}
+
+TransactionHistory *Wallet::history()
+{
+ if (!m_history) {
+ Bitmonero::TransactionHistory * impl = m_walletImpl->history();
+ m_history = new TransactionHistory(impl, this);
+ }
+ return m_history;
+}
+
+
+QString Wallet::generatePaymentId() const
+{
+ return QString::fromStdString(Bitmonero::Wallet::genPaymentId());
+}
+
+QString Wallet::integratedAddress(const QString &paymentId) const
+{
+ return QString::fromStdString(m_walletImpl->integratedAddress(paymentId.toStdString()));
+}
+
+QString Wallet::paymentId() const
+{
+ return m_paymentId;
+}
+
+void Wallet::setPaymentId(const QString &paymentId)
+{
+ m_paymentId = paymentId;
+}
+
+
+Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent)
+ : QObject(parent), m_walletImpl(w), m_history(nullptr)
+{
+ m_walletImpl->setListener(new WalletListenerImpl(this));
+}
+
+Wallet::~Wallet()
+{
+ Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
+}
diff --git a/src/libwalletqt/Wallet.h b/src/libwalletqt/Wallet.h
new file mode 100644
index 00000000..feba75e0
--- /dev/null
+++ b/src/libwalletqt/Wallet.h
@@ -0,0 +1,138 @@
+#ifndef WALLET_H
+#define WALLET_H
+
+#include
+
+#include "wallet/wallet2_api.h" // we need to have an access to the Bitmonero::Wallet::Status enum here;
+#include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here;
+
+
+namespace Bitmonero {
+ class Wallet; // forward declaration
+}
+
+
+class TransactionHistory;
+
+class Wallet : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString seed READ getSeed)
+ Q_PROPERTY(QString seedLanguage READ getSeedLanguage)
+ Q_PROPERTY(Status status READ status)
+ Q_PROPERTY(bool connected READ connected)
+ Q_PROPERTY(QString errorString READ errorString)
+ Q_PROPERTY(QString address READ address)
+ Q_PROPERTY(quint64 balance READ balance)
+ Q_PROPERTY(quint64 unlockedBalance READ unlockedBalance)
+ Q_PROPERTY(TransactionHistory * history READ history)
+ Q_PROPERTY(QString paymentId READ paymentId WRITE setPaymentId)
+
+
+public:
+ enum Status {
+ Status_Ok = Bitmonero::Wallet::Status_Ok,
+ Status_Error = Bitmonero::Wallet::Status_Error
+ };
+
+ Q_ENUM(Status)
+
+ //! returns mnemonic seed
+ QString getSeed() const;
+
+ //! returns seed language
+ QString getSeedLanguage() const;
+
+ //! set seed language
+ Q_INVOKABLE void setSeedLanguage(const QString &lang);
+
+ //! returns last operation's status
+ Status status() const;
+
+ //! returns of wallet connected
+ bool connected() const;
+
+ //! returns last operation's error message
+ QString errorString() const;
+
+ //! changes the password using existing parameters (path, seed, seed lang)
+ Q_INVOKABLE bool setPassword(const QString &password);
+
+ //! returns wallet's public address
+ QString address() const;
+
+ //! saves wallet to the file by given path
+ Q_INVOKABLE bool store(const QString &path);
+
+ //! initializes wallet
+ Q_INVOKABLE bool init(const QString &daemonAddress, quint64 upperTransactionLimit);
+
+ //! initializes wallet asynchronously
+ Q_INVOKABLE void initAsync(const QString &daemonAddress, quint64 upperTransactionLimit);
+
+ //! connects to daemon
+ Q_INVOKABLE bool connectToDaemon();
+
+ //! indicates id daemon is trusted
+ Q_INVOKABLE void setTrustedDaemon(bool arg);
+
+ //! returns balance
+ quint64 balance() const;
+
+ //! returns unlocked balance
+ quint64 unlockedBalance() const;
+
+ //! refreshes the wallet
+ Q_INVOKABLE bool refresh();
+
+
+ //! refreshes the wallet asynchronously
+ Q_INVOKABLE void refreshAsync();
+
+ //! creates transaction
+ Q_INVOKABLE PendingTransaction * createTransaction(const QString &dst_addr, const QString &payment_id,
+ quint64 amount, quint32 mixin_count,
+ PendingTransaction::Priority priority);
+ //! deletes transaction and frees memory
+ Q_INVOKABLE void disposeTransaction(PendingTransaction * t);
+
+ //! returns transaction history
+ TransactionHistory * history();
+
+ //! generate payment id
+ Q_INVOKABLE QString generatePaymentId() const;
+
+ //! integrated address
+ Q_INVOKABLE QString integratedAddress(const QString &paymentId) const;
+
+
+ //! saved payment id
+ QString paymentId() const;
+
+ void setPaymentId(const QString &paymentId);
+
+ // TODO: setListenter() when it implemented in API
+signals:
+ void updated();
+
+ // emitted when refresh process finished (could take a long time)
+ // signalling only after we
+ void refreshed();
+
+
+private:
+ Wallet(Bitmonero::Wallet *w, QObject * parent = 0);
+ ~Wallet();
+
+private:
+ friend class WalletManager;
+ friend class WalletListenerImpl;
+ //! libwallet's
+ Bitmonero::Wallet * m_walletImpl;
+ // history lifetime managed by wallet;
+ TransactionHistory * m_history;
+ QString m_paymentId;
+
+};
+
+#endif // WALLET_H
diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp
new file mode 100644
index 00000000..a9f332a3
--- /dev/null
+++ b/src/libwalletqt/WalletManager.cpp
@@ -0,0 +1,158 @@
+#include "WalletManager.h"
+#include "Wallet.h"
+#include "wallet/wallet2_api.h"
+#include
+#include
+#include
+#include
+#include
+#include
+
+WalletManager * WalletManager::m_instance = nullptr;
+
+
+WalletManager *WalletManager::instance()
+{
+ if (!m_instance) {
+ m_instance = new WalletManager;
+ }
+
+ return m_instance;
+}
+
+Wallet *WalletManager::createWallet(const QString &path, const QString &password,
+ const QString &language, bool testnet)
+{
+ Bitmonero::Wallet * w = m_pimpl->createWallet(path.toStdString(), password.toStdString(),
+ language.toStdString(), testnet);
+ Wallet * wallet = new Wallet(w);
+ return wallet;
+}
+
+Wallet *WalletManager::openWallet(const QString &path, const QString &password, bool testnet)
+{
+ qDebug("%s: opening wallet at %s, testnet = %d ",
+ __PRETTY_FUNCTION__, qPrintable(path), testnet);
+
+ Bitmonero::Wallet * w = m_pimpl->openWallet(path.toStdString(), password.toStdString(), testnet);
+ qDebug("%s: opened wallet: %s, status: %d", __PRETTY_FUNCTION__, w->address().c_str(), w->status());
+ Wallet * wallet = new Wallet(w);
+
+ // move wallet to the GUI thread. Otherwise it wont be emitting signals
+ if (wallet->thread() != qApp->thread()) {
+ wallet->moveToThread(qApp->thread());
+ }
+
+ return wallet;
+}
+
+void WalletManager::openWalletAsync(const QString &path, const QString &password, bool testnet)
+{
+ QFuture future = QtConcurrent::run(this, &WalletManager::openWallet,
+ path, password, testnet);
+ QFutureWatcher * watcher = new QFutureWatcher();
+ watcher->setFuture(future);
+ connect(watcher, &QFutureWatcher::finished,
+ this, [this, watcher]() {
+ QFuture future = watcher->future();
+ watcher->deleteLater();
+ emit walletOpened(future.result());
+ });
+}
+
+
+Wallet *WalletManager::recoveryWallet(const QString &path, const QString &memo, bool testnet)
+{
+ Bitmonero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), memo.toStdString(), testnet);
+ Wallet * wallet = new Wallet(w);
+ return wallet;
+}
+
+
+QString WalletManager::closeWallet(Wallet *wallet)
+{
+ QString result = wallet->address();
+ delete wallet;
+ return result;
+}
+
+void WalletManager::closeWalletAsync(Wallet *wallet)
+{
+ QFuture future = QtConcurrent::run(this, &WalletManager::closeWallet,
+ wallet);
+ QFutureWatcher * watcher = new QFutureWatcher();
+ watcher->setFuture(future);
+
+ connect(watcher, &QFutureWatcher::finished,
+ this, [this, watcher]() {
+ QFuture future = watcher->future();
+ watcher->deleteLater();
+ emit walletClosed(future.result());
+ });
+}
+
+bool WalletManager::walletExists(const QString &path) const
+{
+ return m_pimpl->walletExists(path.toStdString());
+}
+
+QStringList WalletManager::findWallets(const QString &path)
+{
+ std::vector found_wallets = m_pimpl->findWallets(path.toStdString());
+ QStringList result;
+ for (const auto &w : found_wallets) {
+ result.append(QString::fromStdString(w));
+ }
+ return result;
+}
+
+QString WalletManager::errorString() const
+{
+ return tr("Unknown error");
+}
+
+bool WalletManager::moveWallet(const QString &src, const QString &dst)
+{
+ return true;
+}
+
+
+QString WalletManager::walletLanguage(const QString &locale)
+{
+ return "English";
+}
+
+quint64 WalletManager::maximumAllowedAmount() const
+{
+ return Bitmonero::Wallet::maximumAllowedAmount();
+}
+
+QString WalletManager::maximumAllowedAmountAsSting() const
+{
+ return WalletManager::displayAmount(WalletManager::maximumAllowedAmount());
+}
+
+QString WalletManager::displayAmount(quint64 amount) const
+{
+ return QString::fromStdString(Bitmonero::Wallet::displayAmount(amount));
+}
+
+quint64 WalletManager::amountFromString(const QString &amount) const
+{
+ return Bitmonero::Wallet::amountFromString(amount.toStdString());
+}
+
+quint64 WalletManager::amountFromDouble(double amount) const
+{
+ return Bitmonero::Wallet::amountFromDouble(amount);
+}
+
+void WalletManager::setLogLevel(int logLevel)
+{
+ Bitmonero::WalletManagerFactory::setLogLevel(logLevel);
+}
+
+WalletManager::WalletManager(QObject *parent) : QObject(parent)
+{
+ m_pimpl = Bitmonero::WalletManagerFactory::getWalletManager();
+}
diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h
new file mode 100644
index 00000000..3629242a
--- /dev/null
+++ b/src/libwalletqt/WalletManager.h
@@ -0,0 +1,107 @@
+#ifndef WALLETMANAGER_H
+#define WALLETMANAGER_H
+
+#include
+#include
+
+class Wallet;
+namespace Bitmonero {
+ class WalletManager;
+}
+
+class WalletManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum LogLevel {
+ LogLevel_Silent = Bitmonero::WalletManagerFactory::LogLevel_Silent,
+ LogLevel_0 = Bitmonero::WalletManagerFactory::LogLevel_0,
+ LogLevel_1 = Bitmonero::WalletManagerFactory::LogLevel_1,
+ LogLevel_2 = Bitmonero::WalletManagerFactory::LogLevel_2,
+ LogLevel_3 = Bitmonero::WalletManagerFactory::LogLevel_3,
+ LogLevel_4 = Bitmonero::WalletManagerFactory::LogLevel_4,
+ LogLevel_Min = Bitmonero::WalletManagerFactory::LogLevel_Min,
+ LogLevel_Max = Bitmonero::WalletManagerFactory::LogLevel_Max,
+ };
+
+ static WalletManager * instance();
+ // wizard: createWallet path;
+ Q_INVOKABLE Wallet * createWallet(const QString &path, const QString &password,
+ const QString &language, bool testnet = false);
+
+ /*!
+ * \brief openWallet - opens wallet by given path
+ * \param path - wallet filename
+ * \param password - wallet password. Empty string in wallet isn't password protected
+ * \param testnet - determines if we running testnet
+ * \return wallet object pointer
+ */
+ Q_INVOKABLE Wallet * openWallet(const QString &path, const QString &password, bool testnet = false);
+
+ /*!
+ * \brief openWalletAsync - asynchronous version of "openWallet". Returns immediately. "walletOpened" signal
+ * emitted when wallet opened;
+ */
+ Q_INVOKABLE void openWalletAsync(const QString &path, const QString &password, bool testnet = false);
+
+ // wizard: recoveryWallet path; hint: internally it recorvers wallet and set password = ""
+ Q_INVOKABLE Wallet * recoveryWallet(const QString &path, const QString &memo,
+ bool testnet = false);
+
+ /*!
+ * \brief closeWallet - closes wallet and frees memory
+ * \param wallet
+ * \return wallet address
+ */
+ Q_INVOKABLE QString closeWallet(Wallet * wallet);
+
+ /*!
+ * \brief closeWalletAsync - asynchronous version of "closeWallet"
+ * \param wallet - wallet pointer;
+ */
+ Q_INVOKABLE void closeWalletAsync(Wallet * wallet);
+
+ //! checks is given filename is a wallet;
+ Q_INVOKABLE bool walletExists(const QString &path) const;
+
+ //! returns list with wallet's filenames, if found by given path
+ Q_INVOKABLE QStringList findWallets(const QString &path);
+
+ //! returns error description in human language
+ Q_INVOKABLE QString errorString() const;
+
+
+ // wizard: both "create" and "recovery" paths.
+ // TODO: probably move it to "Wallet" interface
+ Q_INVOKABLE bool moveWallet(const QString &src, const QString &dst);
+ //! returns libwallet language name for given locale
+ Q_INVOKABLE QString walletLanguage(const QString &locale);
+
+
+ //! since we can't call static method from QML, move it to this class
+ Q_INVOKABLE QString displayAmount(quint64 amount) const;
+ Q_INVOKABLE quint64 amountFromString(const QString &amount) const;
+ Q_INVOKABLE quint64 amountFromDouble(double amount) const;
+ Q_INVOKABLE quint64 maximumAllowedAmount() const;
+
+ // QML JS engine doesn't support unsigned integers
+ Q_INVOKABLE QString maximumAllowedAmountAsSting() const;
+
+ void setLogLevel(int logLevel);
+
+signals:
+
+ void walletOpened(Wallet * wallet);
+ void walletClosed(const QString &walletAddress);
+
+public slots:
+private:
+
+ explicit WalletManager(QObject *parent = 0);
+ static WalletManager * m_instance;
+ Bitmonero::WalletManager * m_pimpl;
+
+};
+
+#endif // WALLETMANAGER_H
diff --git a/tabs/TweetsModel.qml b/tabs/TweetsModel.qml
index 0e9fe004..55a7c74d 100644
--- a/tabs/TweetsModel.qml
+++ b/tabs/TweetsModel.qml
@@ -56,14 +56,12 @@ Item {
function reload() {
tweets.clear()
-
if (from == "" && phrase == "")
return;
-
-//! [requesting]
+ //! [requesting]
var req = new XMLHttpRequest;
req.open("GET", "https://api.twitter.com/1.1/search/tweets.json?from=" + from +
- "&count=" + tweetsMaxCount + "&q=" + encodePhrase(phrase));
+ "&count=" + tweetsMaxCount + "&q=" + encodePhrase(phrase));
req.setRequestHeader("Authorization", "Bearer " + bearerToken);
req.onreadystatechange = function() {
status = req.readyState;
@@ -83,17 +81,16 @@ Item {
wasLoading = (status === XMLHttpRequest.LOADING);
}
req.send();
-//! [requesting]
+ //! [requesting]
}
-
Component.onCompleted: {
if (consumerKey === "" || consumerSecret == "") {
console.log("setting demo token")
bearerToken = encodeURIComponent(Helper.demoToken())
tweetsModel.phrase = ""
tweetsModel.from = "@monerocurrency"
- reload()
+ // reload()
return;
}
diff --git a/tabs/Twitter.qml b/tabs/Twitter.qml
index 553e7da6..bd597287 100644
--- a/tabs/Twitter.qml
+++ b/tabs/Twitter.qml
@@ -34,6 +34,8 @@ import "../components"
Item {
id: tab
+
+
ListModel {
id: testModel
ListElement { head: "Monero || #xmr"; foot: "@btcplanet Duis turpis arcu, varius nec rutrum in, adipiscing at enim. Donec quis consequat ipsum," }
@@ -56,10 +58,16 @@ Item {
property var idx
property var ids
+ function updateTweets() {
+ tweetsModel.reload()
+ }
+
+
Component.onCompleted: {
ids = new Array()
}
+
function idInModel(id) {
for (var j = 0; j < ids.length; j++)
if (ids[j] === id)
diff --git a/translations/monero-core_de.ts b/translations/monero-core_de.ts
new file mode 100644
index 00000000..a5d31baa
--- /dev/null
+++ b/translations/monero-core_de.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+
+
+
+
+ Please choose a language and regional format.
+
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/translations/monero-core_en.ts b/translations/monero-core_en.ts
new file mode 100644
index 00000000..88083bef
--- /dev/null
+++ b/translations/monero-core_en.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+
+
+
+
+ Please choose a language and regional format.
+
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/translations/monero-core_it.ts b/translations/monero-core_it.ts
new file mode 100644
index 00000000..b9692f7c
--- /dev/null
+++ b/translations/monero-core_it.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+
+
+
+
+ Please choose a language and regional format.
+
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/translations/monero-core_pl.ts b/translations/monero-core_pl.ts
new file mode 100644
index 00000000..c7c6c0cd
--- /dev/null
+++ b/translations/monero-core_pl.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+
+
+
+
+ Please choose a language and regional format.
+
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/translations/monero-core_ru.ts b/translations/monero-core_ru.ts
new file mode 100644
index 00000000..acce20ed
--- /dev/null
+++ b/translations/monero-core_ru.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+ Новая запись
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+ Баланс
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+ Баланс
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+ Баланс
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+ Добро пожаловать
+
+
+
+ Please choose a language and regional format.
+ Пожалуйста выберите язык и региональный формат.
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/translations/monero-core_zh.ts b/translations/monero-core_zh.ts
new file mode 100644
index 00000000..9d0645ae
--- /dev/null
+++ b/translations/monero-core_zh.ts
@@ -0,0 +1,839 @@
+
+
+
+
+ AddressBook
+
+
+ Add new entry
+
+
+
+
+
+ Address
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ ADD
+
+
+
+
+ Payment ID
+
+
+
+
+ Description
+
+
+
+
+ AddressBookTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ BasicPanel
+
+
+ Locked Balance:
+
+
+
+
+ 78.9239845
+
+
+
+
+ Available Balance:
+
+
+
+
+ 2324.9239845
+
+
+
+
+ amount...
+
+
+
+
+ SEND
+
+
+
+
+ destination...
+
+
+
+
+ Privacy level
+
+
+
+
+ payment ID (optional)...
+
+
+
+
+ Dashboard
+
+
+ Quick transfer
+
+
+
+
+ SEND
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> lookng for security level and address book? go to <a href='#'>Transfer</a> tab
+
+
+
+
+ DashboardTable
+
+
+ No more results
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ History
+
+
+ Filter trasactions history
+
+
+
+
+ Address
+
+
+
+
+
+
+
+
+
+ <b>Tip tekst test</b>
+
+
+
+
+ Payment ID <font size='2'>(Optional)</font>
+
+
+
+
+ <b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer
+
+
+
+
+ Description <font size='2'>(Local database)</font>
+
+
+
+
+ <b>Tip tekst test</b><br/><br/>test line 2
+
+
+
+
+ Date from
+
+
+
+
+
+ To
+
+
+
+
+ FILTER
+
+
+
+
+ Advance filtering
+
+
+
+
+ Type of transation
+
+
+
+
+ Amount from
+
+
+
+
+ HistoryTable
+
+
+ No more results
+
+
+
+
+ Payment ID:
+
+
+
+
+ Date
+
+
+
+
+ Balance
+
+
+
+
+ Amount
+
+
+
+
+ LeftPanel
+
+
+ Balance
+
+
+
+
+ Test tip 1<br/><br/>line 2
+
+
+
+
+ Unlocked balance
+
+
+
+
+ Test tip 2<br/><br/>line 2
+
+
+
+
+ Transfer
+
+
+
+
+ T
+
+
+
+
+ Receive
+
+
+
+
+ R
+
+
+
+
+ NetworkStatusItem
+
+
+ Network status
+
+
+
+
+ Connected
+
+
+
+
+ Disconnected
+
+
+
+
+ PrivacyLevelSmall
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Receive
+
+
+ Address
+
+
+
+
+ ReadOnly wallet address displayed here
+
+
+
+
+ Integrated address
+
+
+
+
+ ReadOnly wallet integrated address displayed here
+
+
+
+
+ Payment ID
+
+
+
+
+ PaymentID here
+
+
+
+
+ Generate
+
+
+
+
+ RightPanel
+
+
+ Twitter
+
+
+
+
+ News
+
+
+
+
+ Help
+
+
+
+
+ About
+
+
+
+
+ SearchInput
+
+
+ Search by...
+
+
+
+
+ SEARCH
+
+
+
+
+ TickDelegate
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ TitleBar
+
+
+ Monero - Donations
+
+
+
+
+ Transfer
+
+
+ Amount
+
+
+
+
+ Transaction priority
+
+
+
+
+ Amount...
+
+
+
+
+ LOW
+
+
+
+
+ MEDIUM
+
+
+
+
+ HIGH
+
+
+
+
+ Privacy Level
+
+
+
+
+ Cost
+
+
+
+
+ <style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style> Address <font size='2'> ( Type in or select from </font> <a href='#'>Address</a><font size='2'> book )</font>
+
+
+
+
+ Payment ID <font size='2'>( Optional )</font>
+
+
+
+
+ Description <font size='2'>( An optional description that will be saved to the local address book if entered )</font>
+
+
+
+
+ SEND
+
+
+
+
+ WizardConfigure
+
+
+ We’re almost there - let’s just configure some Monero preferences
+
+
+
+
+ Kickstart the Monero blockchain?
+
+
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ Enable disk conservation mode?
+
+
+
+
+ Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as a regular Monero instance. However, storing the full blockchain is beneficial to the security of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardCreateWallet
+
+
+ A new wallet has been created for you
+
+
+
+
+ This is the 25 word mnemonic for your wallet
+
+
+
+
+ WizardDonation
+
+
+ Monero development is solely supported by donations
+
+
+
+
+ Enable auto-donations of?
+
+
+
+
+ % of my fee added to each transaction
+
+
+
+
+ For every transaction, a small transaction fee is charged. This option lets you add an additional amount, as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.
+
+
+
+
+ Allow background mining?
+
+
+
+
+ Mining secures the Monero network, and also pays a small reward for the work done. This option will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.
+
+
+
+
+ WizardFinish
+
+
+ <b>Language:</b>
+
+
+
+
+ <b>Account name:</b>
+
+
+
+
+ <b>Words:</b>
+
+
+
+
+ <b>Wallet Path: </b>
+
+
+
+
+ <b>Enable auto donation: </b>
+
+
+
+
+ <b>Auto donation amount: </b>
+
+
+
+
+ <b>Allow background mining: </b>
+
+
+
+
+ An overview of your Monero configuration is below:
+
+
+
+
+ You’re all setup!
+
+
+
+
+ WizardMain
+
+
+ USE MONERO
+
+
+
+
+ WizardManageWalletUI
+
+
+ This is the name of your wallet. You can change it to a different name if you’d like:
+
+
+
+
+ My account name
+
+
+
+
+ Your wallet is stored in
+
+
+
+
+ Please choose a directory
+
+
+
+
+ WizardMemoTextInput
+
+
+ It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.
+
+
+
+
+ WizardOptions
+
+
+ Welcome to Monero!
+
+
+
+
+ Please select one of the following options:
+
+
+
+
+ This is my first time, I want to<br/>create a new account
+
+
+
+
+ I want to recover my account<br/>from my 24 work seed
+
+
+
+
+ WizardPassword
+
+
+ Now that your wallet has been created, please set a password for the wallet
+
+
+
+
+ Now that your wallet has been restored, please set a password for the wallet
+
+
+
+
+ Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given<br/><br/>
+ Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.
+
+
+
+
+ WizardRecoveryWallet
+
+
+ My account name
+
+
+
+
+ We're ready to recover your account
+
+
+
+
+ Please enter your 25 word private key
+
+
+
+
+ WizardWelcome
+
+
+ Welcome
+
+
+
+
+ Please choose a language and regional format.
+
+
+
+
+ main
+
+
+
+
+ Error
+
+
+
+
+ Couldn't open wallet:
+
+
+
+
+ Can't create transaction:
+
+
+
+
+ Confirmation
+
+
+
+
+ Please confirm transaction:
+
+
+
+
+
+
+
+Address:
+
+
+
+
+
+Payment ID:
+
+
+
+
+
+Amount:
+
+
+
+
+
+Fee:
+
+
+
+
+ Couldn't send the money:
+
+
+
+
+ Information
+
+
+
+
+ Money sent successfully
+
+
+
+
+ Initializing Wallet...
+
+
+
+
+ Program setup wizard
+
+
+
+
+ Monero - Donations
+
+
+
+
+ send to the same destination
+
+
+
+
diff --git a/windeploy_helper.sh b/windeploy_helper.sh
new file mode 100644
index 00000000..7649db64
--- /dev/null
+++ b/windeploy_helper.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+TARGET=$1
+
+FILES="zlib1.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libjasper-1.dll libintl-8.dll libicuuc57.dll libicuin57.dll libicudt57.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libgcc_s_seh-1.dll libfreetype-6.dll libbz2-1.dll"
+
+for f in $FILES; do cp $MSYSTEM_PREFIX/bin/$f $TARGET; done
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wizard/WizardConfigure.qml b/wizard/WizardConfigure.qml
index acfae0bd..343f9c88 100644
--- a/wizard/WizardConfigure.qml
+++ b/wizard/WizardConfigure.qml
@@ -76,7 +76,7 @@ Item {
wrapMode: Text.Wrap
//renderType: Text.NativeRendering
color: "#3F3F3F"
- text: qsTr("We’re almost there - let’s just configure some Monero preferences")
+ text: qsTr("We’re almost there - let’s just configure some Monero preferences") + translationManager.emptyString
}
Column {
@@ -94,7 +94,7 @@ Item {
spacing: 12
CheckBox {
- text: qsTr("Kickstart the Monero blockchain?")
+ text: qsTr("Kickstart the Monero blockchain?") + translationManager.emptyString
anchors.left: parent.left
anchors.right: parent.right
background: "#F0EEEE"
@@ -114,6 +114,7 @@ Item {
wrapMode: Text.Wrap
text: qsTr("It is very important to write it down as this is the only backup you will need for your wallet. " +
"You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.")
+ + translationManager.emptyString
}
}
@@ -123,7 +124,7 @@ Item {
spacing: 12
CheckBox {
- text: qsTr("Enable disk conservation mode?")
+ text: qsTr("Enable disk conservation mode?") + translationManager.emptyString
anchors.left: parent.left
anchors.right: parent.right
background: "#F0EEEE"
@@ -144,6 +145,7 @@ Item {
text: qsTr("Disk conservation mode uses substantially less disk-space, but the same amount of bandwidth as " +
"a regular Monero instance. However, storing the full blockchain is beneficial to the security " +
"of the Monero network. If you are on a device with limited disk space, then this option is appropriate for you.")
+ + translationManager.emptyString
}
}
@@ -153,7 +155,7 @@ Item {
spacing: 12
CheckBox {
- text: qsTr("Allow background mining?")
+ text: qsTr("Allow background mining?") + translationManager.emptyString
anchors.left: parent.left
anchors.right: parent.right
background: "#F0EEEE"
@@ -173,6 +175,7 @@ Item {
wrapMode: Text.Wrap
text: qsTr("Mining secures the Monero network, and also pays a small reward for the work done. This option " +
"will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.")
+ + translationManager.emptyString
}
}
}
diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml
index 15e5899d..43b8158f 100644
--- a/wizard/WizardCreateWallet.qml
+++ b/wizard/WizardCreateWallet.qml
@@ -29,252 +29,69 @@
import QtQuick 2.2
import moneroComponents 1.0
import QtQuick.Dialogs 1.2
+import 'utils.js' as Utils
Item {
opacity: 0
visible: false
+
Behavior on opacity {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
onOpacityChanged: visible = opacity !== 0
- function saveSettings(settingsObject) {
- settingsObject['account_name'] = accountName.text
- settingsObject['words'] = wordsText.text
- settingsObject['wallet_path'] = fileUrlInput.text
+ //! function called each time we display this page
+
+ function onPageOpened(settingsOblect) {
+ checkNextButton()
}
- Row {
- id: dotsRow
- anchors.top: parent.top
- anchors.right: parent.right
- anchors.topMargin: 85
- spacing: 6
-
- ListModel {
- id: dotsModel
- ListElement { dotColor: "#FFE00A" }
- ListElement { dotColor: "#DBDBDB" }
- ListElement { dotColor: "#DBDBDB" }
- ListElement { dotColor: "#DBDBDB" }
- }
-
- Repeater {
- model: dotsModel
- delegate: Rectangle {
- width: 12; height: 12
- radius: 6
- color: dotColor
- }
- }
+ function onPageClosed(settingsObject) {
+ settingsObject['account_name'] = uiItem.accountNameText
+ settingsObject['words'] = uiItem.wordsTexttext
+ settingsObject['wallet_path'] = uiItem.walletPath
+ return true;
}
- Column {
- id: headerColumn
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 16
- anchors.rightMargin: 16
- anchors.top: parent.top
- anchors.topMargin: 74
- spacing: 24
-
- Text {
- anchors.left: parent.left
- width: headerColumn.width - dotsRow.width - 16
- font.family: "Arial"
- font.pixelSize: 28
- wrapMode: Text.Wrap
- //renderType: Text.NativeRendering
- color: "#3F3F3F"
- text: qsTr("A new wallet has been created for you")
- }
-
- Text {
- anchors.left: parent.left
- anchors.right: parent.right
- font.family: "Arial"
- font.pixelSize: 18
- wrapMode: Text.Wrap
- //renderType: Text.NativeRendering
- color: "#4A4646"
- text: qsTr("This is the name of your wallet. You can change it to a different name if you’d like:")
- }
+ function checkNextButton() {
+ var wordsArray = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText).split(" ");
+ wizard.nextButton.enabled = wordsArray.length === 25;
}
- Item {
- id: walletNameItem
- anchors.top: headerColumn.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: 24
- width: 300
- height: 62
+ //! function called each time we hide this page
+ //
- TextInput {
- id: accountName
- anchors.fill: parent
- horizontalAlignment: TextInput.AlignHCenter
- verticalAlignment: TextInput.AlignVCenter
- font.family: "Arial"
- font.pixelSize: 32
- renderType: Text.NativeRendering
- color: "#FF6C3C"
- text: qsTr("My account name")
- focus: true
- }
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: 1
- color: "#DBDBDB"
+ function createWallet(settingsObject) {
+ // TODO: create wallet in temporary filename and a) move it to the path specified by user after the final
+ // page submitted or b) delete it when program closed before reaching final page
+
+ var wallet_filename = oshelper.temporaryFilename();
+ if (typeof settingsObject.wallet === 'undefined') {
+ //var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.language)
+ var testnet = appWindow.persistentSettings.testnet;
+ var wallet = walletManager.createWallet(wallet_filename, "", settingsObject.wallet_language,
+ testnet)
+ uiItem.wordsTextItem.memoText = wallet.seed
+ // saving wallet in "global" settings object
+ // TODO: wallet should have a property pointing to the file where it stored or loaded from
+ settingsObject.wallet = wallet
+ } else {
+ print("wallet already created. we just stepping back");
}
+ settingsObject.wallet_filename = wallet_filename
}
- Text {
- id: frameHeader
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 16
- anchors.rightMargin: 16
- anchors.top: walletNameItem.bottom
- anchors.topMargin: 24
- font.family: "Arial"
- font.pixelSize: 18
- //renderType: Text.NativeRendering
- color: "#4A4646"
- elide: Text.ElideRight
- text: qsTr("This is the 24 word mnemonic for your wallet")
- }
- Rectangle {
- id: wordsRect
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: frameHeader.bottom
- anchors.topMargin: 16
- height: 182
- border.width: 1
- border.color: "#DBDBDB"
- TextEdit {
- id: wordsText
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.bottom: tipRect.top
- anchors.margins: 16
- font.family: "Arial"
- font.pixelSize: 24
- wrapMode: Text.Wrap
- selectByMouse: true
- readOnly: true
- color: "#3F3F3F"
- text: "bound class paint gasp task soul forgot past pleasure physical circle appear shore bathroom glove women crap busy beauty bliss idea give needle burden"
- }
- Image {
- anchors.right: parent.right
- anchors.bottom: tipRect.top
- source: "qrc:///images/greyTriangle.png"
-
- Image {
- anchors.centerIn: parent
- source: "qrc:///images/copyToClipboard.png"
- }
-
- Clipboard { id: clipboard }
- MouseArea {
- anchors.fill: parent
- cursorShape: Qt.PointingHandCursor
- onClicked: clipboard.setText(wordsText.text)
- }
- }
-
- Rectangle {
- id: tipRect
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: 65
- color: "#DBDBDB"
-
- Text {
- anchors.fill: parent
- anchors.margins: 16
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- font.family: "Arial"
- font.pixelSize: 15
- color: "#4A4646"
- wrapMode: Text.Wrap
- text: qsTr("It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.")
- }
- }
- }
-
- Row {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: wordsRect.bottom
- anchors.topMargin: 24
- spacing: 16
-
- Text {
- anchors.verticalCenter: parent.verticalCenter
- font.family: "Arial"
- font.pixelSize: 18
- //renderType: Text.NativeRendering
- color: "#4A4646"
- text: qsTr("Your wallet is stored in")
- }
-
- Item {
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width - x
- height: 34
-
- FileDialog {
- id: fileDialog
- selectMultiple: false
- title: "Please choose a file"
- onAccepted: {
- fileUrlInput.text = fileDialog.fileUrl
- fileDialog.visible = false
- }
- onRejected: {
- fileDialog.visible = false
- }
- }
-
- TextInput {
- id: fileUrlInput
- anchors.fill: parent
- anchors.leftMargin: 5
- anchors.rightMargin: 5
- clip: true
- font.family: "Arial"
- font.pixelSize: 18
- color: "#6B0072"
- verticalAlignment: Text.AlignVCenter
- selectByMouse: true
- text: "~/.monero/mywallet/"
- onFocusChanged: {
- if(focus) {
- fileDialog.visible = true
- }
- }
- }
-
- Rectangle {
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- height: 1
- color: "#DBDBDB"
- }
- }
+ WizardManageWalletUI {
+ id: uiItem
+ titleText: qsTr("A new wallet has been created for you") + translationManager.emptyString
+ wordsTextTitle: qsTr("This is the 25 word mnemonic for your wallet") + translationManager.emptyString
+ wordsTextItem.clipboardButtonVisible: true
+ wordsTextItem.tipTextVisible: true
+ wordsTextItem.memoTextReadOnly: true
}
}
diff --git a/wizard/WizardDonation.qml b/wizard/WizardDonation.qml
index d42c266e..57e03524 100644
--- a/wizard/WizardDonation.qml
+++ b/wizard/WizardDonation.qml
@@ -38,10 +38,18 @@ Item {
onOpacityChanged: visible = opacity !== 0
- function saveSettings(settingsObject) {
+ function onPageOpened(settingsObject) {
+ enableAutoDonationCheckBox.checked = settingsObject.auto_donations_enabled
+ autoDonationAmountText.text = settingsObject.auto_donations_amount
+ allowBackgroundMiningCheckBox.checked = settingsObject.allow_background_mining
+
+ }
+
+ function onPageClosed(settingsObject) {
settingsObject['auto_donations_enabled'] = enableAutoDonationCheckBox.checked;
- settingsObject['auto_donations_amount'] = autoDonationAmountText.text;
+ settingsObject['auto_donations_amount'] = parseInt(autoDonationAmountText.text);
settingsObject['allow_background_mining'] = allowBackgroundMiningCheckBox.checked;
+ return true;
}
Row {
@@ -82,7 +90,7 @@ Item {
wrapMode: Text.Wrap
//renderType: Text.NativeRendering
color: "#3F3F3F"
- text: qsTr("Monero development is solely supported by donations")
+ text: qsTr("Monero development is solely supported by donations") + translationManager.emptyString
}
Column {
@@ -102,7 +110,7 @@ Item {
CheckBox {
id: enableAutoDonationCheckBox
anchors.verticalCenter: parent.verticalCenter
- text: qsTr("Enable auto-donations of?")
+ text: qsTr("Enable auto-donations of?") + translationManager.emptyString
background: "#F0EEEE"
fontColor: "#4A4646"
fontSize: 18
@@ -142,7 +150,7 @@ Item {
font.family: "Arial"
font.pixelSize: 18
color: "#4A4646"
- text: qsTr("% of my fee added to each transaction")
+ text: qsTr("% of my fee added to each transaction") + translationManager.emptyString
}
}
@@ -156,6 +164,7 @@ Item {
text: qsTr("For every transaction, a small transaction fee is charged. This option lets you add an additional amount, " +
"as a percentage of that fee, to your transaction to support Monero development. For instance, a 50% " +
"autodonation take a transaction fee of 0.005 XMR and add a 0.0025 XMR to support Monero development.")
+ + translationManager.emptyString
}
Column {
anchors.left: parent.left
@@ -164,7 +173,7 @@ Item {
CheckBox {
id: allowBackgroundMiningCheckBox
- text: qsTr("Allow background mining?")
+ text: qsTr("Allow background mining?") + translationManager.emptyString
anchors.left: parent.left
anchors.right: parent.right
background: "#F0EEEE"
@@ -184,6 +193,7 @@ Item {
wrapMode: Text.Wrap
text: qsTr("Mining secures the Monero network, and also pays a small reward for the work done. This option " +
"will let Monero mine when your computer is on mains power and is idle. It will stop mining when you continue working.")
+ + translationManager.emptyString
}
}
}
diff --git a/wizard/WizardFinish.qml b/wizard/WizardFinish.qml
index 7902c0b2..431b5a89 100644
--- a/wizard/WizardFinish.qml
+++ b/wizard/WizardFinish.qml
@@ -40,19 +40,26 @@ Item {
function buildSettingsString() {
var str = " " + qsTr("Language: ") + wizard.settings['language'] + " "
+ qsTr("Account name: ") + wizard.settings['account_name'] + " "
- + qsTr("Words: ") + wizard.settings['words'] + " "
+ + qsTr("Words: ") + wizard.settings['wallet'].seed + " "
+ qsTr("Wallet Path: ") + wizard.settings['wallet_path'] + " "
+ qsTr("Enable auto donation: ") + wizard.settings['auto_donations_enabled'] + " "
+ qsTr("Auto donation amount: ") + wizard.settings['auto_donations_amount'] + " "
+ qsTr("Allow background mining: ") + wizard.settings['allow_background_mining'] + " "
+ + translationManager.emptyString
return str;
}
function updateSettingsSummary() {
- settingsText.text = qsTr("An overview of your Monero configuration is below:")
+ settingsText.text = qsTr("An overview of your Monero configuration is below:") + translationManager.emptyString
+ " "
+ buildSettingsString();
}
+ function onPageOpened(settings) {
+ updateSettingsSummary();
+ wizard.nextButton.visible = false;
+ }
+
+
Row {
id: dotsRow
anchors.top: parent.top
@@ -94,9 +101,10 @@ Item {
font.family: "Arial"
font.pixelSize: 28
wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
//renderType: Text.NativeRendering
color: "#3F3F3F"
- text: qsTr("You’re all setup!")
+ text: qsTr("You’re all setup!") + translationManager.emptyString
}
Text {
@@ -107,6 +115,7 @@ Item {
font.pixelSize: 18
wrapMode: Text.Wrap
textFormat: Text.RichText
+ horizontalAlignment: Text.AlignHCenter
//renderType: Text.NativeRendering
color: "#4A4646"
}
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
index 6cb26356..488bd959 100644
--- a/wizard/WizardMain.qml
+++ b/wizard/WizardMain.qml
@@ -27,6 +27,8 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.2
+import Qt.labs.settings 1.0
+
import "../components"
Rectangle {
@@ -34,7 +36,13 @@ Rectangle {
property alias nextButton : nextButton
property var settings : ({})
property int currentPage: 0
- property var pages: [welcomePage, optionsPage, createWalletPage, passwordPage, /*configurePage,*/ donationPage, finishPage ]
+
+ property var paths: {
+ "create_wallet" : [welcomePage, optionsPage, createWalletPage, passwordPage, donationPage, finishPage ],
+ "recovery_wallet" : [welcomePage, optionsPage, recoveryWalletPage, passwordPage, donationPage, finishPage ]
+ }
+ property string currentPath: "create_wallet"
+ property var pages: paths[currentPath]
signal useMoneroClicked()
border.color: "#DBDBDB"
@@ -42,34 +50,100 @@ Rectangle {
color: "#FFFFFF"
function switchPage(next) {
-
// save settings for current page;
- if (typeof pages[currentPage].saveSettings !== 'undefined') {
- pages[currentPage].saveSettings(settings);
+ if (next && typeof pages[currentPage].onPageClosed !== 'undefined') {
+ if (pages[currentPage].onPageClosed(settings) !== true) {
+ print ("Can't go to the next page");
+ return;
+ };
+
+ }
+ print ("switchpage: currentPage: ", currentPage);
+
+ if (currentPage > 0 || currentPage < pages.length - 1) {
+ pages[currentPage].opacity = 0
+ var step_value = next ? 1 : -1
+ currentPage += step_value
+ pages[currentPage].opacity = 1;
+
+ var nextButtonVisible = pages[currentPage] !== optionsPage;
+ nextButton.visible = nextButtonVisible;
+
+ if (next && typeof pages[currentPage].onPageOpened !== 'undefined') {
+ pages[currentPage].onPageOpened(settings)
+ }
+
+
+
+ }
+ }
+
+
+
+ function openCreateWalletPage() {
+ print ("show create wallet page");
+ pages[currentPage].opacity = 0;
+ createWalletPage.opacity = 1
+ currentPath = "create_wallet"
+ pages = paths[currentPath]
+ currentPage = pages.indexOf(createWalletPage)
+ createWalletPage.createWallet(settings)
+ wizard.nextButton.visible = true
+ createWalletPage.onPageOpened(settings);
+
+
+ }
+
+ function openRecoveryWalletPage() {
+ print ("show recovery wallet page");
+ pages[currentPage].opacity = 0
+ recoveryWalletPage.opacity = 1
+ currentPath = "recovery_wallet"
+ pages = paths[currentPath]
+ currentPage = pages.indexOf(recoveryWalletPage)
+ wizard.nextButton.visible = true
+ recoveryWalletPage.onPageOpened(settings);
+
+ }
+
+ //! actually writes the wallet
+ function applySettings() {
+ console.log("Here we apply the settings");
+ // here we need to actually move wallet to the new location
+
+ var new_wallet_filename = settings.wallet_path + "/"
+ + settings.account_name + "/"
+ + settings.account_name;
+
+ // moving wallet files to the new destination, if user changed it
+ if (new_wallet_filename !== settings.wallet_filename) {
+ // using previously saved wallet;
+ settings.wallet.store(new_wallet_filename);
}
- if(next === false) {
- if(currentPage > 0) {
- pages[currentPage].opacity = 0
- pages[--currentPage].opacity = 1
- }
- } else {
- if(currentPage < pages.length - 1) {
- pages[currentPage].opacity = 0
- pages[++currentPage].opacity = 1
- }
- }
+ // protecting wallet with password
+ console.log("Protecting wallet with password: " + settings.wallet_password)
+ settings.wallet.setPassword(settings.wallet_password);
- // disallow "next" button until passwords match
- if (pages[currentPage] === passwordPage) {
- nextButton.visible = passwordPage.passwordValid;
- } else if (pages[currentPage] === finishPage) {
- // display settings summary
- finishPage.updateSettingsSummary();
- nextButton.visible = false
- } else {
- nextButton.visible = true
- }
+ // saving wallet_filename;
+ settings['wallet_filename'] = new_wallet_filename;
+
+ // persist settings
+ appWindow.persistentSettings.language = settings.language
+ appWindow.persistentSettings.locale = settings.locale
+ appWindow.persistentSettings.account_name = settings.account_name
+ appWindow.persistentSettings.wallet_path = settings.wallet_path
+ appWindow.persistentSettings.allow_background_mining = settings.allow_background_mining
+ appWindow.persistentSettings.auto_donations_enabled = settings.auto_donations_enabled
+ appWindow.persistentSettings.auto_donations_amount = settings.auto_donations_amount
+ }
+
+ // reading settings from persistent storage
+ Component.onCompleted: {
+ console.log("rootItem: ", appWindow);
+ settings['allow_background_mining'] = appWindow.persistentSettings.allow_background_mining
+ settings['auto_donations_enabled'] = appWindow.persistentSettings.auto_donations_enabled
+ settings['auto_donations_amount'] = appWindow.persistentSettings.auto_donations_amount
}
@@ -79,10 +153,10 @@ Rectangle {
anchors.right: parent.right
anchors.rightMargin: 50
visible: wizard.currentPage !== 1 && wizard.currentPage !== 6
-
width: 50; height: 50
radius: 25
- color: nextArea.containsMouse ? "#FF4304" : "#FF6C3C"
+ color: enabled ? nextArea.containsMouse ? "#FF4304" : "#FF6C3C" : "#DBDBDB"
+
Image {
anchors.centerIn: parent
@@ -99,8 +173,6 @@ Rectangle {
}
-
-
WizardWelcome {
id: welcomePage
anchors.top: parent.top
@@ -119,7 +191,8 @@ Rectangle {
anchors.left: prevButton.right
anchors.leftMargin: 50
anchors.rightMargin: 50
- onCreateWalletClicked: wizard.switchPage(true)
+ onCreateWalletClicked: wizard.openCreateWalletPage()
+ onRecoveryWalletClicked: wizard.openRecoveryWalletPage()
}
WizardCreateWallet {
@@ -132,6 +205,18 @@ Rectangle {
anchors.rightMargin: 50
}
+ WizardRecoveryWallet {
+ id: recoveryWalletPage
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: nextButton.left
+ anchors.left: prevButton.right
+ anchors.leftMargin: 50
+ anchors.rightMargin: 50
+ }
+
+
+
WizardPassword {
id: passwordPage
anchors.top: parent.top
@@ -193,12 +278,15 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.margins: 50
width: 110
- text: qsTr("USE MONERO")
+ text: qsTr("USE MONERO") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
- visible: parent.pages[currentPage] === finishPage
- onClicked: wizard.useMoneroClicked()
+ visible: parent.paths[currentPath][currentPage] === finishPage
+ onClicked: {
+ wizard.applySettings();
+ wizard.useMoneroClicked()
+ }
}
}
diff --git a/wizard/WizardManageWalletUI.qml b/wizard/WizardManageWalletUI.qml
new file mode 100644
index 00000000..a11ee094
--- /dev/null
+++ b/wizard/WizardManageWalletUI.qml
@@ -0,0 +1,228 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import QtQuick 2.2
+import moneroComponents 1.0
+import QtQuick.Dialogs 1.2
+
+// Reusable component for managing wallet (account name, path, private key)
+
+Item {
+
+ property alias titleText: titleText.text
+ property alias accountNameText: accountName.text
+ property alias wordsTextTitle: frameHeader.text
+ property alias walletPath: fileUrlInput.text
+ property alias wordsTextItem : memoTextItem
+
+
+ // TODO extend properties if needed
+
+ anchors.fill: parent
+ Row {
+ id: dotsRow
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.topMargin: 85
+ spacing: 6
+
+ ListModel {
+ id: dotsModel
+ ListElement { dotColor: "#FFE00A" }
+ ListElement { dotColor: "#DBDBDB" }
+ ListElement { dotColor: "#DBDBDB" }
+ ListElement { dotColor: "#DBDBDB" }
+ }
+
+ Repeater {
+ model: dotsModel
+ delegate: Rectangle {
+ width: 12; height: 12
+ radius: 6
+ color: dotColor
+ }
+ }
+ }
+
+ Column {
+ id: headerColumn
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.leftMargin: 16
+ anchors.rightMargin: 16
+ anchors.top: parent.top
+ anchors.topMargin: 74
+ spacing: 24
+
+ Text {
+ id: titleText
+ anchors.left: parent.left
+ width: headerColumn.width - dotsRow.width - 16
+ font.family: "Arial"
+ font.pixelSize: 28
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+ //renderType: Text.NativeRendering
+ color: "#3F3F3F"
+ }
+
+ Text {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ font.family: "Arial"
+ font.pixelSize: 18
+ wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
+ //renderType: Text.NativeRendering
+ color: "#4A4646"
+ text: qsTr("This is the name of your wallet. You can change it to a different name if you’d like:") + translationManager.emptyString
+ }
+ }
+
+ Item {
+ id: walletNameItem
+ anchors.top: headerColumn.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: 24
+ width: 300
+ height: 62
+
+ TextInput {
+ id: accountName
+ anchors.fill: parent
+ horizontalAlignment: TextInput.AlignHCenter
+ verticalAlignment: TextInput.AlignVCenter
+ font.family: "Arial"
+ font.pixelSize: 32
+ renderType: Text.NativeRendering
+ color: "#FF6C3C"
+ focus: true
+ text: qsTr("My account name") + translationManager.emptyString
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ height: 1
+ color: "#DBDBDB"
+ }
+ }
+
+ Text {
+ id: frameHeader
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.leftMargin: 16
+ anchors.rightMargin: 16
+ anchors.top: walletNameItem.bottom
+ anchors.topMargin: 24
+ font.family: "Arial"
+ font.pixelSize: 24
+ font.bold: true
+ //renderType: Text.NativeRendering
+ color: "#4A4646"
+ elide: Text.ElideRight
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+
+ WizardMemoTextInput {
+ id : memoTextItem
+ width: parent.width
+ anchors.top : frameHeader.bottom
+ anchors.topMargin: 16
+ }
+
+ Row {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: memoTextItem.bottom
+ anchors.topMargin: 24
+ spacing: 16
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ font.family: "Arial"
+ font.pixelSize: 18
+ //renderType: Text.NativeRendering
+ color: "#4A4646"
+ text: qsTr("Your wallet is stored in") + translationManager.emptyString
+ }
+
+ Item {
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.width - x
+ height: 34
+
+ FileDialog {
+ id: fileDialog
+ selectMultiple: false
+ selectFolder: true
+ title: qsTr("Please choose a directory") + translationManager.emptyString
+ onAccepted: {
+ fileUrlInput.text = fileDialog.folder
+ fileDialog.visible = false
+ }
+ onRejected: {
+ fileDialog.visible = false
+ }
+ }
+
+ TextInput {
+ id: fileUrlInput
+ anchors.fill: parent
+ anchors.leftMargin: 5
+ anchors.rightMargin: 5
+ clip: true
+ font.family: "Arial"
+ font.pixelSize: 18
+ color: "#6B0072"
+ verticalAlignment: Text.AlignVCenter
+ selectByMouse: true
+
+ text: moneroAccountsDir + "/"
+ onFocusChanged: {
+ if(focus) {
+ fileDialog.folder = text
+ fileDialog.open()
+ }
+ }
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ height: 1
+ color: "#DBDBDB"
+ }
+ }
+ }
+}
+
diff --git a/wizard/WizardMemoTextInput.qml b/wizard/WizardMemoTextInput.qml
new file mode 100644
index 00000000..9497d9e5
--- /dev/null
+++ b/wizard/WizardMemoTextInput.qml
@@ -0,0 +1,81 @@
+import QtQuick 2.0
+import moneroComponents 1.0
+
+Column {
+
+ property alias memoText : memoTextInput.text
+ property alias tipText: wordsTipText.text
+ property alias tipTextVisible: tipRect.visible
+ property alias memoTextReadOnly : memoTextInput.readOnly
+ property alias clipboardButtonVisible: clipboardButton.visible
+
+
+ Rectangle {
+ id: memoTextRect
+ width: parent.width
+ height: {
+ memoTextInput.height
+ // to have less gap between button and text input we reduce overall height by button height
+ //+ (clipboardButton.visible ? clipboardButton.height : 0)
+ + (tipRect.visible ? tipRect.height : 0)
+ }
+ border.width: 1
+ border.color: "#DBDBDB"
+
+ TextEdit {
+ id: memoTextInput
+ textMargin: 8
+ text: ""
+ font.family: "Arial"
+ font.pointSize: 16
+ wrapMode: TextInput.Wrap
+ width: parent.width
+ selectByMouse: true
+ property int minimumHeight: 100
+ height: contentHeight > minimumHeight ? contentHeight : minimumHeight
+ }
+ Image {
+ id : clipboardButton
+ anchors.right: parent.right
+ anchors.bottom: tipRect.top
+ source: "qrc:///images/greyTriangle.png"
+ Image {
+ anchors.centerIn: parent
+ source: "qrc:///images/copyToClipboard.png"
+ }
+ Clipboard { id: clipboard }
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: clipboard.setText(memoTextInput.text)
+ }
+ }
+ Rectangle {
+ id: tipRect
+ visible: true
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: memoTextRect.bottom
+ height: wordsTipText.contentHeight + wordsTipText.anchors.topMargin
+ color: "#DBDBDB"
+ property alias text: wordsTipText.text
+
+ Text {
+ id: wordsTipText
+ anchors.fill: parent
+ anchors.topMargin : 16
+ anchors.bottomMargin: 16
+ anchors.leftMargin: 16
+ anchors.rightMargin: 16
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.family: "Arial"
+ font.pixelSize: 15
+ color: "#4A4646"
+ wrapMode: Text.Wrap
+ text: qsTr("It is very important to write it down as this is the only backup you will need for your wallet. You will be asked to confirm the seed in the next screen to ensure it has copied down correctly.")
+ + translationManager.emptyString
+ }
+ }
+ }
+}
diff --git a/wizard/WizardOptions.qml b/wizard/WizardOptions.qml
index debdee88..b35dbee4 100644
--- a/wizard/WizardOptions.qml
+++ b/wizard/WizardOptions.qml
@@ -31,6 +31,7 @@ import QtQuick 2.2
Item {
id: page
signal createWalletClicked()
+ signal recoveryWalletClicked()
opacity: 0
visible: false
Behavior on opacity {
@@ -57,7 +58,8 @@ Item {
//renderType: Text.NativeRendering
color: "#3F3F3F"
wrapMode: Text.Wrap
- text: qsTr("I want")
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("Welcome to Monero!") + translationManager.emptyString
}
Text {
@@ -68,7 +70,8 @@ Item {
//renderType: Text.NativeRendering
color: "#4A4646"
wrapMode: Text.Wrap
- text: qsTr("Please select one of the following options:")
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("Please select one of the following options:") + translationManager.emptyString
}
}
@@ -104,7 +107,7 @@ Item {
font.pixelSize: 16
color: "#4A4949"
horizontalAlignment: Text.AlignHCenter
- text: qsTr("This is my first time, I want to create a new account")
+ text: qsTr("This is my first time, I want to create a new account") + translationManager.emptyString
}
}
@@ -126,6 +129,7 @@ Item {
id: recoverWalletArea
anchors.fill: parent
hoverEnabled: true
+ onClicked: page.recoveryWalletClicked()
}
}
@@ -134,7 +138,7 @@ Item {
font.pixelSize: 16
color: "#4A4949"
horizontalAlignment: Text.AlignHCenter
- text: qsTr("I want to recover my account from my 24 work seed")
+ text: qsTr("I want to recover my account from my 25 word seed") + translationManager.emptyString
}
}
}
diff --git a/wizard/WizardPassword.qml b/wizard/WizardPassword.qml
index 2926a9e9..8318a785 100644
--- a/wizard/WizardPassword.qml
+++ b/wizard/WizardPassword.qml
@@ -28,26 +28,51 @@
import QtQuick 2.2
import "../components"
+import "utils.js" as Utils
Item {
+
+ id: passwordPage
opacity: 0
visible: false
+
+ property alias titleText: titleText.text
Behavior on opacity {
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
}
onOpacityChanged: visible = opacity !== 0
- function handlePassword() {
- // allow to forward step only if passwords match
- // print("pass1: ", passwordItem.password)
- // print("pass2: ", retypePasswordItem.password)
- // TODO: update password strength
- wizard.nextButton.visible = passwordItem.password === retypePasswordItem.password
+
+ function onPageOpened(settingsObject) {
+ wizard.nextButton.enabled = true
+
+ if (wizard.currentPath === "create_wallet") {
+ passwordPage.titleText = qsTr("Now that your wallet has been created, please set a password for the wallet") + translationManager.emptyString
+ } else {
+ passwordPage.titleText = qsTr("Now that your wallet has been restored, please set a password for the wallet") + translationManager.emptyString
+ }
+ }
+
+ function onPageClosed(settingsObject) {
+ // TODO: set password on the final page
+ // settingsObject.wallet.setPassword(passwordItem.password)
+ settingsObject['wallet_password'] = passwordItem.password
+ return true
+ }
+
+ function handlePassword() {
+ // allow to forward step only if passwords match
+
+ wizard.nextButton.enabled = passwordItem.password === retypePasswordItem.password
+
+ // scorePassword returns value from 1..100
+ var strength = Utils.scorePassword(passwordItem.password)
+ // privacyLevel component uses 1..13 scale
+ privacyLevel.fillLevel = Utils.mapScope(1, 100, 1, 13, strength)
+
}
- property bool passwordValid : passwordItem.password != ''
- && passwordItem.password === retypePasswordItem.password
Row {
@@ -86,14 +111,16 @@ Item {
spacing: 24
Text {
+ id: titleText
anchors.left: parent.left
width: headerColumn.width - dotsRow.width - 16
font.family: "Arial"
font.pixelSize: 28
wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
//renderType: Text.NativeRendering
color: "#3F3F3F"
- text: qsTr("Now that your wallet has been created, please set a password for the wallet")
+
}
Text {
@@ -104,8 +131,10 @@ Item {
wrapMode: Text.Wrap
//renderType: Text.NativeRendering
color: "#4A4646"
+ horizontalAlignment: Text.AlignHCenter
text: qsTr("Note that this password cannot be recovered, and if forgotten you will need to restore your wallet from the mnemonic seed you were just given
Your password will be used to protect your wallet and to confirm actions, so make sure that your password is sufficiently secure.")
+ + translationManager.emptyString
}
}
@@ -140,4 +169,8 @@ Item {
height: 62
onChanged: handlePassword()
}
+
+ Component.onCompleted: {
+ console.log
+ }
}
diff --git a/wizard/WizardPasswordInput.qml b/wizard/WizardPasswordInput.qml
index d2bbf44a..82597421 100644
--- a/wizard/WizardPasswordInput.qml
+++ b/wizard/WizardPasswordInput.qml
@@ -1,4 +1,30 @@
-// WizardPasswordInput.qml
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
diff --git a/wizard/WizardRecoveryWallet.qml b/wizard/WizardRecoveryWallet.qml
new file mode 100644
index 00000000..505bc239
--- /dev/null
+++ b/wizard/WizardRecoveryWallet.qml
@@ -0,0 +1,88 @@
+// Copyright (c) 2014-2015, The Monero Project
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification, are
+// permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice, this list of
+// conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice, this list
+// of conditions and the following disclaimer in the documentation and/or other
+// materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be
+// used to endorse or promote products derived from this software without specific
+// prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import QtQuick 2.2
+import moneroComponents 1.0
+import QtQuick.Dialogs 1.2
+import Bitmonero.Wallet 1.0
+import 'utils.js' as Utils
+
+Item {
+ opacity: 0
+ visible: false
+
+ Behavior on opacity {
+ NumberAnimation { duration: 100; easing.type: Easing.InQuad }
+ }
+
+ onOpacityChanged: visible = opacity !== 0
+
+ function onPageOpened(settingsObject) {
+ checkNextButton();
+ }
+
+ function checkNextButton() {
+ var wordsArray = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText).split(" ");
+ wizard.nextButton.enabled = wordsArray.length === 25;
+ }
+
+ function onPageClosed(settingsObject) {
+ settingsObject['account_name'] = uiItem.accountNameText
+ settingsObject['words'] = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText)
+ settingsObject['wallet_path'] = uiItem.walletPath
+ return recoveryWallet(settingsObject)
+ }
+
+ function recoveryWallet(settingsObject) {
+ var testnet = appWindow.persistentSettings.testnet;
+ var wallet = walletManager.recoveryWallet(oshelper.temporaryFilename(), settingsObject.words, testnet);
+ var success = wallet.status === Wallet.Status_Ok;
+ if (success) {
+ settingsObject['wallet'] = wallet;
+ } else {
+ walletManager.closeWallet(wallet);
+ }
+ return success;
+ }
+
+
+
+ WizardManageWalletUI {
+ id: uiItem
+ accountNameText: qsTr("My account name") + translationManager.emptyString
+ titleText: qsTr("We're ready to recover your account") + translationManager.emptyString
+ wordsTextTitle: qsTr("Please enter your 25 word private key") + translationManager.emptyString
+ wordsTextItem.clipboardButtonVisible: false
+ wordsTextItem.tipTextVisible: false
+ wordsTextItem.memoTextReadOnly: false
+ wordsTextItem.memoText: ""
+ wordsTextItem.onMemoTextChanged: {
+ checkNextButton();
+ }
+ }
+}
diff --git a/wizard/WizardWelcome.qml b/wizard/WizardWelcome.qml
index 208a7994..bc4c5a1b 100644
--- a/wizard/WizardWelcome.qml
+++ b/wizard/WizardWelcome.qml
@@ -36,10 +36,15 @@ Item {
onOpacityChanged: visible = opacity !== 0
- function saveSettings(settingsObject) {
- settingsObject['language'] = languagesModel.get(gridView.currentIndex).name
+ function onPageClosed(settingsObject) {
+ var lang = languagesModel.get(gridView.currentIndex);
+ settingsObject['language'] = lang.display_name;
+ settingsObject['wallet_language'] = lang.wallet_language;
+ settingsObject['locale'] = lang.locale;
+ return true
}
+
Column {
id: headerColumn
anchors.left: parent.left
@@ -51,6 +56,7 @@ Item {
spacing: 24
Text {
+ id: welcomeText
anchors.left: parent.left
anchors.right: parent.right
font.family: "Arial"
@@ -58,10 +64,14 @@ Item {
//renderType: Text.NativeRendering
color: "#3F3F3F"
wrapMode: Text.Wrap
- text: qsTr("Welcome")
+ // hack to implement dynamic translation
+ // https://wiki.qt.io/How_to_do_dynamic_translation_in_QML
+ text: qsTr("Welcome") +
+ translationManager.emptyString
}
Text {
+ id: selectLanguageText
anchors.left: parent.left
anchors.right: parent.right
font.family: "Arial"
@@ -70,6 +80,7 @@ Item {
color: "#4A4646"
wrapMode: Text.Wrap
text: qsTr("Please choose a language and regional format.")
+ + translationManager.emptyString
}
}
@@ -78,11 +89,15 @@ Item {
source: "/lang/languages.xml"
query: "/languages/language"
- XmlRole { name: "name"; query: "@name/string()" }
+ XmlRole { name: "display_name"; query: "@display_name/string()" }
+ XmlRole { name: "locale"; query: "@locale/string()" }
+ XmlRole { name: "wallet_language"; query: "@wallet_language/string()" }
XmlRole { name: "flag"; query: "@flag/string()" }
// TODO: XmlListModel is read only, we should store current language somewhere else
// and set current language accordingly
XmlRole { name: "isCurrent"; query: "@enabled/string()" }
+
+
}
GridView {
@@ -104,7 +119,6 @@ Item {
width: gridView.cellWidth
height: gridView.cellHeight
-
Rectangle {
id: flagRect
width: 60; height: 60
@@ -112,7 +126,7 @@ Item {
radius: 30
color: gridView.currentIndex === index ? "#DBDBDB" : "#FFFFFF"
Image {
- anchors.centerIn: parent
+ anchors.fill: parent
source: flag
}
}
@@ -126,15 +140,22 @@ Item {
font.bold: gridView.currentIndex === index
elide: Text.ElideRight
color: "#3F3F3F"
- text: name
+ text: display_name
}
MouseArea {
id: delegateArea
anchors.fill: parent
onClicked: {
gridView.currentIndex = index
+ var data = languagesModel.get(gridView.currentIndex);
+ if (data !== null || data !== undefined) {
+ var locale = data.locale
+ translationManager.setLanguage(locale.split("_")[0]);
+ }
}
}
- }
+ } // delegate
+
+
}
}
diff --git a/wizard/utils.js b/wizard/utils.js
new file mode 100644
index 00000000..be066598
--- /dev/null
+++ b/wizard/utils.js
@@ -0,0 +1,49 @@
+
+.pragma library
+
+// grabbed from SO answer page: http://stackoverflow.com/questions/948172/password-strength-meter
+
+function scorePassword(pass) {
+ var score = 0;
+ if (!pass)
+ return score;
+
+ // award every unique letter until 5 repetitions
+ var letters = {};
+ for (var i=0; i