aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcin <z.krzysztoff7@gmail.com>2014-08-19 14:58:02 +0200
committermarcin <z.krzysztoff7@gmail.com>2014-08-19 14:58:02 +0200
commit17e18a3351aad2516e2dd11625f87ed8026d0b7b (patch)
treebafa7f5d61e89418150094d61f2acd3fb583b2ce
parent6800bb67d72e0923502ea90e0a8d548e0ba5ee70 (diff)
downloadmonzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.tar.gz
monzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.tar.xz
monzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.zip
wizard v0.1
-rw-r--r--bitmonero.pro.user2
-rw-r--r--components/TitleBar.qml1
-rw-r--r--images/createWallet.pngbin0 -> 16678 bytes
-rw-r--r--images/nextPage.pngbin0 -> 308 bytes
-rw-r--r--images/openAccount.pngbin0 -> 7075 bytes
-rw-r--r--images/prevPage.pngbin0 -> 311 bytes
-rw-r--r--images/recoverWallet.pngbin0 -> 13461 bytes
-rw-r--r--lang/flags/bangladesh.pngbin0 -> 1340 bytes
-rw-r--r--lang/flags/brazil.pngbin0 -> 2110 bytes
-rw-r--r--lang/flags/china.pngbin0 -> 1282 bytes
-rw-r--r--lang/flags/german.pngbin0 -> 731 bytes
-rw-r--r--lang/flags/india.pngbin0 -> 846 bytes
-rw-r--r--lang/flags/palestine.pngbin0 -> 1173 bytes
-rw-r--r--lang/flags/rpa.pngbin0 -> 2177 bytes
-rw-r--r--lang/flags/russia.pngbin0 -> 805 bytes
-rw-r--r--lang/flags/uk.pngbin0 -> 1995 bytes
-rw-r--r--lang/flags/usa.pngbin0 -> 1716 bytes
-rw-r--r--lang/languages.xml13
-rw-r--r--main.cpp1
-rw-r--r--main.qml26
-rw-r--r--qml.qrc9
-rw-r--r--wizard/WizardCreateWallet.qml5
-rw-r--r--wizard/WizardMain.qml96
-rw-r--r--wizard/WizardOptions.qml131
-rw-r--r--wizard/WizardWelcome.qml102
25 files changed, 385 insertions, 1 deletions
diff --git a/bitmonero.pro.user b/bitmonero.pro.user
index 7b75f718..cffb0d85 100644
--- a/bitmonero.pro.user
+++ b/bitmonero.pro.user
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.1.2, 2014-07-23T13:00:52. -->
+<!-- Written by QtCreator 3.1.2, 2014-08-19T11:29:16. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
diff --git a/components/TitleBar.qml b/components/TitleBar.qml
index 535a4113..3cd0d8ed 100644
--- a/components/TitleBar.qml
+++ b/components/TitleBar.qml
@@ -10,6 +10,7 @@ Rectangle {
property string walletName: "Donations"
property bool containsMouse: false
property alias maximizeButtonVisible: maximizeButton.visible
+ property alias basicButtonVisible: goToBasicVersionButton.visible
signal goToBasicVersion(bool yes)
Text {
diff --git a/images/createWallet.png b/images/createWallet.png
new file mode 100644
index 00000000..560e7e73
--- /dev/null
+++ b/images/createWallet.png
Binary files differ
diff --git a/images/nextPage.png b/images/nextPage.png
new file mode 100644
index 00000000..e79463b3
--- /dev/null
+++ b/images/nextPage.png
Binary files differ
diff --git a/images/openAccount.png b/images/openAccount.png
new file mode 100644
index 00000000..1232fc83
--- /dev/null
+++ b/images/openAccount.png
Binary files differ
diff --git a/images/prevPage.png b/images/prevPage.png
new file mode 100644
index 00000000..636cfa25
--- /dev/null
+++ b/images/prevPage.png
Binary files differ
diff --git a/images/recoverWallet.png b/images/recoverWallet.png
new file mode 100644
index 00000000..78ceaeb9
--- /dev/null
+++ b/images/recoverWallet.png
Binary files differ
diff --git a/lang/flags/bangladesh.png b/lang/flags/bangladesh.png
new file mode 100644
index 00000000..099b7eee
--- /dev/null
+++ b/lang/flags/bangladesh.png
Binary files differ
diff --git a/lang/flags/brazil.png b/lang/flags/brazil.png
new file mode 100644
index 00000000..baa62b9d
--- /dev/null
+++ b/lang/flags/brazil.png
Binary files differ
diff --git a/lang/flags/china.png b/lang/flags/china.png
new file mode 100644
index 00000000..5f3c6fc8
--- /dev/null
+++ b/lang/flags/china.png
Binary files differ
diff --git a/lang/flags/german.png b/lang/flags/german.png
new file mode 100644
index 00000000..7756bf59
--- /dev/null
+++ b/lang/flags/german.png
Binary files differ
diff --git a/lang/flags/india.png b/lang/flags/india.png
new file mode 100644
index 00000000..bf27a173
--- /dev/null
+++ b/lang/flags/india.png
Binary files differ
diff --git a/lang/flags/palestine.png b/lang/flags/palestine.png
new file mode 100644
index 00000000..78f5b1d4
--- /dev/null
+++ b/lang/flags/palestine.png
Binary files differ
diff --git a/lang/flags/rpa.png b/lang/flags/rpa.png
new file mode 100644
index 00000000..61de692d
--- /dev/null
+++ b/lang/flags/rpa.png
Binary files differ
diff --git a/lang/flags/russia.png b/lang/flags/russia.png
new file mode 100644
index 00000000..905e6bab
--- /dev/null
+++ b/lang/flags/russia.png
Binary files differ
diff --git a/lang/flags/uk.png b/lang/flags/uk.png
new file mode 100644
index 00000000..cb68609c
--- /dev/null
+++ b/lang/flags/uk.png
Binary files differ
diff --git a/lang/flags/usa.png b/lang/flags/usa.png
new file mode 100644
index 00000000..fd501324
--- /dev/null
+++ b/lang/flags/usa.png
Binary files differ
diff --git a/lang/languages.xml b/lang/languages.xml
new file mode 100644
index 00000000..eacfcad5
--- /dev/null
+++ b/lang/languages.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<languages>
+ <language name="US English" flag="/lang/flags/usa.png" qs="none"/>
+ <language name="UK English" flag="/lang/flags/uk.png" qs="none"/>
+ <language name="Russia" flag="/lang/flags/russia.png" qs="none"/>
+ <language name="RPA" flag="/lang/flags/rpa.png" qs="none"/>
+ <language name="Palestine" flag="/lang/flags/palestine.png" qs="none"/>
+ <language name="India" flag="/lang/flags/india.png" qs="none"/>
+ <language name="German" flag="/lang/flags/german.png" qs="none"/>
+ <language name="China" flag="/lang/flags/china.png" qs="none"/>
+ <language name="Brazil" flag="/lang/flags/brazil.png" qs="none"/>
+ <language name="Bangladesh" flag="/lang/flags/bangladesh.png" qs="none"/>
+</languages> \ No newline at end of file
diff --git a/main.cpp b/main.cpp
index 38776326..122ea561 100644
--- a/main.cpp
+++ b/main.cpp
@@ -13,6 +13,7 @@ int main(int argc, char *argv[])
qmlRegisterType<clipboardAdapter>("moneroComponents", 1, 0, "Clipboard");
QQmlApplicationEngine engine;
+ engine.rootContext()->setContextProperty("applicationDirectory", QApplication::applicationDirPath());
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QObject *rootObject = engine.rootObjects().first();
diff --git a/main.qml b/main.qml
index bedcea4d..42df18b7 100644
--- a/main.qml
+++ b/main.qml
@@ -3,6 +3,7 @@ import QtQuick.Window 2.0
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
import "components"
+import "wizard"
ApplicationWindow {
id: appWindow
@@ -98,6 +99,26 @@ ApplicationWindow {
anchors.fill: parent
clip: true
+ state: "wizard"
+ states: [
+ State {
+ name: "wizard"
+ PropertyChanges { target: leftPanel; visible: false }
+ PropertyChanges { target: rightPanel; visible: false }
+ PropertyChanges { target: middlePanel; visible: false }
+ PropertyChanges { target: titleBar; basicButtonVisible: false }
+ PropertyChanges { target: wizard; visible: true }
+ },
+ State {
+ name: "normal"
+ PropertyChanges { target: leftPanel; visible: true }
+ PropertyChanges { target: rightPanel; visible: true }
+ PropertyChanges { target: middlePanel; visible: true }
+ PropertyChanges { target: titleBar; basicButtonVisible: true }
+ PropertyChanges { target: wizard; visible: false }
+ }
+ ]
+
LeftPanel {
id: leftPanel
anchors.left: parent.left
@@ -261,6 +282,11 @@ ApplicationWindow {
}
}
+ WizardMain {
+ id: wizard
+ anchors.fill: parent
+ }
+
property int maxWidth: leftPanel.width + 655 + rightPanel.width
property int maxHeight: 700
MouseArea {
diff --git a/qml.qrc b/qml.qrc
index bc40ee0d..03ff35e1 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -80,5 +80,14 @@
<file>images/checkedVioletIcon.png</file>
<file>images/resize.png</file>
<file>images/resizeHovered.png</file>
+ <file>wizard/WizardWelcome.qml</file>
+ <file>wizard/WizardMain.qml</file>
+ <file>images/nextPage.png</file>
+ <file>images/prevPage.png</file>
+ <file>wizard/WizardOptions.qml</file>
+ <file>images/createWallet.png</file>
+ <file>images/openAccount.png</file>
+ <file>images/recoverWallet.png</file>
+ <file>wizard/WizardCreateWallet.qml</file>
</qresource>
</RCC>
diff --git a/wizard/WizardCreateWallet.qml b/wizard/WizardCreateWallet.qml
new file mode 100644
index 00000000..5ce37a96
--- /dev/null
+++ b/wizard/WizardCreateWallet.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.2
+
+Item {
+
+}
diff --git a/wizard/WizardMain.qml b/wizard/WizardMain.qml
new file mode 100644
index 00000000..9c523ac0
--- /dev/null
+++ b/wizard/WizardMain.qml
@@ -0,0 +1,96 @@
+import QtQuick 2.2
+
+Rectangle {
+ id: wizard
+ border.color: "#DBDBDB"
+ border.width: 1
+ color: "#FFFFFF"
+
+ Rectangle {
+ id: nextButton
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: 50
+
+ width: 50; height: 50
+ radius: 25
+ color: nextArea.containsMouse ? "#FF4304" : "#FF6C3C"
+
+ Image {
+ anchors.centerIn: parent
+ anchors.horizontalCenterOffset: 3
+ source: "qrc:///images/nextPage.png"
+ }
+
+ MouseArea {
+ id: nextArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: wizard.switchPage(true)
+ }
+ }
+
+ property int currentPage: 0
+ function switchPage(next) {
+ var pages = new Array()
+ pages[0] = welcomePage
+ pages[1] = optionsPage
+
+ 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
+ }
+ }
+ }
+
+ WizardWelcome {
+ id: welcomePage
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: nextButton.left
+ anchors.left: prevButton.right
+ anchors.leftMargin: 50
+ anchors.rightMargin: 50
+ }
+
+ WizardOptions {
+ id: optionsPage
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ anchors.right: nextButton.left
+ anchors.left: prevButton.right
+ anchors.leftMargin: 50
+ anchors.rightMargin: 50
+ }
+
+ Rectangle {
+ id: prevButton
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 50
+ visible: parent.currentPage > 0
+
+ width: 50; height: 50
+ radius: 25
+ color: prevArea.containsMouse ? "#FF4304" : "#FF6C3C"
+
+ Image {
+ anchors.centerIn: parent
+ anchors.horizontalCenterOffset: -3
+ source: "qrc:///images/prevPage.png"
+ }
+
+ MouseArea {
+ id: prevArea
+ anchors.fill: parent
+ hoverEnabled: true
+ onClicked: wizard.switchPage(false)
+ }
+ }
+}
diff --git a/wizard/WizardOptions.qml b/wizard/WizardOptions.qml
new file mode 100644
index 00000000..90fbd93d
--- /dev/null
+++ b/wizard/WizardOptions.qml
@@ -0,0 +1,131 @@
+import QtQuick 2.2
+
+Item {
+ opacity: 0
+ visible: false
+ Behavior on opacity {
+ NumberAnimation { duration: 100; easing.type: Easing.InQuad }
+ }
+
+ onOpacityChanged: visible = opacity !== 0
+
+ Column {
+ id: headerColumn
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: 74
+ spacing: 24
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 28
+ //renderType: Text.NativeRendering
+ color: "#3F3F3F"
+ text: qsTr("I want")
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 18
+ //renderType: Text.NativeRendering
+ color: "#4A4646"
+ text: qsTr("Please select one of the following options:")
+ }
+ }
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 50
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 30
+
+ Rectangle {
+ width: 202; height: 202
+ radius: 101
+ color: createWalletArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Image {
+ anchors.centerIn: parent
+ source: "qrc:///images/createWallet.png"
+ }
+
+ MouseArea {
+ id: createWalletArea
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 16
+ color: "#4A4949"
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("This is my first time, I want to<br/>create a new account")
+ }
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 30
+
+ Rectangle {
+ width: 202; height: 202
+ radius: 101
+ color: recoverWalletArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Image {
+ anchors.centerIn: parent
+ source: "qrc:///images/recoverWallet.png"
+ }
+
+ MouseArea {
+ id: recoverWalletArea
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 16
+ color: "#4A4949"
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("I want to recover my account<br/>from my 24 work seed")
+ }
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 30
+
+ Rectangle {
+ width: 202; height: 202
+ radius: 101
+ color: openAccountArea.containsMouse ? "#DBDBDB" : "#FFFFFF"
+
+ Image {
+ anchors.centerIn: parent
+ source: "qrc:///images/openAccount.png"
+ }
+
+ MouseArea {
+ id: openAccountArea
+ anchors.fill: parent
+ hoverEnabled: true
+ }
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 16
+ color: "#4A4949"
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("I want to open account file")
+ }
+ }
+ }
+}
diff --git a/wizard/WizardWelcome.qml b/wizard/WizardWelcome.qml
new file mode 100644
index 00000000..5ddbfe5c
--- /dev/null
+++ b/wizard/WizardWelcome.qml
@@ -0,0 +1,102 @@
+import QtQuick 2.2
+import QtQuick.XmlListModel 2.0
+
+Item {
+ Behavior on opacity {
+ NumberAnimation { duration: 100; easing.type: Easing.InQuad }
+ }
+
+ onOpacityChanged: visible = opacity !== 0
+
+ Column {
+ id: headerColumn
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: 74
+ spacing: 24
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 28
+ //renderType: Text.NativeRendering
+ color: "#3F3F3F"
+ text: qsTr("Welcome")
+ }
+
+ Text {
+ font.family: "Arial"
+ font.pixelSize: 18
+ //renderType: Text.NativeRendering
+ color: "#4A4646"
+ text: qsTr("Please choose a language and regional format.")
+ }
+ }
+
+ XmlListModel {
+ id: languagesModel
+ source: "file:///" + applicationDirectory + "/lang/languages.xml"
+ query: "/languages/language"
+
+ XmlRole { name: "name"; query: "@name/string()" }
+ XmlRole { name: "flag"; query: "@flag/string()" }
+ XmlRole { name: "isCurrent"; query: "@enabled/string()" }
+ }
+
+ ListView {
+ id: listView
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.top: headerColumn.bottom
+ anchors.topMargin: 24
+ clip: true
+
+ model: languagesModel
+ delegate: Item {
+ width: listView.width
+ height: 80
+
+ Rectangle {
+ id: flagRect
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ width: 60; height: 60
+ radius: 30
+ color: listView.currentIndex === index ? "#DBDBDB" : "#FFFFFF"
+
+ Image {
+ anchors.centerIn: parent
+ source: "file:///" + applicationDirectory + flag
+ }
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: flagRect.right
+ anchors.right: parent.right
+ anchors.leftMargin: 16
+ font.family: "Arial"
+ font.pixelSize: 24
+ font.bold: listView.currentIndex === index
+ elide: Text.ElideRight
+ color: "#3F3F3F"
+ text: name
+ }
+
+ Rectangle {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ height: 1
+ color: "#DBDBDB"
+ }
+
+ MouseArea {
+ id: delegateArea
+ anchors.fill: parent
+ onClicked: listView.currentIndex = index
+ }
+ }
+ }
+}