After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 598 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 219 B |
After Width: | Height: | Size: 181 B |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 165 KiB |
After Width: | Height: | Size: 621 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 706 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 667 B |
After Width: | Height: | Size: 807 B |
After Width: | Height: | Size: 622 B |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 745 B |
After Width: | Height: | Size: 827 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 641 B |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 629 B |
After Width: | Height: | Size: 689 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 72 KiB |
@ -0,0 +1,353 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick.Window 2.0
|
||||||
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
|
import "."
|
||||||
|
import "mock/Windows.js" as Windows
|
||||||
|
import "mock/Version.js" as Version
|
||||||
|
import "mock/NetworkType.js" as NetworkType
|
||||||
|
import "mock/Settings.js" as Settings
|
||||||
|
import "mock"
|
||||||
|
|
||||||
|
import "qml/common"
|
||||||
|
import "qml/."
|
||||||
|
|
||||||
|
import wowlet.Wallet 1.0
|
||||||
|
import wowlet.WalletManager 1.0
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: appWindow
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
color: "#1b2939"
|
||||||
|
|
||||||
|
property var currentWallet;
|
||||||
|
property bool disconnected: currentWallet ? currentWallet.disconnected : false
|
||||||
|
property string walletTitle: "lol123"
|
||||||
|
property string walletPath: ""
|
||||||
|
property string statusText: "Idle"
|
||||||
|
property string balanceFormatted: "Balance: 25928.9543 WOW (+3902.32 WOW unconfirmed)"
|
||||||
|
property bool wsConnected: false
|
||||||
|
property int connectionStatus: Wallet.ConnectionStatus_Disconnected;
|
||||||
|
|
||||||
|
property var balance: 0.0
|
||||||
|
property var spendable: 0.0
|
||||||
|
|
||||||
|
property DashboardPage dashboardPage: DashboardPage {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property AboutPage aboutPage: AboutPage {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property WalletPage walletPage: WalletPage {
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
MyDialogOkPopup {
|
||||||
|
id: messagePopup
|
||||||
|
function showMessage(title, text) {
|
||||||
|
dialogTitle = title
|
||||||
|
dialogText = text
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: enterPasswordDialog
|
||||||
|
dialogTitle: "Enter Password"
|
||||||
|
dialogWidth: 700
|
||||||
|
dialogHeight: 400
|
||||||
|
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
text: "Password: "
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: walletOpenPassword
|
||||||
|
keyBoardUID: 590
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
walletOpenPassword.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if(walletOpenPassword.text === "")
|
||||||
|
return messagePopup.showMessage("Password empty", "Please fill in a password.");
|
||||||
|
|
||||||
|
ctx.onOpenWallet(appWindow.walletPath, walletOpenPassword.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function openPopup() {
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: createWalletDialog
|
||||||
|
dialogTitle: "Create New Wallet"
|
||||||
|
dialogWidth: 700
|
||||||
|
dialogHeight: 400
|
||||||
|
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
text: "Name: "
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: newWalletName
|
||||||
|
keyBoardUID: 590
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
newWalletName.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
text: "Password: "
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: newWalletPassword
|
||||||
|
keyBoardUID: 591
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
newWalletPassword.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
fontSize: 16
|
||||||
|
text: "The password field is optional."
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if(newWalletName.text === "")
|
||||||
|
return messagePopup.showMessage("Invalid name", "Please name the wallet.");
|
||||||
|
|
||||||
|
ctx.createWalletWithoutSpecifyingSeed(newWalletName.text, newWalletPassword.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function openPopup() {
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView {
|
||||||
|
id: mainView
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
pushEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: mainView.width
|
||||||
|
to: 0
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pushExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: -mainView.width
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: -mainView.width
|
||||||
|
to: 0
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: mainView.width
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initialItem: dashboardPage
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
dashboardPage.onPageCompleted();
|
||||||
|
|
||||||
|
if(typeof ctx !== 'undefined') {
|
||||||
|
ctx.initTor();
|
||||||
|
ctx.initWS();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: ctx
|
||||||
|
|
||||||
|
function onWsConnected() {
|
||||||
|
console.log("onWsConnected")
|
||||||
|
appWindow.wsConnected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWsDisconnected() {
|
||||||
|
console.log("onWsDisconnected")
|
||||||
|
appWindow.wsConnected = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletOpened(wallet) {
|
||||||
|
console.log("onWalletOpened()");
|
||||||
|
|
||||||
|
appWindow.currentWallet = wallet;
|
||||||
|
appWindow.walletTitle = ctx.walletName;
|
||||||
|
mainView.push(appWindow.walletPage);
|
||||||
|
appWindow.walletPage.onPageCompleted();
|
||||||
|
|
||||||
|
appWindow.currentWallet.connectionStatusChanged.connect(onConnectionStatusChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
// function onWalletOpened(Wallet *wallet) {
|
||||||
|
|
||||||
|
// currentWallet.heightRefreshed.connect(onHeightRefreshed);
|
||||||
|
// currentWallet.refreshed.connect(onWalletRefresh)
|
||||||
|
// currentWallet.updated.connect(onWalletUpdate)
|
||||||
|
// currentWallet.newBlock.connect(onWalletNewBlock)
|
||||||
|
// currentWallet.moneySpent.connect(onWalletMoneySent)
|
||||||
|
// currentWallet.moneyReceived.connect(onWalletMoneyReceived)
|
||||||
|
// currentWallet.unconfirmedMoneyReceived.connect(onWalletUnconfirmedMoneyReceived)
|
||||||
|
// currentWallet.transactionCreated.connect(onTransactionCreated)
|
||||||
|
// currentWallet.connectionStatusChanged.connect(onWalletConnectionStatusChanged)
|
||||||
|
// currentWallet.deviceButtonRequest.connect(onDeviceButtonRequest);
|
||||||
|
// currentWallet.deviceButtonPressed.connect(onDeviceButtonPressed);
|
||||||
|
// currentWallet.walletPassphraseNeeded.connect(onWalletPassphraseNeededWallet);
|
||||||
|
// currentWallet.transactionCommitted.connect(onTransactionCommitted);
|
||||||
|
|
||||||
|
// middlePanel.paymentClicked.connect(handlePayment);
|
||||||
|
// }
|
||||||
|
|
||||||
|
function onBlockchainSync(height, target) {
|
||||||
|
let blocks = (target > height) ? (target - height) : "?";
|
||||||
|
let heightText = "Blockchain sync: " + blocks + " blocks remaining";
|
||||||
|
appWindow.statusText = heightText;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onRefreshSync(height, target) {
|
||||||
|
let blocks = (target >= height) ? (target - height) : "?";
|
||||||
|
let heightText = "Wallet sync: " + blocks + " blocks remaining";
|
||||||
|
appWindow.statusText = heightText;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletClosed() {
|
||||||
|
console.log("onWalletClosed");
|
||||||
|
|
||||||
|
appWindow.currentWallet.connectionStatusChanged.disconnect(onConnectionStatusChanged);
|
||||||
|
|
||||||
|
appWindow.walletTitle = "";
|
||||||
|
appWindow.balanceFormatted = "";
|
||||||
|
appWindow.balance = 0.0;
|
||||||
|
appWindow.spendable = 0.0;
|
||||||
|
appWindow.connectionStatus = Wallet.ConnectionStatus_Disconnected;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onBalanceUpdatedFormatted(fmt) {
|
||||||
|
appWindow.balanceFormatted = fmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onBalanceUpdated(balance, spendable) {
|
||||||
|
appWindow.balance = balance;
|
||||||
|
appWindow.spendable = spendable;
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletOpenedError(err) {
|
||||||
|
messagePopup.showMessage("Error", err);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletCreatedError(err) {
|
||||||
|
messagePopup.showMessage("Error", err);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletCreated(wallet) {
|
||||||
|
console.log("walletCreated");
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSynchronized() {
|
||||||
|
appWindow.statusText = "Synchronized";
|
||||||
|
|
||||||
|
appWindow.onConnectionStatusChanged(Wallet.ConnectionStatus_Connected);
|
||||||
|
console.log("onSynchronized");
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWalletOpenPasswordNeeded(invalidPassword, path) { // bool, str
|
||||||
|
enterPasswordDialog.openPopup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onInitiateTransaction() {
|
||||||
|
console.log("transactionStarted");
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCreateTransactionError(message) { // str
|
||||||
|
console.log("transactionError", message);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onCreateTransactionSuccess(tx, address) { // PendingTransaction
|
||||||
|
// auto-commit all tx's
|
||||||
|
//m_ctx->currentWallet->commitTransactionAsync(tx);
|
||||||
|
console.log("onCreateTransactionSuccess", address)
|
||||||
|
}
|
||||||
|
|
||||||
|
function onTransactionCommitted(status, tx, txid) { // bool,PendingTransaction,stringlist
|
||||||
|
console.log("onTransactionCommitted", status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onConnectionStatusChanged(status) {
|
||||||
|
console.log("onConnectionStatusChanged", status)
|
||||||
|
appWindow.connectionStatus = status;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file alias="backarrow">assets/img/common/backarrow.svg</file>
|
||||||
|
<file alias="box_checkmark">assets/img/common/check.svg</file>
|
||||||
|
<file alias="on">assets/img/audio/speaker/speaker_on.svg</file>
|
||||||
|
<file alias="off">assets/img/audio/speaker/speaker_off.svg</file>
|
||||||
|
<file alias="play_pause">assets/img/audio/media_keys/outline_play_pause_white_24dp.svg</file>
|
||||||
|
<file alias="next">assets/img/audio/media_keys/outline_skip_next_white_24dp.svg</file>
|
||||||
|
<file alias="previous">assets/img/audio/media_keys/outline_skip_previous_white_24dp.svg</file>
|
||||||
|
<file alias="stop">assets/img/audio/media_keys/outline_stop_white_24dp.svg</file>
|
||||||
|
<file alias="audio_tab_icon">assets/img/main_menu_icons/audio_tab_icon.svg</file>
|
||||||
|
<file alias="bindings_tab_icon">assets/img/main_menu_icons/bindings_tab_icon.svg</file>
|
||||||
|
<file alias="chaperone_tab_icon">assets/img/main_menu_icons/chaperone_tab_icon.svg</file>
|
||||||
|
<file alias="motion_tab_icon">assets/img/main_menu_icons/motion_tab_icon.svg</file>
|
||||||
|
<file alias="offsets_tab_icon">assets/img/main_menu_icons/offsets_tab_icon.svg</file>
|
||||||
|
<file alias="settings_tab_icon">assets/img/main_menu_icons/settings_tab_icon.svg</file>
|
||||||
|
<file alias="space_fix_tab_icon">assets/img/main_menu_icons/space_fix_tab_icon.svg</file>
|
||||||
|
<file alias="statistics_tab_icon">assets/img/main_menu_icons/statistics_tab_icon.svg</file>
|
||||||
|
<file alias="steamvr_tab_icon">assets/img/main_menu_icons/steamvr_tab_icon.svg</file>
|
||||||
|
<file alias="utilities_tab_icon">assets/img/main_menu_icons/utilities_tab_icon.svg</file>
|
||||||
|
<file alias="video_tab_icon">assets/img/main_menu_icons/video_tab_icon.svg</file>
|
||||||
|
<file alias="rotation_tab_icon">assets/img/main_menu_icons/rotation_tab_icon.svg</file>
|
||||||
|
<file alias="send_icon">assets/img/send.png</file>
|
||||||
|
<file alias="receive_icon">assets/img/receive.svg</file>
|
||||||
|
<file alias="info_icon">assets/img/info.png</file>
|
||||||
|
<file alias="checkmark_icon">assets/img/confirmed.png</file>
|
||||||
|
<file alias="expired_icon">assets/img/expired.png</file>
|
||||||
|
<file alias="illuminati">assets/img/illuminati.png</file>
|
||||||
|
<file alias="chest">assets/img/chest.png</file>
|
||||||
|
<file alias="tutorial">assets/img/tutorial.png</file>
|
||||||
|
<file alias="wizard">assets/img/wizard.png</file>
|
||||||
|
<file alias="hypnotoad">assets/img/hypnotoad.png</file>
|
||||||
|
<file alias="grass">assets/img/grass.png</file>
|
||||||
|
<file alias="dog">assets/img/dog.gif</file>
|
||||||
|
<file alias="dog2">assets/img/dog2.gif</file>
|
||||||
|
<file alias="cpus">assets/img/cpus.png</file>
|
||||||
|
|
||||||
|
<file alias="status_disconnected">assets/img/status_disconnected.svg</file>
|
||||||
|
<file alias="status_connected">assets/img/status_connected.svg</file>
|
||||||
|
<file alias="status_waiting">assets/img/status_waiting.svg</file>
|
||||||
|
<file alias="status_lagging">assets/img/status_lagging.svg</file>
|
||||||
|
|
||||||
|
<file>mock/NetworkType.js</file>
|
||||||
|
<file>mock/OverlayController.js</file>
|
||||||
|
<file>mock/Settings.js</file>
|
||||||
|
<file>mock/Translation.js</file>
|
||||||
|
<file>mock/Version.js</file>
|
||||||
|
<file>mock/Windows.js</file>
|
||||||
|
|
||||||
|
<file alias="main">main.qml</file>
|
||||||
|
<file>qml/common/HourComboBox.qml</file>
|
||||||
|
<file>qml/common/MinuteSecondComboBox.qml</file>
|
||||||
|
<file>qml/common/MyDialogOkCancelPopup.qml</file>
|
||||||
|
<file>qml/common/MyResources.qml</file>
|
||||||
|
<file>qml/common/MyTextField.qml</file>
|
||||||
|
<file>qml/common/MyRadioButton.qml</file>
|
||||||
|
<file>qml/common/MyDialogOkPopup.qml</file>
|
||||||
|
<file>qml/common/MyPushButton2.qml</file>
|
||||||
|
<file>qml/common/MyComboBox.qml</file>
|
||||||
|
<file>qml/common/TimeAssembly.qml</file>
|
||||||
|
<file>qml/common/LineSeparator.qml</file>
|
||||||
|
<file>qml/common/FullWidthSliderBox.qml</file>
|
||||||
|
<file>qml/common/MyText.qml</file>
|
||||||
|
<file>qml/common/MyToggleButton.qml</file>
|
||||||
|
<file>qml/common/MyPushButton.qml</file>
|
||||||
|
<file>qml/common/MySlider.qml</file>
|
||||||
|
<file>qml/common/mainwidget.qml</file>
|
||||||
|
<file>qml/common/MyNumPad.qml</file>
|
||||||
|
<file>qml/common/MyNumPadButton.qml</file>
|
||||||
|
<file>qml/common/MyNumPadSendAmount.qml</file>
|
||||||
|
<file>qml/common/MyStackViewPage.qml</file>
|
||||||
|
<file>qml/wallet/ReceivePage.qml</file>
|
||||||
|
<file>qml/wallet/HistoryTable.qml</file>
|
||||||
|
<file>qml/wallet/WalletDashBoardPage.qml</file>
|
||||||
|
|
||||||
|
<file>qml/DashboardPage.qml</file>
|
||||||
|
<file>qml/WalletPage.qml</file>
|
||||||
|
<file>qml/AboutPage.qml</file>
|
||||||
|
|
||||||
|
<file>qml/wallet/send/SendPage.qml</file>
|
||||||
|
<file>qml/wallet/send/SendPageDashboard.qml</file>
|
||||||
|
<file>qml/wallet/send/SendPageNavBack.qml</file>
|
||||||
|
<file>qml/wallet/send/SendPagePIN.qml</file>
|
||||||
|
<file>qml/wallet/send/SendPageQR.qml</file>
|
||||||
|
<file>qml/wallet/send/SendPageTransfer.qml</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
@ -0,0 +1,78 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
|
||||||
|
import "."
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: root
|
||||||
|
spacing: 30
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 40
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
Layout.rightMargin: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 200
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.preferredWidth: 256
|
||||||
|
Layout.maximumWidth: 256
|
||||||
|
|
||||||
|
Image {
|
||||||
|
Layout.preferredHeight: 256
|
||||||
|
Layout.preferredWidth: 256
|
||||||
|
|
||||||
|
source: "qrc:/illuminati"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.preferredWidth: 256
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
Layout.rightMargin: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: "Wowlet VR is an alternative QML interface for wowlet and was made over a 4 week period by eating lots of pizzas. It is the world's first cryptocurrency wallet with support for VR. Wowlet is Free and open-source (BSD-3) software and the source code can be studied on git.wownero.com/wowlet/wowlet"
|
||||||
|
wrap: true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
Layout.rightMargin: 40
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: "By \"dsc\" - April 2021. Shoutouts: OpenVR-AdvancedSettings, qvqc, Gatto, cisme, wowario, lza_menace, jwinterm, nioc, asymptotically, azy, selsta, kico, laura, thrmo, rottensox, solar, bl4sty, scoobybejesus (sorry if I forgot anyone!)"
|
||||||
|
wrap: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
text: "Back"
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
Layout.preferredWidth: 220
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
mainView.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted(previousView){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OverlayController.exitApp();
|
@ -0,0 +1,12 @@
|
|||||||
|
// import QtQuick 2.7
|
||||||
|
// import QtQuick.Controls 2.0
|
||||||
|
// import QtQuick.Layouts 1.2
|
||||||
|
// import QtGraphicalEffects 1.0
|
||||||
|
// import QtQuick.Window 2.0
|
||||||
|
// import QtQuick.Controls.Styles 1.4
|
||||||
|
// import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
|
// //import ovrwow.wowletvr 1.0
|
||||||
|
|
||||||
|
// import "common"
|
||||||
|
|
@ -0,0 +1,183 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
|
||||||
|
import wowlet.NetworkType 1.0
|
||||||
|
import wowlet.WalletKeysFiles 1.0
|
||||||
|
|
||||||
|
import "."
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: root
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
|
||||||
|
property var walletList: [];
|
||||||
|
property string enteredColor: "#365473"
|
||||||
|
property string exitedColor: "#2c435d"
|
||||||
|
property string pressedColor: "#406288"
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 128
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
Layout.rightMargin: 40
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
MyText {
|
||||||
|
text: "Welcome to Wowlet VR"
|
||||||
|
font.pointSize: 24
|
||||||
|
Layout.leftMargin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 720
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MyText{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
fontSize: 14
|
||||||
|
text: "Version 0.1 (Qt " + qtRuntimeVersion + ")"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Flow {
|
||||||
|
id: flow
|
||||||
|
spacing: 20
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
property int itemHeight: 192
|
||||||
|
property int maxRows: 6
|
||||||
|
|
||||||
|
Layout.topMargin: 30
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: recentList
|
||||||
|
clip: true
|
||||||
|
model: walletList
|
||||||
|
|
||||||
|
delegate: Rectangle {
|
||||||
|
// inherited roles from walletKeysFilesModel:
|
||||||
|
// index, fileName, modified, accessed, path, networktype, address
|
||||||
|
// @TODO: maybe enforce networktype === 0 (mainnet)
|
||||||
|
|
||||||
|
id: item
|
||||||
|
property var currentItem: walletList[index]
|
||||||
|
property bool about: currentItem.hasOwnProperty("about")
|
||||||
|
property bool create: currentItem.hasOwnProperty("create")
|
||||||
|
color: root.enteredColor
|
||||||
|
height: 256
|
||||||
|
width: 256
|
||||||
|
|
||||||
|
Image {
|
||||||
|
width: 182
|
||||||
|
height: 182
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 10
|
||||||
|
source: {
|
||||||
|
if(about) {
|
||||||
|
return "qrc:/hypnotoad";
|
||||||
|
} else if(create) {
|
||||||
|
return "qrc:/wizard";
|
||||||
|
} else {
|
||||||
|
return "qrc:/chest";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
color: "white"
|
||||||
|
text: {
|
||||||
|
if(about) {
|
||||||
|
return "About";
|
||||||
|
} else if(create) {
|
||||||
|
return "Create wallet";
|
||||||
|
} else {
|
||||||
|
return currentItem['fileName'].replace(".keys", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
font.pointSize: 14
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 14
|
||||||
|
anchors.leftMargin: 14
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
|
onEntered: {
|
||||||
|
parent.color = root.pressedColor
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
parent.color = root.enteredColor;
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
if(about) {
|
||||||
|
mainView.push(aboutPage);
|
||||||
|
} else if(create) {
|
||||||
|
createWalletDialog.openPopup();
|
||||||
|
} else {
|
||||||
|
appWindow.walletPath = currentItem['path'];
|
||||||
|
ctx.onOpenWallet(currentItem['path'], "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted(previousView){
|
||||||
|
console.log("list wallets");
|
||||||
|
|
||||||
|
let wallets = [];
|
||||||
|
if(typeof ctx !== 'undefined')
|
||||||
|
wallets = ctx.listWallets();
|
||||||
|
|
||||||
|
let _walletList = [];
|
||||||
|
|
||||||
|
for(var i = 0; i != wallets.length; i++) {
|
||||||
|
if(i == 8) // draw 10 items at any time
|
||||||
|
break;
|
||||||
|
_walletList.push(wallets[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
_walletList.push({"create": true});
|
||||||
|
_walletList.push({"about": true});
|
||||||
|
|
||||||
|
root.walletList = _walletList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OverlayController.exitApp();
|
@ -0,0 +1,82 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick.Window 2.0
|
||||||
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
|
import "."
|
||||||
|
import "common"
|
||||||
|
import "wallet"
|
||||||
|
import "wallet/send"
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
property WalletDashBoardPage walletDashboardPage: WalletDashBoardPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property SendPage sendPage: SendPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property ReceivePage receivePage: ReceivePage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView {
|
||||||
|
id: walletView
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
pushEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: walletView.width
|
||||||
|
to: 0
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pushExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: -walletView.width
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: -walletView.width
|
||||||
|
to: 0
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: walletView.width
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initialItem: walletDashboardPage
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted() {
|
||||||
|
walletDashboardPage.onPageCompleted();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
||||||
|
GroupBox {
|
||||||
|
// Public properties
|
||||||
|
// Overload
|
||||||
|
property alias headerMessage: headerText.text
|
||||||
|
property alias sliderText: steamDesktopForwardText.text
|
||||||
|
property alias sliderValue: steamDesktopForwardSlider.value
|
||||||
|
property alias lowerLimit: steamDesktopForwardSlider.from
|
||||||
|
property alias upperLimit: steamDesktopForwardSlider.to
|
||||||
|
property alias kbUID: steamDesktopForwardText.keyBoardUID
|
||||||
|
|
||||||
|
|
||||||
|
function onValueChanged(value) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onComponentComplete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Private properties
|
||||||
|
id: sliderBox
|
||||||
|
Layout.fillWidth: true
|
||||||
|
label: MyText {
|
||||||
|
id: headerText
|
||||||
|
leftPadding: 10
|
||||||
|
text: "MISSING HEADER TEXT"
|
||||||
|
bottomPadding: -10
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
color: "transparent"
|
||||||
|
border.color: "#ffffff"
|
||||||
|
radius: 8
|
||||||
|
}
|
||||||
|
|
||||||
|
property real sliderStepSize: 0.10
|
||||||
|
readonly property real rightLeftLimit: 4.0
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
LineSeparator {
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
MyPushButton2 {
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
text: "-"
|
||||||
|
onClicked: {
|
||||||
|
steamDesktopForwardSlider.value -= sliderStepSize
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MySlider {
|
||||||
|
id: steamDesktopForwardSlider
|
||||||
|
from: -rightLeftLimit
|
||||||
|
to: rightLeftLimit
|
||||||
|
stepSize: sliderStepSize
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onValueChanged: {
|
||||||
|
sliderBox.onValueChanged(this.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
text: "+"
|
||||||
|
onClicked: {
|
||||||
|
steamDesktopForwardSlider.value += sliderStepSize
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyTextField {
|
||||||
|
id: steamDesktopForwardText
|
||||||
|
text: "0.0"
|
||||||
|
keyBoardUID: 611
|
||||||
|
Layout.preferredWidth: 100
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
sliderBox.onComponentComplete()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
||||||
|
MyComboBox {
|
||||||
|
|
||||||
|
model: [
|
||||||
|
{ value: 0, text: "00" },
|
||||||
|
{ value: 1, text: "01" },
|
||||||
|
{ value: 2, text: "02" },
|
||||||
|
{ value: 3, text: "03" },
|
||||||
|
{ value: 4, text: "04" },
|
||||||
|
{ value: 5, text: "05" },
|
||||||
|
{ value: 6, text: "06" },
|
||||||
|
{ value: 7, text: "07" },
|
||||||
|
{ value: 8, text: "08" },
|
||||||
|
{ value: 9, text: "09" },
|
||||||
|
{ value: 10, text: "10" },
|
||||||
|
{ value: 11, text: "11" },
|
||||||
|
{ value: 12, text: "12" },
|
||||||
|
{ value: 13, text: "13" },
|
||||||
|
{ value: 14, text: "14" },
|
||||||
|
{ value: 15, text: "15" },
|
||||||
|
{ value: 16, text: "16" },
|
||||||
|
{ value: 17, text: "17" },
|
||||||
|
{ value: 18, text: "18" },
|
||||||
|
{ value: 19, text: "19" },
|
||||||
|
{ value: 20, text: "20" },
|
||||||
|
{ value: 21, text: "21" },
|
||||||
|
{ value: 22, text: "22" },
|
||||||
|
{ value: 23, text: "23" },
|
||||||
|
]
|
||||||
|
|
||||||
|
delegate: ItemDelegate {
|
||||||
|
width: parent.width
|
||||||
|
text: modelData.text
|
||||||
|
hoverEnabled: true
|
||||||
|
contentItem: MyText {
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: parent.text
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
// Necessary for the project specific Components.
|
||||||
|
import ".."
|
||||||
|
|
||||||
|
// Insert inside a ColumnLayout containing this and a RowLayout
|
||||||
|
// to neatly separate header and buttons.
|
||||||
|
Rectangle {
|
||||||
|
color: "#ffffff"
|
||||||
|
height: 1
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.bottomMargin: 5
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
||||||
|
MyComboBox {
|
||||||
|
|
||||||
|
model: [
|
||||||
|
{ value: 0, text: "00" },
|
||||||
|
{ value: 1, text: "01" },
|
||||||
|
{ value: 2, text: "02" },
|
||||||
|
{ value: 3, text: "03" },
|
||||||
|
{ value: 4, text: "04" },
|
||||||
|
{ value: 5, text: "05" },
|
||||||
|
{ value: 6, text: "06" },
|
||||||
|
{ value: 7, text: "07" },
|
||||||
|
{ value: 8, text: "08" },
|
||||||
|
{ value: 9, text: "09" },
|
||||||
|
{ value: 10, text: "10" },
|
||||||
|
{ value: 11, text: "11" },
|
||||||
|
{ value: 12, text: "12" },
|
||||||
|
{ value: 13, text: "13" },
|
||||||
|
{ value: 14, text: "14" },
|
||||||
|
{ value: 15, text: "15" },
|
||||||
|
{ value: 16, text: "16" },
|
||||||
|
{ value: 17, text: "17" },
|
||||||
|
{ value: 18, text: "18" },
|
||||||
|
{ value: 19, text: "19" },
|
||||||
|
{ value: 20, text: "20" },
|
||||||
|
{ value: 21, text: "21" },
|
||||||
|
{ value: 22, text: "22" },
|
||||||
|
{ value: 23, text: "23" },
|
||||||
|
{ value: 24, text: "24" },
|
||||||
|
{ value: 25, text: "25" },
|
||||||
|
{ value: 26, text: "26" },
|
||||||
|
{ value: 27, text: "27" },
|
||||||
|
{ value: 28, text: "28" },
|
||||||
|
{ value: 29, text: "29" },
|
||||||
|
{ value: 30, text: "30" },
|
||||||
|
{ value: 31, text: "31" },
|
||||||
|
{ value: 32, text: "32" },
|
||||||
|
{ value: 33, text: "33" },
|
||||||
|
{ value: 34, text: "34" },
|
||||||
|
{ value: 35, text: "35" },
|
||||||
|
{ value: 36, text: "36" },
|
||||||
|
{ value: 37, text: "37" },
|
||||||
|
{ value: 38, text: "38" },
|
||||||
|
{ value: 39, text: "39" },
|
||||||
|
{ value: 40, text: "40" },
|
||||||
|
{ value: 41, text: "41" },
|
||||||
|
{ value: 42, text: "42" },
|
||||||
|
{ value: 43, text: "43" },
|
||||||
|
{ value: 44, text: "44" },
|
||||||
|
{ value: 45, text: "45" },
|
||||||
|
{ value: 46, text: "46" },
|
||||||
|
{ value: 47, text: "47" },
|
||||||
|
{ value: 48, text: "48" },
|
||||||
|
{ value: 49, text: "49" },
|
||||||
|
{ value: 50, text: "50" },
|
||||||
|
{ value: 51, text: "51" },
|
||||||
|
{ value: 52, text: "52" },
|
||||||
|
{ value: 53, text: "53" },
|
||||||
|
{ value: 54, text: "54" },
|
||||||
|
{ value: 55, text: "55" },
|
||||||
|
{ value: 56, text: "56" },
|
||||||
|
{ value: 57, text: "57" },
|
||||||
|
{ value: 58, text: "58" },
|
||||||
|
{ value: 59, text: "59" }
|
||||||
|
]
|
||||||
|
|
||||||
|
delegate: ItemDelegate {
|
||||||
|
width: parent.width
|
||||||
|
text: modelData.text
|
||||||
|
hoverEnabled: true
|
||||||
|
contentItem: MyText {
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: parent.text
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,73 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
id: myComboBox
|
||||||
|
hoverEnabled: true
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.pressed ? "#406288" : (parent.activeFocus ? "#365473" : "#2c435d")
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: MyText {
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: parent.indicator.width + parent.spacing
|
||||||
|
text: parent.displayText
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate: ItemDelegate {
|
||||||
|
width: myComboBox.width
|
||||||
|
text: modelData
|
||||||
|
hoverEnabled: true
|
||||||
|
contentItem: MyText {
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: parent.text
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.pressed ? "#406288" : (parent.hovered ? "#365473" : "#2c435d")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
indicator: Canvas {
|
||||||
|
x: parent.width - width - parent.rightPadding
|
||||||
|
y: parent.topPadding + (parent.availableHeight - height) / 2
|
||||||
|
width: 13
|
||||||
|
height: 7
|
||||||
|
contextType: "2d"
|
||||||
|
|
||||||
|
onPaint: {
|
||||||
|
if (!context) {
|
||||||
|
getContext("2d")
|
||||||
|
}
|
||||||
|
context.reset();
|
||||||
|
context.lineWidth = 2
|
||||||
|
context.moveTo(1, 1);
|
||||||
|
context.lineTo(Math.ceil(width / 2), height - 1);
|
||||||
|
context.lineTo(width - 1, 1);
|
||||||
|
context.strokeStyle = "#ffffff"
|
||||||
|
context.stroke()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onActivated: {
|
||||||
|
if (activeFocus) {
|
||||||
|
MyResources.playActivationSound()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
popup.background.color = "#2c435d"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: myDialogPopup
|
||||||
|
|
||||||
|
implicitHeight: parent.height
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
property string dialogTitle: ""
|
||||||
|
property string dialogText: ""
|
||||||
|
property int dialogWidth: 600
|
||||||
|
property int dialogHeight: 300
|
||||||
|
|
||||||
|
property Item dialogContentItem: MyText {
|
||||||
|
text: dialogText
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool okClicked: false
|
||||||
|
|
||||||
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.8
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Item {
|
||||||
|
Rectangle {
|
||||||
|
implicitWidth: dialogWidth
|
||||||
|
implicitHeight: dialogHeight
|
||||||
|
anchors.centerIn: parent
|
||||||
|
radius: 24
|
||||||
|
color: "#1b2939"
|
||||||
|
border.color: "#cccccc"
|
||||||
|
border.width: 2
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 12
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
text: dialogTitle
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
id: dialogContent
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 24
|
||||||
|
Layout.rightMargin: 24
|
||||||
|
Layout.bottomMargin: 12
|
||||||
|
MyPushButton {
|
||||||
|
implicitWidth: 200
|
||||||
|
text: "Ok"
|
||||||
|
onClicked: {
|
||||||
|
okClicked = true
|
||||||
|
myDialogPopup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
implicitWidth: 200
|
||||||
|
text: "Cancel"
|
||||||
|
onClicked: {
|
||||||
|
okClicked = false
|
||||||
|
myDialogPopup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
dialogContentItem.parent = dialogContent
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: myDialogPopup
|
||||||
|
|
||||||
|
implicitHeight: parent.height
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
property string dialogTitle: ""
|
||||||
|
property string dialogText: ""
|
||||||
|
property int dialogWidth: 800
|
||||||
|
property int dialogHeight: 300
|
||||||
|
|
||||||
|
property Item dialogContentItem: MyText {
|
||||||
|
fontSize:16
|
||||||
|
text: dialogText
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool okClicked: false
|
||||||
|
|
||||||
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.8
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: Item {
|
||||||
|
Rectangle {
|
||||||
|
implicitWidth: dialogWidth
|
||||||
|
implicitHeight: dialogHeight
|
||||||
|
anchors.centerIn: parent
|
||||||
|
radius: 24
|
||||||
|
color: "#1b2939"
|
||||||
|
border.color: "#cccccc"
|
||||||
|
border.width: 2
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: 12
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
text: dialogTitle
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
id: dialogContent
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 24
|
||||||
|
Layout.rightMargin: 24
|
||||||
|
Layout.bottomMargin: 12
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
implicitWidth: 200
|
||||||
|
text: "Ok"
|
||||||
|
onClicked: {
|
||||||
|
okClicked = true
|
||||||
|
myDialogPopup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
dialogContentItem.parent = dialogContent
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,136 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import "."
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: root
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
property double disabledOpacity: 0.4
|
||||||
|
property var code: [];
|
||||||
|
|
||||||
|
signal resolvePressed();
|
||||||
|
signal codeUpdated(var pin_code);
|
||||||
|
|
||||||
|
function onButtonPress(val) {
|
||||||
|
code.push(val);
|
||||||
|
|
||||||
|
if(code.length === 5)
|
||||||
|
code = [val];
|
||||||
|
|
||||||
|
codeUpdated(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reset() {
|
||||||
|
root.code = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "1"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "2"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "3"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("3");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "4"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("4");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "5"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("5");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "6"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("6");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "7"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("7");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "8"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("8");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "9"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("9");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
text: "0"
|
||||||
|
onClicked: {
|
||||||
|
onButtonPress("0");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
opacity: root.enabled ? 1 : disabledOpacity
|
||||||
|
|
||||||
|
Layout.preferredWidth: 204
|
||||||
|
fontSize: 16
|
||||||
|
text: "Clear"
|
||||||
|
onClicked: {
|
||||||
|
root.code = [0,0,0,0];
|
||||||
|
root.codeUpdated(root.code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
property string text: ""
|
||||||
|
property int fontSize: 22
|
||||||
|
property string enteredColor: "#365473"
|
||||||
|
property string exitedColor: "#2c435d"
|
||||||
|
property string pressedColor: "#406288"
|
||||||
|
property alias mouseArea: mouseArea
|
||||||
|
|
||||||
|
signal clicked;
|
||||||
|
|
||||||
|
Layout.preferredWidth: 92
|
||||||
|
Layout.preferredHeight: 92
|
||||||
|
color: root.exitedColor
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
color: "white"
|
||||||
|
text: root.text
|
||||||
|
fontSize: root.fontSize
|
||||||
|
fontBold: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: parent.color = root.enteredColor
|
||||||
|
onExited: parent.color = root.exitedColor
|
||||||
|
onPressed: parent.color = root.pressedColor
|
||||||
|
onClicked: {
|
||||||
|
root.clicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,172 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import "."
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: root
|
||||||
|
property double amount: 0.0;
|
||||||
|
property bool add: true;
|
||||||
|
|
||||||
|
property string enteredColor: "#365473"
|
||||||
|
property string exitedColor: "#2c435d"
|
||||||
|
property string pressedColor: "#406288"
|
||||||
|
|
||||||
|
signal amountUpdated(double amount);
|
||||||
|
|
||||||
|
spacing: 24
|
||||||
|
|
||||||
|
function reset() {
|
||||||
|
root.amount = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
id: minButton
|
||||||
|
mouseArea.enabled: false
|
||||||
|
fontSize: 18
|
||||||
|
|
||||||
|
Layout.preferredWidth: 128
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
|
||||||
|
color: root.add ? root.exitedColor : root.enteredColor
|
||||||
|
|
||||||
|
text: "-"
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
if(!root.add) return;
|
||||||
|
parent.color = root.enteredColor
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
if(!root.add) return;
|
||||||
|
parent.color = root.exitedColor
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
root.add = false;
|
||||||
|
plusButton.color = root.exitedColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
id: plusButton
|
||||||
|
mouseArea.enabled: false
|
||||||
|
fontSize: 18
|
||||||
|
|
||||||
|
Layout.preferredWidth: 128
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
|
||||||
|
color: root.add ? root.enteredColor : root.exitedColor
|
||||||
|
|
||||||
|
text: "+"
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
if(root.add) return;
|
||||||
|
parent.color = root.enteredColor
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
if(root.add) return;
|
||||||
|
parent.color = root.exitedColor
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
root.add = true;
|
||||||
|
minButton.color = root.exitedColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
width: 1
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 180
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "0.001"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 0.001 : root.amount -= 0.001;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 148
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "0.01"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 0.01 : root.amount -= 0.01;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 128
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "0.1"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 0.1 : root.amount -= 0.1;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 128
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "1"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 1.0 : root.amount -= 1.0;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 168
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "10"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 10.0 : root.amount -= 10.0;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 128
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "100"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 100.0 : root.amount -= 100.0;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyNumPadButton {
|
||||||
|
fontSize: 18
|
||||||
|
Layout.preferredWidth: 168
|
||||||
|
Layout.preferredHeight: 112
|
||||||
|
text: "1000"
|
||||||
|
onClicked: {
|
||||||
|
root.add ? root.amount += 1000.0 : root.amount -= 1000.0;
|
||||||
|
if(root.amount <= 0.0) root.amount = 0.0;
|
||||||
|
amountUpdated(root.amount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
property string text: "testy"
|
||||||
|
property string iconPath: ""
|
||||||
|
property bool hasIcon: iconPath !== ""
|
||||||
|
property bool hoverEnabled: true
|
||||||
|
property bool activationSoundEnabled: true
|
||||||
|
property string enteredColor: "#365473"
|
||||||
|
property string exitedColor: "#2c435d"
|
||||||
|
property string pressedColor: "#406288"
|
||||||
|
signal clicked;
|
||||||
|
|
||||||
|
Layout.preferredHeight: 70
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
Layout.minimumHeight: 54
|
||||||
|
|
||||||
|
Image {
|
||||||
|
visible: hasIcon
|
||||||
|
source: iconPath
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.rightMargin: 20
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: root.hasIcon ? 0 : 20
|
||||||
|
Layout.rightMargin: root.hasIcon ? 0 : 20
|
||||||
|
Layout.fillWidth: root.hasIcon ? true : false
|
||||||
|
Layout.alignment: root.hasIcon ? Qt.AlignLeft : Qt.AlignHCenter
|
||||||
|
text: root.text
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
z: root.z - 1
|
||||||
|
anchors.fill: root
|
||||||
|
Layout.fillWidth: root.Layout.fillWidth
|
||||||
|
color: root.down ? root.pressedColor : (root.activeFocus ? root.enteredColor : root.exitedColor)
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: parent.color = root.enteredColor
|
||||||
|
onExited: parent.color = root.exitedColor
|
||||||
|
onPressed: parent.color = root.pressedColor
|
||||||
|
onClicked: {
|
||||||
|
root.clicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
|
||||||
|
Button {
|
||||||
|
hoverEnabled: true
|
||||||
|
contentItem: MyText {
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: parent.text
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.down ? "#406288" : (parent.activeFocus ? "#365473" : "transparent")
|
||||||
|
border.color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
radius: 8
|
||||||
|
}
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
MyResources.playActivationSound()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
|
||||||
|
RadioButton {
|
||||||
|
hoverEnabled: true
|
||||||
|
contentItem: MyText {
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
text: parent.text
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
MyResources.playActivationSound()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
pragma Singleton
|
||||||
|
import QtQuick 2.7
|
||||||
|
|
||||||
|
|
||||||
|
QtObject {
|
||||||
|
function playActivationSound() {
|
||||||
|
OverlayController.playActivationSound()
|
||||||
|
}
|
||||||
|
function playFocusChangedSound() {
|
||||||
|
OverlayController.playFocusChangedSound()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Slider {
|
||||||
|
snapMode: Slider.SnapAlways
|
||||||
|
wheelEnabled: true
|
||||||
|
hoverEnabled: true
|
||||||
|
to: 1.0
|
||||||
|
from: 0.0
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
x: parent.leftPadding
|
||||||
|
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||||
|
width: parent.availableWidth
|
||||||
|
height: parent.availableHeight
|
||||||
|
radius: 2
|
||||||
|
color: parent.activeFocus ? "#2c435d" : "#1b2939"
|
||||||
|
Rectangle {
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
implicitHeight: 4
|
||||||
|
width: parent.width
|
||||||
|
height: implicitHeight
|
||||||
|
radius: 2
|
||||||
|
color: "#bdbebf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handle: Rectangle {
|
||||||
|
x: parent.leftPadding + parent.visualPosition * (parent.availableWidth - width)
|
||||||
|
y: parent.topPadding + parent.availableHeight / 2 - height / 2
|
||||||
|
implicitWidth: 20
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: 4
|
||||||
|
color: parent.pressed ? "#ffffff" : "#eeeeee"
|
||||||
|
border.color: "#bdbebf"
|
||||||
|
}
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onValueChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
//MyResources.playActivationSound()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,275 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
|
||||||
|
import "."
|
||||||
|
import ".."
|
||||||
|
|
||||||
|
import wowlet.Wallet 1.0
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "#1b2939"
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
|
||||||
|
property StackView stackView
|
||||||
|
property string headerText: "Header Title"
|
||||||
|
property bool headerShowBackButton: true
|
||||||
|
|
||||||
|
signal backClicked();
|
||||||
|
|
||||||
|
property Item header: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Button {
|
||||||
|
id: headerBackButton
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
Layout.preferredWidth: 50
|
||||||
|
hoverEnabled: true
|
||||||
|
enabled: headerShowBackButton
|
||||||
|
visible: headerShowBackButton
|
||||||
|
contentItem: Image {
|
||||||
|
source: "qrc:/backarrow"
|
||||||
|
sourceSize.width: 50
|
||||||
|
sourceSize.height: 50
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
background: Rectangle {
|
||||||
|
opacity: parent.down ? 1.0 : (parent.activeFocus ? 0.5 : 0.0)
|
||||||
|
color: "#406288"
|
||||||
|
radius: 4
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
backClicked();
|
||||||
|
stackView.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyText {
|
||||||
|
id: headerTitle
|
||||||
|
text: headerText
|
||||||
|
font.pointSize: 30
|
||||||
|
Layout.leftMargin: headerShowBackButton ? 32 : 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 720
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MyText{
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
fontSize: 14
|
||||||
|
fontBold: true
|
||||||
|
text: appWindow.balanceFormatted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property Item content: Frame {
|
||||||
|
MyText {
|
||||||
|
text: "Content"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: mainLayout
|
||||||
|
spacing: 12
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: testy66
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 64
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
anchors.leftMargin: 40
|
||||||
|
anchors.rightMargin: 40
|
||||||
|
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 30
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
Layout.preferredHeight: 64
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.leftMargin: 40
|
||||||
|
|
||||||
|
fontSize: 14
|
||||||
|
text: appWindow.statusText
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
fontSize: 14
|
||||||
|
text: "Daemon: "
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
opacity: 0.8
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
source: {
|
||||||
|
if(typeof Wallet == 'undefined')
|
||||||
|
return "qrc:/status_disconnected";
|
||||||
|
|
||||||
|
if(appWindow.connectionStatus == Wallet.ConnectionStatus_Connected){
|
||||||
|
return "qrc:/status_connected";
|
||||||
|
} else if(appWindow.connectionStatus == Wallet.ConnectionStatus_Connecting) {
|
||||||
|
return "qrc:/status_lagging";
|
||||||
|
} else {
|
||||||
|
return "qrc:/status_disconnected";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
fontSize: 14
|
||||||
|
text: "WS: "
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
opacity: 0.8
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
source: appWindow.wsConnected ? "qrc:/status_connected" : "qrc:/status_disconnected"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: 1
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
fontSize: 14
|
||||||
|
text: "Fiat: $0.05 USD"
|
||||||
|
color: "#cccccc"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rectangle {
|
||||||
|
// z: 100
|
||||||
|
// color: "black"
|
||||||
|
// height: 64
|
||||||
|
|
||||||
|
// // anchors.bottom: parent.bottom
|
||||||
|
// // anchors.left: parent.left
|
||||||
|
// // anchors.right: parent.right
|
||||||
|
|
||||||
|
// Rectangle {
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// anchors.left: parent.left
|
||||||
|
// anchors.right: parent.right
|
||||||
|
|
||||||
|
// anchors.leftMargin: 40
|
||||||
|
// anchors.rightMargin: 40
|
||||||
|
|
||||||
|
// color: "#cccccc"
|
||||||
|
// height: 1
|
||||||
|
// }
|
||||||
|
|
||||||
|
// RowLayout {
|
||||||
|
// spacing: 30
|
||||||
|
// anchors.left: parent.left
|
||||||
|
// anchors.leftMargin: 40
|
||||||
|
// anchors.rightMargin: 40
|
||||||
|
// anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
// MyText {
|
||||||
|
// fontSize: 14
|
||||||
|
// text: "Status: idle"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// MyText {
|
||||||
|
// fontSize: 14
|
||||||
|
// text: "WS: OK"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// MyText {
|
||||||
|
// fontSize: 14
|
||||||
|
// text: "Tor: OK"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// MyText {
|
||||||
|
// fontSize: 14
|
||||||
|
// text: "Height: OK"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
header.parent = mainLayout
|
||||||
|
header.Layout.leftMargin = 40
|
||||||
|
header.Layout.topMargin = 30
|
||||||
|
header.Layout.rightMargin = 40
|
||||||
|
content.parent = mainLayout
|
||||||
|
content.Layout.fillHeight = true
|
||||||
|
content.Layout.fillWidth = true
|
||||||
|
|
||||||
|
content.Layout.topMargin = 10
|
||||||
|
content.Layout.leftMargin = 40
|
||||||
|
content.Layout.rightMargin = 40
|
||||||
|
content.Layout.bottomMargin = 40
|
||||||
|
|
||||||
|
testy66.parent = mainLayout
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
|
||||||
|
|
||||||
|
Text {
|
||||||
|
property bool wrap: false
|
||||||
|
property int fontSize: 16
|
||||||
|
property bool fontBold: false
|
||||||
|
property string fontColor: "#ffffff"
|
||||||
|
|
||||||
|
color: fontColor
|
||||||
|
font.bold: fontBold
|
||||||
|
font.pointSize: fontSize
|
||||||
|
wrapMode: wrap ? Text.WordWrap : Text.NoWrap
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
property int keyBoardUID: 0
|
||||||
|
property string savedText: ""
|
||||||
|
property bool passwordField: false
|
||||||
|
|
||||||
|
id: myTextField
|
||||||
|
echoMode: passwordField ? TextInput.Password : TextInput.Normal
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
font.pointSize: 20
|
||||||
|
background: Button {
|
||||||
|
hoverEnabled: true
|
||||||
|
background: Rectangle {
|
||||||
|
color: parent.hovered ? "#2c435d" : "#1b2939"
|
||||||
|
border.color: "#cccccc"
|
||||||
|
border.width: 2
|
||||||
|
}
|
||||||
|
onClicked: {
|
||||||
|
myTextField.forceActiveFocus()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onActiveFocusChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
if (!OverlayController.desktopMode) {
|
||||||
|
OverlayController.showKeyboard(text, keyBoardUID)
|
||||||
|
} else {
|
||||||
|
savedText = text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onEditingFinished: {
|
||||||
|
if (OverlayController.desktopMode && savedText !== text) {
|
||||||
|
myTextField.onInputEvent(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function onInputEvent(input) {
|
||||||
|
text = input
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
// Needed for MyResources in the default folder.
|
||||||
|
import ".."
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
checkState: Qt.Checked
|
||||||
|
tristate: false
|
||||||
|
hoverEnabled: true
|
||||||
|
spacing: 12
|
||||||
|
|
||||||
|
indicator: Rectangle {
|
||||||
|
implicitWidth: 28
|
||||||
|
implicitHeight: 28
|
||||||
|
x: parent.leftPadding
|
||||||
|
y: parent.height / 2 - height / 2
|
||||||
|
color: parent.enabled ? (parent.down ? "#e0e0e0" : "#ffffff") : "#a0a0a0"
|
||||||
|
border.width: 0
|
||||||
|
Path {
|
||||||
|
startX: 0
|
||||||
|
startY: 0
|
||||||
|
PathLine {
|
||||||
|
x: 40
|
||||||
|
y: 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
width: 28
|
||||||
|
height: 28
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
y: (parent.height - height) / 2
|
||||||
|
source: "qrc:/box_checkmark"
|
||||||
|
sourceSize.width: width
|
||||||
|
sourceSize.height: height
|
||||||
|
visible: parent.parent.checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
contentItem: MyText {
|
||||||
|
text: parent.text
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
leftPadding: parent.indicator.width + parent.spacing
|
||||||
|
color: parent.enabled ? "#ffffff" : "#909090"
|
||||||
|
}
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: "#2c435d"
|
||||||
|
opacity: parent.activeFocus ? 1.0 : 0
|
||||||
|
}
|
||||||
|
|
||||||
|
onHoveredChanged: {
|
||||||
|
if (hovered) {
|
||||||
|
forceActiveFocus()
|
||||||
|
} else {
|
||||||
|
focus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
MyResources.playActivationSound()
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
signal timeChanged(int hour, int minute, int second)
|
||||||
|
|
||||||
|
HourComboBox {
|
||||||
|
id: hourBox
|
||||||
|
Layout.preferredWidth: 60
|
||||||
|
onActivated: {
|
||||||
|
parent.timeChanged(hourBox.currentIndex,
|
||||||
|
minuteBox.currentIndex,
|
||||||
|
secondBox.currentIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyText {
|
||||||
|
text: "h"
|
||||||
|
}
|
||||||
|
|
||||||
|
MinuteSecondComboBox {
|
||||||
|
id: minuteBox
|
||||||
|
Layout.preferredWidth: 60
|
||||||
|
onActivated: {
|
||||||
|
parent.timeChanged(hourBox.currentIndex,
|
||||||
|
minuteBox.currentIndex,
|
||||||
|
secondBox.currentIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyText {
|
||||||
|
text: "m"
|
||||||
|
}
|
||||||
|
|
||||||
|
MinuteSecondComboBox {
|
||||||
|
id: secondBox
|
||||||
|
Layout.preferredWidth: 60
|
||||||
|
onActivated: {
|
||||||
|
parent.timeChanged(hourBox.currentIndex,
|
||||||
|
minuteBox.currentIndex,
|
||||||
|
secondBox.currentIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyText {
|
||||||
|
text: "s"
|
||||||
|
}
|
||||||
|
function changeTimer(hour, minute, second) {
|
||||||
|
hourBox.currentIndex = hour
|
||||||
|
minuteBox.currentIndex = minute
|
||||||
|
secondBox.currentIndex = second
|
||||||
|
hourBox.displayText = hour
|
||||||
|
minuteBox.displayText = minute
|
||||||
|
secondBox.displayText = second
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,128 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.0
|
||||||
|
import ".."
|
||||||
|
import "../utilities_page"
|
||||||
|
import "../audio_page"
|
||||||
|
import "../motion_page"
|
||||||
|
import "../video_page"
|
||||||
|
import "../chaperone_page"
|
||||||
|
import "../steamvr_page"
|
||||||
|
import "../rotation_page"
|
||||||
|
import "../chaperone_page/chaperone_additional"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: root
|
||||||
|
color: "#1b2939"
|
||||||
|
width: 1200
|
||||||
|
height: 800
|
||||||
|
|
||||||
|
property WalletDashboard WalletDashboard: WalletDashboard {
|
||||||
|
stackView: walletView
|
||||||
|
}
|
||||||
|
|
||||||
|
property SteamVRPage steamVRPage: SteamVRPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property ChaperonePage chaperonePage: ChaperonePage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property ChaperoneWarningsPage chaperoneWarningsPage: ChaperoneWarningsPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property ChaperoneAdditionalPage chaperoneAdditionalPage: ChaperoneAdditionalPage{
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property PlayspacePage playspacePage: PlayspacePage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property MotionPage motionPage: MotionPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property RotationPage rotationPage: RotationPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property FixFloorPage fixFloorPage: FixFloorPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property StatisticsPage statisticsPage: StatisticsPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property SettingsPage settingsPage: SettingsPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property AudioPage audioPage: AudioPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property UtilitiesPage utilitiesPage: UtilitiesPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property VideoPage videoPage: VideoPage {
|
||||||
|
stackView: walletView
|
||||||
|
visible:false
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView {
|
||||||
|
id: walletView
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
pushEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: walletView.width
|
||||||
|
to: 0
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pushExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: -walletView.width
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popEnter: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: -walletView.width
|
||||||
|
to: 0
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
popExit: Transition {
|
||||||
|
PropertyAnimation {
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: walletView.width
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
initialItem: WalletDashboard
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,189 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
|
||||||
|
import wowlet.Wallet 1.0
|
||||||
|
import wowlet.WalletManager 1.0
|
||||||
|
import wowlet.TransactionHistory 1.0
|
||||||
|
import wowlet.TransactionInfo 1.0
|
||||||
|
import wowlet.TransactionHistoryModel 1.0
|
||||||
|
import wowlet.TransactionHistoryProxyModel 1.0
|
||||||
|
|
||||||
|
import "../common"
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
property var modelx
|
||||||
|
|
||||||
|
property var txModelData: []
|
||||||
|
property int sideMargin: 20
|
||||||
|
|
||||||
|
ListModel { id: txListViewModel }
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
id: listView
|
||||||
|
visible: true
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: 10
|
||||||
|
model: modelx
|
||||||
|
interactive: false
|
||||||
|
|
||||||
|
delegate: Rectangle {
|
||||||
|
id: delegate
|
||||||
|
anchors.left: parent ? parent.left : undefined
|
||||||
|
anchors.right: parent ? parent.right : undefined
|
||||||
|
height: 54
|
||||||
|
color: "#2c435d"
|
||||||
|
|
||||||
|
property bool isout: false;
|
||||||
|
property string amount: "0";
|
||||||
|
property string description: "";
|
||||||
|
property string date: "2021-13-37";
|
||||||
|
|
||||||
|
property bool confirmed: false
|
||||||
|
property bool failed: false
|
||||||
|
property bool pending: false
|
||||||
|
property int confirmations: 0
|
||||||
|
property int confirmationsRequired: 0
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
isout = getTxData(index, TransactionHistoryModel.TransactionIsOutRole);
|
||||||
|
amount = getTxData(index, TransactionHistoryModel.Amount);
|
||||||
|
description = getTxData(index, TransactionHistoryModel.Description);
|
||||||
|
date = getTxData(index, TransactionHistoryModel.Date);
|
||||||
|
|
||||||
|
failed = getTxData(index, TransactionHistoryModel.TransactionFailedRole);
|
||||||
|
pending = getTxData(index, TransactionHistoryModel.TransactionPendingRole);
|
||||||
|
confirmations = getTxData(index, TransactionHistoryModel.TransactionConfirmationsRole);
|
||||||
|
confirmationsRequired = getTxData(index, TransactionHistoryModel.TransactionConfirmationsRequiredRole);
|
||||||
|
|
||||||
|
confirmed = confirmations >= confirmationsRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 0
|
||||||
|
clip: true
|
||||||
|
height: parent.height
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 56
|
||||||
|
Layout.fillHeight: true
|
||||||
|
color: "#406288"
|
||||||
|
|
||||||
|
Image {
|
||||||
|
width: 32
|
||||||
|
height: 32
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
source: {
|
||||||
|
if(failed) return "qrc:/assets/images/warning.png"
|
||||||
|
else if(pending) return "qrc:/assets/images/unconfirmed.png"
|
||||||
|
else if(!confirmed) return "qrc:/assets/images/clock1.png"
|
||||||
|
|
||||||
|
else return "qrc:/assets/images/confirmed.png"
|
||||||
|
//confirmed ? "qrc:/checkmark_icon" : "qrc:/expired_icon"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 300
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 10
|
||||||
|
Layout.fillHeight: true
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
// date
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
fontSize: 12
|
||||||
|
fontColor: "white"
|
||||||
|
text: date
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
parent.Layout.preferredWidth = width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
fontSize: 14
|
||||||
|
text: description !== "" ? description : "..."
|
||||||
|
fontColor: description !== "" ? "white" : "#cccccc"
|
||||||
|
Component.onCompleted: {
|
||||||
|
parent.Layout.preferredWidth = width;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.preferredWidth: 420
|
||||||
|
Layout.fillHeight: true
|
||||||
|
color: "#406288"
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
fontSize: 14
|
||||||
|
fontBold: true
|
||||||
|
text: amount
|
||||||
|
fontColor: !isout ? "#00d304" : "red"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
z: parent.z - 1
|
||||||
|
color: "transparent"
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
|
function getTxData(x, y) {
|
||||||
|
var idx = modelx.index(x, y);
|
||||||
|
return modelx.data(idx, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTransactionsFromModel() {
|
||||||
|
// This function copies the items of `appWindow.currentWallet.historyModel` to `root.txModelData`, as a list of javascript objects
|
||||||
|
if(appWindow.currentWallet == null || typeof appWindow.currentWallet.history === "undefined" ) return;
|
||||||
|
|
||||||
|
var _model = root.model;
|
||||||
|
var total = 0
|
||||||
|
var count = _model.rowCount()
|
||||||
|
root.txModelData = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted() {
|
||||||
|
if(currentWallet == null || typeof currentWallet.history === "undefined" ) return;
|
||||||
|
root.modelx = appWindow.currentWallet.historyModel;
|
||||||
|
//root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole;
|
||||||
|
//root.model.sort(0, Qt.DescendingOrder);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,266 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
import "."
|
||||||
|
import "../common"
|
||||||
|
|
||||||
|
MyStackViewPage {
|
||||||
|
headerText: "Receive"
|
||||||
|
|
||||||
|
MyDialogOkPopup {
|
||||||
|
id: chaperoneMessageDialog
|
||||||
|
function showMessage(title, text) {
|
||||||
|
dialogTitle = title
|
||||||
|
dialogText = text
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: chaperoneDeleteProfileDialog
|
||||||
|
property int profileIndex: -1
|
||||||
|
dialogTitle: "Delete Profile"
|
||||||
|
dialogText: "Do you really want to delete this profile?"
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
ChaperoneTabController.deleteChaperoneProfile(profileIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: chaperoneNewProfileDialog
|
||||||
|
dialogTitle: "Create New Profile"
|
||||||
|
dialogWidth: 800
|
||||||
|
dialogHeight: 780
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
MyText {
|
||||||
|
text: "Name: "
|
||||||
|
}
|
||||||
|
MyTextField {
|
||||||
|
id: chaperoneNewProfileName
|
||||||
|
keyBoardUID: 390
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
chaperoneNewProfileName.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyText {
|
||||||
|
Layout.topMargin: 24
|
||||||
|
text: "What to include:"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeGeometry
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Chaperone Geometry"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeStyle
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Chaperone Style"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeBoundsColor
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Chaperone Color"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeVisibility
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Visibility Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeFadeDistance
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Fade Distance Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeCenterMarker
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Center Marker Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludePlaySpaceMarker
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Play Space Marker Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeFloorBoundsMarker
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Floor Bounds Always On Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeForceBounds
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Force Bounds Setting"
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: chaperoneNewProfileIncludeProximityWarnings
|
||||||
|
Layout.leftMargin: 32
|
||||||
|
text: "Proximity Warning Settings"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if (chaperoneNewProfileName.text == "") {
|
||||||
|
chaperoneMessageDialog.showMessage("Create New Profile", "ERROR: Empty profile name.")
|
||||||
|
} else if (!chaperoneNewProfileIncludeGeometry.checked
|
||||||
|
&& !chaperoneNewProfileIncludeVisibility.checked
|
||||||
|
&& !chaperoneNewProfileIncludeFadeDistance.checked
|
||||||
|
&& !chaperoneNewProfileIncludeCenterMarker.checked
|
||||||
|
&& !chaperoneNewProfileIncludePlaySpaceMarker.checked
|
||||||
|
&& !chaperoneNewProfileIncludeFloorBoundsMarker.checked
|
||||||
|
&& !chaperoneNewProfileIncludeBoundsColor.checked
|
||||||
|
&& !chaperoneNewProfileIncludeStyle.checked
|
||||||
|
&& !chaperoneNewProfileIncludeForceBounds.checked
|
||||||
|
&& !chaperoneNewProfileIncludeProximityWarnings.checked) {
|
||||||
|
chaperoneMessageDialog.showMessage("Create New Profile", "ERROR: Nothing included.")
|
||||||
|
} else if ( Math.abs(MoveCenterTabController.offsetX) > 0.00000000001
|
||||||
|
|| Math.abs(MoveCenterTabController.offsetY) > 0.00000000001
|
||||||
|
|| Math.abs(MoveCenterTabController.offsetZ) > 0.00000000001
|
||||||
|
|| MoveCenterTabController.rotation !== 0) {
|
||||||
|
chaperoneMessageDialog.showMessage("Create New Profile", "ERROR: Offsets not reset.")
|
||||||
|
} else {
|
||||||
|
ChaperoneTabController.addChaperoneProfile(chaperoneNewProfileName.text,
|
||||||
|
chaperoneNewProfileIncludeGeometry.checked,
|
||||||
|
chaperoneNewProfileIncludeVisibility.checked,
|
||||||
|
chaperoneNewProfileIncludeFadeDistance.checked,
|
||||||
|
chaperoneNewProfileIncludeCenterMarker.checked,
|
||||||
|
chaperoneNewProfileIncludePlaySpaceMarker.checked,
|
||||||
|
chaperoneNewProfileIncludeFloorBoundsMarker.checked,
|
||||||
|
chaperoneNewProfileIncludeBoundsColor.checked,
|
||||||
|
chaperoneNewProfileIncludeStyle.checked,
|
||||||
|
chaperoneNewProfileIncludeForceBounds.checked,
|
||||||
|
chaperoneNewProfileIncludeProximityWarnings.checked)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function openPopup() {
|
||||||
|
chaperoneNewProfileName.text = ""
|
||||||
|
chaperoneNewProfileIncludeGeometry.checked = false
|
||||||
|
chaperoneNewProfileIncludeVisibility.checked = false
|
||||||
|
chaperoneNewProfileIncludeFadeDistance.checked = false
|
||||||
|
chaperoneNewProfileIncludeCenterMarker.checked = false
|
||||||
|
chaperoneNewProfileIncludePlaySpaceMarker.checked = false
|
||||||
|
chaperoneNewProfileIncludeFloorBoundsMarker.checked = false
|
||||||
|
chaperoneNewProfileIncludeBoundsColor.checked = false
|
||||||
|
chaperoneNewProfileIncludeStyle.checked = false
|
||||||
|
chaperoneNewProfileIncludeForceBounds.checked = false
|
||||||
|
chaperoneNewProfileIncludeProximityWarnings.checked = false
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
content: ColumnLayout {
|
||||||
|
spacing: 30
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wrap: true
|
||||||
|
text: "Give the following 4 digit PIN to the person that is sending you Wownero. PIN's are valid for 5 minutes and automatically renew."
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
MyText {
|
||||||
|
visible: false
|
||||||
|
fontSize: 14
|
||||||
|
text: "Currently generating PIN."
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
visible: true
|
||||||
|
text: "0 0 0 0"
|
||||||
|
color: "#ffffff"
|
||||||
|
font.bold: true
|
||||||
|
font.pointSize: 40
|
||||||
|
leftPadding: 20
|
||||||
|
rightPadding: 20
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
z: parent.z - 1
|
||||||
|
anchors.fill: parent
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: expireText
|
||||||
|
visible: true
|
||||||
|
fontSize: 14
|
||||||
|
text: "Expires in 40 seconds."
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "#cccccc"
|
||||||
|
height: 1
|
||||||
|
Layout.topMargin: 10
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wrap: true
|
||||||
|
text: "Alternatively, you may use one of the following methods."
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 10
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: viewAddress
|
||||||
|
text: "View address"
|
||||||
|
Layout.preferredWidth: 360
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
MyResources.playFocusChangedSound()
|
||||||
|
walletView.push(chaperoneAdditionalPage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: copyToClipboard
|
||||||
|
text: "Copy address to clipboard"
|
||||||
|
Layout.preferredWidth: 540
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
MyResources.playFocusChangedSound()
|
||||||
|
walletView.push(chaperoneAdditionalPage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: writeQRcode
|
||||||
|
text: "QR image"
|
||||||
|
Layout.preferredWidth: 340
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
chaperoneNewProfileDialog.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted() {
|
||||||
|
console.log("onPageCompleted() ReceivePage")
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.2
|
||||||
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick.Window 2.0
|
||||||
|
import QtQuick.Controls.Styles 1.4
|
||||||
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
|
// import ovrwow.wowletvr 1.0
|
||||||
|
|
||||||
|
import "../common"
|
||||||
|
import "."
|
||||||
|
|
||||||
|
MyStackViewPage {
|
||||||
|
id: walletDashboard
|
||||||
|
width: 1600
|
||||||
|
height: 800
|
||||||
|
headerText: appWindow.walletTitle
|
||||||
|
headerShowBackButton: false
|
||||||
|
stackView: walletView
|
||||||
|
|
||||||
|
content: Item {
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
RowLayout {
|
||||||
|
spacing: 32
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
Layout.maximumWidth: 250
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: steamVRButton
|
||||||
|
iconPath: "qrc:/send_icon"
|
||||||
|
activationSoundEnabled: false
|
||||||
|
text: "Send"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onClicked: {
|
||||||
|
//MyResources.playFocusChangedSound()
|
||||||
|
if(!appWindow.wsConnected) {
|
||||||
|
return messagePopup.showMessage("Please wait", "No connection to websocket server (yet).");
|
||||||
|
}
|
||||||
|
|
||||||
|
walletView.push(sendPage)
|
||||||
|
sendPage.onPageCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: chaperoneButton
|
||||||
|
iconPath: "qrc:/receive_icon"
|
||||||
|
activationSoundEnabled: false
|
||||||
|
text: "Receive"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onClicked: {
|
||||||
|
//MyResources.playFocusChangedSound()
|
||||||
|
if(!appWindow.wsConnected) {
|
||||||
|
return messagePopup.showMessage("Please wait", "No connection to websocket server (yet).");
|
||||||
|
}
|
||||||
|
|
||||||
|
walletView.push(receivePage)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: rotationButton
|
||||||
|
iconPath: "qrc:/backarrow"
|
||||||
|
activationSoundEnabled: false
|
||||||
|
text: "Close"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onClicked: {
|
||||||
|
//MyResources.playFocusChangedSound()
|
||||||
|
ctx.closeWallet(true, true);
|
||||||
|
mainView.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HistoryTable {
|
||||||
|
id: historyView
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted() {
|
||||||
|
historyView.onPageCompleted();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
|
import "../../common"
|
||||||
|
import "."
|
||||||
|
|
||||||
|
MyStackViewPage {
|
||||||
|
id: sendStateController
|
||||||
|
width: 1600
|
||||||
|
headerText: "Send"
|
||||||
|
|
||||||
|
property string destinationAddress: "cool_addy_here"
|
||||||
|
|
||||||
|
property string enteredColor: "#365473"
|
||||||
|
property string exitedColor: "#2c435d"
|
||||||
|
property string pressedColor: "#406288"
|
||||||
|
|
||||||
|
content: ColumnLayout {
|
||||||
|
id: sendStateView
|
||||||
|
property Item currentView
|
||||||
|
property Item previousView
|
||||||
|
|
||||||
|
property SendPagePIN pinPage: SendPagePIN {}
|
||||||
|
property SendPageDashboard dashPage: SendPageDashboard {}
|
||||||
|
property SendPageTransfer transferPage: SendPageTransfer {}
|
||||||
|
property SendPageQR qrPage: SendPageQR {}
|
||||||
|
|
||||||
|
state: ''
|
||||||
|
|
||||||
|
onCurrentViewChanged: {
|
||||||
|
if (previousView) {
|
||||||
|
if (typeof previousView.onPageClosed === "function") {
|
||||||
|
previousView.onPageClosed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if(previousView !== null && currentView.viewName === "wizardHome")
|
||||||
|
// wizardController.restart();
|
||||||
|
|
||||||
|
if (currentView) {
|
||||||
|
sendStack.replace(currentView)
|
||||||
|
// Calls when view is opened
|
||||||
|
if (typeof currentView.onPageCompleted === "function") {
|
||||||
|
currentView.onPageCompleted(previousView);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
previousView = currentView;
|
||||||
|
|
||||||
|
// reset push direction
|
||||||
|
// if(wizardController.wizardState == "wizardHome")
|
||||||
|
// wizardController.wizardStackView.backTransition = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "pinPage"
|
||||||
|
PropertyChanges { target: sendStateView; currentView: sendStateView.pinPage }
|
||||||
|
}, State {
|
||||||
|
name: "dashPage"
|
||||||
|
PropertyChanges { target: sendStateView; currentView: sendStateView.dashPage }
|
||||||
|
}, State {
|
||||||
|
name: "transferPage"
|
||||||
|
PropertyChanges { target: sendStateView; currentView: sendStateView.transferPage }
|
||||||
|
}, State {
|
||||||
|
name: "qrPage"
|
||||||
|
PropertyChanges { target: sendStateView; currentView: sendStateView.qrPage }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
StackView {
|
||||||
|
id: sendStack
|
||||||
|
clip: true
|
||||||
|
initialItem: sendStateView.dashPage
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
delegate: StackViewDelegate {
|
||||||
|
pushTransition: StackViewTransition {
|
||||||
|
PropertyAnimation {
|
||||||
|
target: enterItem
|
||||||
|
property: "x"
|
||||||
|
from: sendStack.backTransition ? -target.width : target.width
|
||||||
|
to: 0
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
|
||||||
|
PropertyAnimation {
|
||||||
|
target: exitItem
|
||||||
|
property: "x"
|
||||||
|
from: 0
|
||||||
|
to: sendStack.backTransition ? target.width : -target.width
|
||||||
|
duration: 300
|
||||||
|
easing.type: Easing.OutCubic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Connections {
|
||||||
|
// target: sendStateView.dashPage
|
||||||
|
// function onTest() {
|
||||||
|
// sendStack.push(pinPage)
|
||||||
|
// pinPage.onPageCompleted();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
function onPageCompleted(previousView){
|
||||||
|
sendStateView.state = "dashPage"
|
||||||
|
}
|
||||||
|
|
||||||
|
onBackClicked: {
|
||||||
|
// top back button to send/receive menu, reset default states for sendViews
|
||||||
|
sendStateView.pinPage.onPageCompleted();
|
||||||
|
sendStateView.dashPage.onPageCompleted();
|
||||||
|
sendStateView.transferPage.onPageCompleted();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wrap: true
|
||||||
|
text: "How to transfer Wownero?"
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 30
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 30
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: sendStateController.exitedColor
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: parent.color = sendStateController.enteredColor
|
||||||
|
onExited: parent.color = sendStateController.exitedColor
|
||||||
|
onPressed: parent.color = sendStateController.pressedColor
|
||||||
|
onClicked: {
|
||||||
|
sendStateView.state = "pinPage";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: sendStateController.exitedColor
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: parent.color = sendStateController.enteredColor
|
||||||
|
onExited: parent.color = sendStateController.exitedColor
|
||||||
|
onPressed: parent.color = sendStateController.pressedColor
|
||||||
|
onClicked: {
|
||||||
|
sendStateView.state = "qrPage";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
function onPageCompleted(previousView){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: root
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 82
|
||||||
|
Layout.maximumHeight: 82
|
||||||
|
|
||||||
|
signal backClicked();
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: sendStateController.exitedColor
|
||||||
|
Layout.preferredHeight: 82
|
||||||
|
Layout.preferredWidth: 220
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
Layout.minimumHeight: 54
|
||||||
|
|
||||||
|
Image {
|
||||||
|
source: "qrc:/backarrow"
|
||||||
|
Layout.leftMargin: 20
|
||||||
|
Layout.rightMargin: 20
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
fontBold: true
|
||||||
|
text: "back"
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: parent.color = sendStateController.enteredColor
|
||||||
|
onExited: parent.color = sendStateController.exitedColor
|
||||||
|
onPressed: parent.color = sendStateController.pressedColor
|
||||||
|
onClicked: {
|
||||||
|
root.backClicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|