mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-14 12:26:32 +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"?>
|
||||
<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>
|
||||
<language name="US English" locale="en_US" flag="/lang/flags/usa.png" qs="none"/>
|
||||
<language name="UK English" locale="en_GB" flag="/lang/flags/uk.png" qs="none"/>
|
||||
<language name="Russia" locale="ru_RU" flag="/lang/flags/russia.png" qs="none"/>
|
||||
<language name="RPA" locale="TODO" flag="/lang/flags/rpa.png" qs="none"/>
|
||||
<language name="Palestine" locale="TODO" flag="/lang/flags/palestine.png" qs="none"/>
|
||||
<language name="India" locale="hi_IN" flag="/lang/flags/india.png" qs="none"/>
|
||||
<language name="German" locale="de_DE" flag="/lang/flags/german.png" qs="none"/>
|
||||
<language name="China" locale="zh_CN" flag="/lang/flags/china.png" qs="none"/>
|
||||
<language name="Brazil" locale="pt_BR" flag="/lang/flags/brazil.png" qs="none"/>
|
||||
<language name="Bangladesh" locale="TODO" flag="/lang/flags/bangladesh.png" qs="none"/>
|
||||
</languages>
|
||||
|
5
main.cpp
5
main.cpp
@ -33,6 +33,9 @@
|
||||
#include "clipboardAdapter.h"
|
||||
#include "filter.h"
|
||||
#include "oscursor.h"
|
||||
#include "WalletManager.h"
|
||||
#include "Wallet.h"
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@ -41,11 +44,13 @@ int main(int argc, char *argv[])
|
||||
app.installEventFilter(eventFilter);
|
||||
|
||||
qmlRegisterType<clipboardAdapter>("moneroComponents", 1, 0, "Clipboard");
|
||||
qmlRegisterType<Wallet>("moneroWallet", 1, 0, "Wallet");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
OSCursor cursor;
|
||||
engine.rootContext()->setContextProperty("globalCursor", &cursor);
|
||||
engine.rootContext()->setContextProperty("walletManager", WalletManager::instance());
|
||||
|
||||
// export to QML monero accounts root directory
|
||||
// wizard is talking about where
|
||||
|
@ -2,16 +2,22 @@ TEMPLATE = app
|
||||
|
||||
QT += qml quick widgets
|
||||
|
||||
|
||||
HEADERS += \
|
||||
filter.h \
|
||||
clipboardAdapter.h \
|
||||
oscursor.h
|
||||
oscursor.h \
|
||||
Wallet2Adaptor.h \
|
||||
WalletManager.h \
|
||||
Wallet.h
|
||||
|
||||
|
||||
SOURCES += main.cpp \
|
||||
filter.cpp \
|
||||
clipboardAdapter.cpp \
|
||||
oscursor.cpp
|
||||
oscursor.cpp \
|
||||
WalletManager.cpp \
|
||||
Wallet.cpp
|
||||
|
||||
lupdate_only {
|
||||
SOURCES = *.qml \
|
||||
@ -63,6 +69,9 @@ OTHER_FILES += \
|
||||
monero-core_de.ts \
|
||||
monero-core_en.ts
|
||||
|
||||
DISTFILES += \
|
||||
notes.txt
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -46,6 +46,12 @@ Item {
|
||||
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 {
|
||||
id: uiItem
|
||||
titleText: qsTr("A new wallet has been created for you")
|
||||
@ -53,6 +59,5 @@ Item {
|
||||
wordsTextItem.clipboardButtonVisible: true
|
||||
wordsTextItem.tipTextVisible: true
|
||||
wordsTextItem.memoTextReadOnly: true
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,9 @@ Rectangle {
|
||||
currentPath = "create_wallet"
|
||||
pages = paths[currentPath]
|
||||
currentPage = pages.indexOf(createWalletPage)
|
||||
createWalletPage.createWallet(settings)
|
||||
handlePageChanged()
|
||||
|
||||
}
|
||||
|
||||
function openRecoveryWalletPage() {
|
||||
|
@ -25,7 +25,7 @@ Column {
|
||||
TextEdit {
|
||||
id: memoTextInput
|
||||
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.pointSize: 16
|
||||
wrapMode: TextInput.Wrap
|
||||
|
Loading…
Reference in New Issue
Block a user