mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-06 09:52:05 +02:00
started integrating wallet library
This commit is contained in:
parent
921d16a458
commit
1195a89d06
6
Wallet.cpp
Normal file
6
Wallet.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "Wallet.h"
|
||||||
|
|
||||||
|
Wallet::Wallet(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
17
Wallet.h
Normal file
17
Wallet.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef WALLET_H
|
||||||
|
#define WALLET_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class Wallet : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit Wallet(QObject *parent = 0);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WALLET_H
|
6
Wallet2Service.cpp
Normal file
6
Wallet2Service.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "Wallet2Service.h"
|
||||||
|
|
||||||
|
Wallet2Service::Wallet2Service(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
17
Wallet2Service.h
Normal file
17
Wallet2Service.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef WALLET2SERVICE_H
|
||||||
|
#define WALLET2SERVICE_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class Wallet2Service : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit Wallet2Service(QObject *parent = 0);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WALLET2SERVICE_H
|
6
WalletManager.cpp
Normal file
6
WalletManager.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include "WalletManager.h"
|
||||||
|
|
||||||
|
WalletManager::WalletManager(QObject *parent) : QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
17
WalletManager.h
Normal file
17
WalletManager.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef WALLETMANAGER_H
|
||||||
|
#define WALLETMANAGER_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
class WalletManager : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit WalletManager(QObject *parent = 0);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // WALLETMANAGER_H
|
@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<languages>
|
<languages>
|
||||||
<language name="US English" flag="/lang/flags/usa.png" qs="none"/>
|
<language name="US English" locale="en_US" flag="/lang/flags/usa.png" qs="none"/>
|
||||||
<language name="UK English" flag="/lang/flags/uk.png" qs="none"/>
|
<language name="UK English" locale="en_GB" flag="/lang/flags/uk.png" qs="none"/>
|
||||||
<language name="Russia" flag="/lang/flags/russia.png" qs="none"/>
|
<language name="Russia" locale="ru_RU" flag="/lang/flags/russia.png" qs="none"/>
|
||||||
<language name="RPA" flag="/lang/flags/rpa.png" qs="none"/>
|
<language name="RPA" locale="TODO" flag="/lang/flags/rpa.png" qs="none"/>
|
||||||
<language name="Palestine" flag="/lang/flags/palestine.png" qs="none"/>
|
<language name="Palestine" locale="TODO" flag="/lang/flags/palestine.png" qs="none"/>
|
||||||
<language name="India" flag="/lang/flags/india.png" qs="none"/>
|
<language name="India" locale="hi_IN" flag="/lang/flags/india.png" qs="none"/>
|
||||||
<language name="German" flag="/lang/flags/german.png" qs="none"/>
|
<language name="German" locale="de_DE" flag="/lang/flags/german.png" qs="none"/>
|
||||||
<language name="China" flag="/lang/flags/china.png" qs="none"/>
|
<language name="China" locale="zh_CN" flag="/lang/flags/china.png" qs="none"/>
|
||||||
<language name="Brazil" flag="/lang/flags/brazil.png" qs="none"/>
|
<language name="Brazil" locale="pt_BR" flag="/lang/flags/brazil.png" qs="none"/>
|
||||||
<language name="Bangladesh" flag="/lang/flags/bangladesh.png" qs="none"/>
|
<language name="Bangladesh" locale="TODO" flag="/lang/flags/bangladesh.png" qs="none"/>
|
||||||
</languages>
|
</languages>
|
5
main.cpp
5
main.cpp
@ -33,6 +33,9 @@
|
|||||||
#include "clipboardAdapter.h"
|
#include "clipboardAdapter.h"
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
#include "oscursor.h"
|
#include "oscursor.h"
|
||||||
|
#include "WalletManager.h"
|
||||||
|
#include "Wallet.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -41,11 +44,13 @@ int main(int argc, char *argv[])
|
|||||||
app.installEventFilter(eventFilter);
|
app.installEventFilter(eventFilter);
|
||||||
|
|
||||||
qmlRegisterType<clipboardAdapter>("moneroComponents", 1, 0, "Clipboard");
|
qmlRegisterType<clipboardAdapter>("moneroComponents", 1, 0, "Clipboard");
|
||||||
|
qmlRegisterType<Wallet>("moneroWallet", 1, 0, "Wallet");
|
||||||
|
|
||||||
QQmlApplicationEngine engine;
|
QQmlApplicationEngine engine;
|
||||||
|
|
||||||
OSCursor cursor;
|
OSCursor cursor;
|
||||||
engine.rootContext()->setContextProperty("globalCursor", &cursor);
|
engine.rootContext()->setContextProperty("globalCursor", &cursor);
|
||||||
|
engine.rootContext()->setContextProperty("walletManager", WalletManager::instance());
|
||||||
|
|
||||||
// export to QML monero accounts root directory
|
// export to QML monero accounts root directory
|
||||||
// wizard is talking about where
|
// wizard is talking about where
|
||||||
|
@ -2,16 +2,22 @@ TEMPLATE = app
|
|||||||
|
|
||||||
QT += qml quick widgets
|
QT += qml quick widgets
|
||||||
|
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
filter.h \
|
filter.h \
|
||||||
clipboardAdapter.h \
|
clipboardAdapter.h \
|
||||||
oscursor.h
|
oscursor.h \
|
||||||
|
Wallet2Adaptor.h \
|
||||||
|
WalletManager.h \
|
||||||
|
Wallet.h
|
||||||
|
|
||||||
|
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
filter.cpp \
|
filter.cpp \
|
||||||
clipboardAdapter.cpp \
|
clipboardAdapter.cpp \
|
||||||
oscursor.cpp
|
oscursor.cpp \
|
||||||
|
WalletManager.cpp \
|
||||||
|
Wallet.cpp
|
||||||
|
|
||||||
lupdate_only {
|
lupdate_only {
|
||||||
SOURCES = *.qml \
|
SOURCES = *.qml \
|
||||||
@ -63,6 +69,9 @@ OTHER_FILES += \
|
|||||||
monero-core_de.ts \
|
monero-core_de.ts \
|
||||||
monero-core_en.ts
|
monero-core_en.ts
|
||||||
|
|
||||||
|
DISTFILES += \
|
||||||
|
notes.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,6 +46,12 @@ Item {
|
|||||||
settingsObject['wallet_path'] = uiItem.walletPath
|
settingsObject['wallet_path'] = uiItem.walletPath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function createWallet(settingsObject) {
|
||||||
|
// print ("Language: " + settingsObject.language);
|
||||||
|
var wallet = walletManager.createWallet(uiItem.accountNameText, "", settingsObject.language);
|
||||||
|
uiItem.wordsTextItem.memoText = wallet.seed
|
||||||
|
}
|
||||||
|
|
||||||
WizardManageWalletUI {
|
WizardManageWalletUI {
|
||||||
id: uiItem
|
id: uiItem
|
||||||
titleText: qsTr("A new wallet has been created for you")
|
titleText: qsTr("A new wallet has been created for you")
|
||||||
@ -53,6 +59,5 @@ Item {
|
|||||||
wordsTextItem.clipboardButtonVisible: true
|
wordsTextItem.clipboardButtonVisible: true
|
||||||
wordsTextItem.tipTextVisible: true
|
wordsTextItem.tipTextVisible: true
|
||||||
wordsTextItem.memoTextReadOnly: true
|
wordsTextItem.memoTextReadOnly: true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,9 @@ Rectangle {
|
|||||||
currentPath = "create_wallet"
|
currentPath = "create_wallet"
|
||||||
pages = paths[currentPath]
|
pages = paths[currentPath]
|
||||||
currentPage = pages.indexOf(createWalletPage)
|
currentPage = pages.indexOf(createWalletPage)
|
||||||
|
createWalletPage.createWallet(settings)
|
||||||
handlePageChanged()
|
handlePageChanged()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function openRecoveryWalletPage() {
|
function openRecoveryWalletPage() {
|
||||||
|
@ -25,7 +25,7 @@ Column {
|
|||||||
TextEdit {
|
TextEdit {
|
||||||
id: memoTextInput
|
id: memoTextInput
|
||||||
textMargin: 8
|
textMargin: 8
|
||||||
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"
|
text: ""
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
wrapMode: TextInput.Wrap
|
wrapMode: TextInput.Wrap
|
||||||
|
Loading…
Reference in New Issue
Block a user