diff options
| author | marcin <z.krzysztoff7@gmail.com> | 2014-08-19 14:58:02 +0200 |
|---|---|---|
| committer | marcin <z.krzysztoff7@gmail.com> | 2014-08-19 14:58:02 +0200 |
| commit | 17e18a3351aad2516e2dd11625f87ed8026d0b7b (patch) | |
| tree | bafa7f5d61e89418150094d61f2acd3fb583b2ce | |
| parent | 6800bb67d72e0923502ea90e0a8d548e0ba5ee70 (diff) | |
| download | monzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.tar.gz monzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.tar.xz monzero-gui-17e18a3351aad2516e2dd11625f87ed8026d0b7b.zip | |
wizard v0.1
| -rw-r--r-- | bitmonero.pro.user | 2 | ||||
| -rw-r--r-- | components/TitleBar.qml | 1 | ||||
| -rw-r--r-- | images/createWallet.png | bin | 0 -> 16678 bytes | |||
| -rw-r--r-- | images/nextPage.png | bin | 0 -> 308 bytes | |||
| -rw-r--r-- | images/openAccount.png | bin | 0 -> 7075 bytes | |||
| -rw-r--r-- | images/prevPage.png | bin | 0 -> 311 bytes | |||
| -rw-r--r-- | images/recoverWallet.png | bin | 0 -> 13461 bytes | |||
| -rw-r--r-- | lang/flags/bangladesh.png | bin | 0 -> 1340 bytes | |||
| -rw-r--r-- | lang/flags/brazil.png | bin | 0 -> 2110 bytes | |||
| -rw-r--r-- | lang/flags/china.png | bin | 0 -> 1282 bytes | |||
| -rw-r--r-- | lang/flags/german.png | bin | 0 -> 731 bytes | |||
| -rw-r--r-- | lang/flags/india.png | bin | 0 -> 846 bytes | |||
| -rw-r--r-- | lang/flags/palestine.png | bin | 0 -> 1173 bytes | |||
| -rw-r--r-- | lang/flags/rpa.png | bin | 0 -> 2177 bytes | |||
| -rw-r--r-- | lang/flags/russia.png | bin | 0 -> 805 bytes | |||
| -rw-r--r-- | lang/flags/uk.png | bin | 0 -> 1995 bytes | |||
| -rw-r--r-- | lang/flags/usa.png | bin | 0 -> 1716 bytes | |||
| -rw-r--r-- | lang/languages.xml | 13 | ||||
| -rw-r--r-- | main.cpp | 1 | ||||
| -rw-r--r-- | main.qml | 26 | ||||
| -rw-r--r-- | qml.qrc | 9 | ||||
| -rw-r--r-- | wizard/WizardCreateWallet.qml | 5 | ||||
| -rw-r--r-- | wizard/WizardMain.qml | 96 | ||||
| -rw-r--r-- | wizard/WizardOptions.qml | 131 | ||||
| -rw-r--r-- | wizard/WizardWelcome.qml | 102 |
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 Binary files differnew file mode 100644 index 00000000..560e7e73 --- /dev/null +++ b/images/createWallet.png diff --git a/images/nextPage.png b/images/nextPage.png Binary files differnew file mode 100644 index 00000000..e79463b3 --- /dev/null +++ b/images/nextPage.png diff --git a/images/openAccount.png b/images/openAccount.png Binary files differnew file mode 100644 index 00000000..1232fc83 --- /dev/null +++ b/images/openAccount.png diff --git a/images/prevPage.png b/images/prevPage.png Binary files differnew file mode 100644 index 00000000..636cfa25 --- /dev/null +++ b/images/prevPage.png diff --git a/images/recoverWallet.png b/images/recoverWallet.png Binary files differnew file mode 100644 index 00000000..78ceaeb9 --- /dev/null +++ b/images/recoverWallet.png diff --git a/lang/flags/bangladesh.png b/lang/flags/bangladesh.png Binary files differnew file mode 100644 index 00000000..099b7eee --- /dev/null +++ b/lang/flags/bangladesh.png diff --git a/lang/flags/brazil.png b/lang/flags/brazil.png Binary files differnew file mode 100644 index 00000000..baa62b9d --- /dev/null +++ b/lang/flags/brazil.png diff --git a/lang/flags/china.png b/lang/flags/china.png Binary files differnew file mode 100644 index 00000000..5f3c6fc8 --- /dev/null +++ b/lang/flags/china.png diff --git a/lang/flags/german.png b/lang/flags/german.png Binary files differnew file mode 100644 index 00000000..7756bf59 --- /dev/null +++ b/lang/flags/german.png diff --git a/lang/flags/india.png b/lang/flags/india.png Binary files differnew file mode 100644 index 00000000..bf27a173 --- /dev/null +++ b/lang/flags/india.png diff --git a/lang/flags/palestine.png b/lang/flags/palestine.png Binary files differnew file mode 100644 index 00000000..78f5b1d4 --- /dev/null +++ b/lang/flags/palestine.png diff --git a/lang/flags/rpa.png b/lang/flags/rpa.png Binary files differnew file mode 100644 index 00000000..61de692d --- /dev/null +++ b/lang/flags/rpa.png diff --git a/lang/flags/russia.png b/lang/flags/russia.png Binary files differnew file mode 100644 index 00000000..905e6bab --- /dev/null +++ b/lang/flags/russia.png diff --git a/lang/flags/uk.png b/lang/flags/uk.png Binary files differnew file mode 100644 index 00000000..cb68609c --- /dev/null +++ b/lang/flags/uk.png diff --git a/lang/flags/usa.png b/lang/flags/usa.png Binary files differnew file mode 100644 index 00000000..fd501324 --- /dev/null +++ b/lang/flags/usa.png 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 @@ -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(); @@ -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 { @@ -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 + } + } + } +} |
