qml: consistency camelcase public slots qedaemon, qeinvoice, qewizard
This commit is contained in:
@@ -397,7 +397,7 @@ ElDialog {
|
|||||||
if (invoice.amount.isEmpty) {
|
if (invoice.amount.isEmpty) {
|
||||||
invoice.amountOverride = amountMax.checked ? MAX : Config.unitsToSats(amountBtc.text)
|
invoice.amountOverride = amountMax.checked ? MAX : Config.unitsToSats(amountBtc.text)
|
||||||
}
|
}
|
||||||
invoice.save_invoice()
|
invoice.saveInvoice()
|
||||||
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
||||||
dialog.close()
|
dialog.close()
|
||||||
}
|
}
|
||||||
@@ -414,7 +414,7 @@ ElDialog {
|
|||||||
}
|
}
|
||||||
if (!invoice.isSaved) {
|
if (!invoice.isSaved) {
|
||||||
// save invoice if newly parsed
|
// save invoice if newly parsed
|
||||||
invoice.save_invoice()
|
invoice.saveInvoice()
|
||||||
}
|
}
|
||||||
doPay() // only signal here
|
doPay() // only signal here
|
||||||
}
|
}
|
||||||
@@ -432,7 +432,7 @@ ElDialog {
|
|||||||
if (payImmediately) {
|
if (payImmediately) {
|
||||||
if (invoice.canPay) {
|
if (invoice.canPay) {
|
||||||
if (!invoice.isSaved) {
|
if (!invoice.isSaved) {
|
||||||
invoice.save_invoice()
|
invoice.saveInvoice()
|
||||||
}
|
}
|
||||||
doPay()
|
doPay()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ Wizard {
|
|||||||
wiz: Daemon.newWalletWizard
|
wiz: Daemon.newWalletWizard
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var view = wiz.start_wizard()
|
var view = wiz.startWizard()
|
||||||
_loadNextComponent(view)
|
_loadNextComponent(view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ ElDialog {
|
|||||||
}
|
}
|
||||||
onReadyChanged: {
|
onReadyChanged: {
|
||||||
if (ready) {
|
if (ready) {
|
||||||
Daemon.load_wallet(openwalletdialog.path, password.text)
|
Daemon.loadWallet(openwalletdialog.path, password.text)
|
||||||
openwalletdialog.close()
|
openwalletdialog.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Wizard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var view = wiz.start_wizard()
|
var view = wiz.startWizard()
|
||||||
_loadNextComponent(view)
|
_loadNextComponent(view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ Item {
|
|||||||
newww.walletCreated.connect(function() {
|
newww.walletCreated.connect(function() {
|
||||||
Daemon.availableWallets.reload()
|
Daemon.availableWallets.reload()
|
||||||
// and load the new wallet
|
// and load the new wallet
|
||||||
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
|
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
|
||||||
})
|
})
|
||||||
newww.open()
|
newww.open()
|
||||||
}
|
}
|
||||||
@@ -341,7 +341,7 @@ Item {
|
|||||||
dialog.open()
|
dialog.open()
|
||||||
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
|
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
|
||||||
console.log('About to pay lightning invoice')
|
console.log('About to pay lightning invoice')
|
||||||
invoice.pay_lightning_invoice()
|
invoice.payLightningInvoice()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Pane {
|
|||||||
dialog.walletCreated.connect(function() {
|
dialog.walletCreated.connect(function() {
|
||||||
Daemon.availableWallets.reload()
|
Daemon.availableWallets.reload()
|
||||||
// and load the new wallet
|
// and load the new wallet
|
||||||
Daemon.load_wallet(dialog.path, dialog.wizard_data['password'])
|
Daemon.loadWallet(dialog.path, dialog.wizard_data['password'])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ Pane {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (!Daemon.currentWallet || Daemon.currentWallet.name != model.name)
|
if (!Daemon.currentWallet || Daemon.currentWallet.name != model.name)
|
||||||
Daemon.load_wallet(model.path)
|
Daemon.loadWallet(model.path)
|
||||||
else
|
else
|
||||||
app.stack.pop()
|
app.stack.pop()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -420,7 +420,7 @@ ApplicationWindow
|
|||||||
newww.walletCreated.connect(function() {
|
newww.walletCreated.connect(function() {
|
||||||
Daemon.availableWallets.reload()
|
Daemon.availableWallets.reload()
|
||||||
// and load the new wallet
|
// and load the new wallet
|
||||||
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
|
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
|
||||||
})
|
})
|
||||||
newww.open()
|
newww.open()
|
||||||
})
|
})
|
||||||
@@ -428,13 +428,13 @@ ApplicationWindow
|
|||||||
} else {
|
} else {
|
||||||
Daemon.startNetwork()
|
Daemon.startNetwork()
|
||||||
if (Daemon.availableWallets.rowCount() > 0) {
|
if (Daemon.availableWallets.rowCount() > 0) {
|
||||||
Daemon.load_wallet()
|
Daemon.loadWallet()
|
||||||
} else {
|
} else {
|
||||||
var newww = app.newWalletWizard.createObject(app)
|
var newww = app.newWalletWizard.createObject(app)
|
||||||
newww.walletCreated.connect(function() {
|
newww.walletCreated.connect(function() {
|
||||||
Daemon.availableWallets.reload()
|
Daemon.availableWallets.reload()
|
||||||
// and load the new wallet
|
// and load the new wallet
|
||||||
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
|
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
|
||||||
})
|
})
|
||||||
newww.open()
|
newww.open()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class QEDaemon(AuthMixin, QObject):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
def load_wallet(self, path=None, password=None):
|
def loadWallet(self, path=None, password=None):
|
||||||
if path is None:
|
if path is None:
|
||||||
self._path = self.daemon.config.get('wallet_path') # command line -w option
|
self._path = self.daemon.config.get('wallet_path') # command line -w option
|
||||||
if self._path is None:
|
if self._path is None:
|
||||||
|
|||||||
@@ -370,12 +370,12 @@ class QEInvoice(QObject, QtEventListener):
|
|||||||
self.canPay = True
|
self.canPay = True
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def pay_lightning_invoice(self):
|
def payLightningInvoice(self):
|
||||||
if not self.canPay:
|
if not self.canPay:
|
||||||
raise Exception('can not pay invoice, canPay is false')
|
raise Exception('can not pay invoice, canPay is false')
|
||||||
|
|
||||||
if self.invoiceType != QEInvoice.Type.LightningInvoice:
|
if self.invoiceType != QEInvoice.Type.LightningInvoice:
|
||||||
raise Exception('pay_lightning_invoice can only pay lightning invoices')
|
raise Exception('payLightningInvoice can only pay lightning invoices')
|
||||||
|
|
||||||
if self.amount.isEmpty:
|
if self.amount.isEmpty:
|
||||||
if self.amountOverride.isEmpty:
|
if self.amountOverride.isEmpty:
|
||||||
@@ -651,7 +651,7 @@ class QEInvoiceParser(QEInvoice):
|
|||||||
self.recipient = invoice['pr']
|
self.recipient = invoice['pr']
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def save_invoice(self):
|
def saveInvoice(self):
|
||||||
if not self._effectiveInvoice:
|
if not self._effectiveInvoice:
|
||||||
return
|
return
|
||||||
if self.isSaved:
|
if self.isSaved:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class QEAbstractWizard(QObject):
|
|||||||
QObject.__init__(self, parent)
|
QObject.__init__(self, parent)
|
||||||
|
|
||||||
@pyqtSlot(result=str)
|
@pyqtSlot(result=str)
|
||||||
def start_wizard(self):
|
def startWizard(self):
|
||||||
self.start()
|
self.start()
|
||||||
return self._current.view
|
return self._current.view
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user