qml: consistency camelcase pyqtProperties
This commit is contained in:
@@ -38,7 +38,7 @@ Pane {
|
||||
InfoTextArea {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
visible: Daemon.currentWallet.synchronizing || !Network.is_connected
|
||||
visible: Daemon.currentWallet.synchronizing || !Network.isConnected
|
||||
text: Daemon.currentWallet.synchronizing
|
||||
? qsTr('Your wallet is not synchronized. The displayed balance may be inaccurate.')
|
||||
: qsTr('Your wallet is not connected to an Electrum server. The displayed balance may be outdated.')
|
||||
|
||||
@@ -62,7 +62,7 @@ Pane {
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: channeldetails.short_cid
|
||||
text: channeldetails.shortCid
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -254,7 +254,7 @@ Pane {
|
||||
text: qsTr('Backup')
|
||||
onClicked: {
|
||||
var dialog = app.genericShareDialog.createObject(root, {
|
||||
title: qsTr('Channel Backup for %1').arg(channeldetails.short_cid),
|
||||
title: qsTr('Channel Backup for %1').arg(channeldetails.shortCid),
|
||||
text_qr: channeldetails.channelBackup(),
|
||||
text_help: channeldetails.channelBackupHelpText(),
|
||||
iconSource: Qt.resolvedUrl('../../icons/file.png')
|
||||
|
||||
@@ -63,7 +63,7 @@ ElDialog {
|
||||
}
|
||||
|
||||
Label {
|
||||
text: channeldetails.short_cid
|
||||
text: channeldetails.shortCid
|
||||
}
|
||||
|
||||
Label {
|
||||
@@ -92,7 +92,7 @@ ElDialog {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
text: channeldetails.message_force_close
|
||||
text: channeldetails.messageForceClose
|
||||
}
|
||||
|
||||
Label {
|
||||
|
||||
@@ -52,7 +52,7 @@ ElDialog {
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: constants.paddingLarge
|
||||
visible: text
|
||||
text: invoice.userinfo ? invoice.userinfo : invoice.status_str
|
||||
text: invoice.userinfo ? invoice.userinfo : invoice.statusString
|
||||
iconStyle: invoice.status == Invoice.Failed || invoice.status == Invoice.Unknown
|
||||
? InfoTextArea.IconStyle.Warn
|
||||
: invoice.status == Invoice.Expired
|
||||
|
||||
@@ -146,7 +146,7 @@ Pane {
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Label {
|
||||
text: lnpaymentdetails.payment_hash
|
||||
text: lnpaymentdetails.paymentHash
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
font.family: FixedFont
|
||||
Layout.fillWidth: true
|
||||
@@ -157,7 +157,7 @@ Pane {
|
||||
icon.color: 'transparent'
|
||||
onClicked: {
|
||||
var dialog = app.genericShareDialog.createObject(root,
|
||||
{ title: qsTr('Payment hash'), text: lnpaymentdetails.payment_hash }
|
||||
{ title: qsTr('Payment hash'), text: lnpaymentdetails.paymentHash }
|
||||
)
|
||||
dialog.open()
|
||||
}
|
||||
|
||||
@@ -69,11 +69,11 @@ Pane {
|
||||
Label {
|
||||
text: qsTr('Server Height:');
|
||||
color: Material.accentColor
|
||||
visible: Network.server_height != Network.height
|
||||
visible: Network.serverHeight != Network.height
|
||||
}
|
||||
Label {
|
||||
text: Network.server_height + " (lagging)"
|
||||
visible: Network.server_height != Network.height
|
||||
text: Network.serverHeight + " (lagging)"
|
||||
visible: Network.serverHeight != Network.height
|
||||
}
|
||||
Heading {
|
||||
Layout.columnSpan: 2
|
||||
|
||||
@@ -124,7 +124,7 @@ ElDialog {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
text: Config.formatSats(swaphelper.server_miningfee)
|
||||
text: Config.formatSats(swaphelper.serverMiningfee)
|
||||
font.family: FixedFont
|
||||
}
|
||||
Label {
|
||||
|
||||
@@ -31,7 +31,7 @@ Item {
|
||||
GridLayout {
|
||||
id: balanceLayout
|
||||
columns: 3
|
||||
opacity: Daemon.currentWallet.synchronizing || !Network.is_connected ? 0 : 1
|
||||
opacity: Daemon.currentWallet.synchronizing || !Network.isConnected ? 0 : 1
|
||||
|
||||
Label {
|
||||
font.pixelSize: constants.fontSizeXLarge
|
||||
@@ -129,7 +129,7 @@ Item {
|
||||
}
|
||||
|
||||
Label {
|
||||
opacity: Daemon.currentWallet.synchronizing && Network.is_connected ? 1 : 0
|
||||
opacity: Daemon.currentWallet.synchronizing && Network.isConnected ? 1 : 0
|
||||
anchors.centerIn: balancePane
|
||||
text: Daemon.currentWallet.synchronizingProgress
|
||||
color: Material.accentColor
|
||||
@@ -137,9 +137,9 @@ Item {
|
||||
}
|
||||
|
||||
Label {
|
||||
opacity: !Network.is_connected ? 1 : 0
|
||||
opacity: !Network.isConnected ? 1 : 0
|
||||
anchors.centerIn: balancePane
|
||||
text: Network.server_status
|
||||
text: Network.serverStatus
|
||||
color: Material.accentColor
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Image {
|
||||
sourceSize.width: constants.iconSizeMedium
|
||||
sourceSize.height: constants.iconSizeMedium
|
||||
|
||||
property bool connected: Network.is_connected
|
||||
property bool connected: Network.isConnected
|
||||
property bool lagging: connected && Network.isLagging
|
||||
property bool fork: connected && Network.chaintips > 1
|
||||
property bool syncing: connected && Daemon.currentWallet && Daemon.currentWallet.synchronizing
|
||||
|
||||
@@ -92,7 +92,7 @@ class QEChannelDetails(QObject, QtEventListener):
|
||||
return self._channel.node_id.hex()
|
||||
|
||||
@pyqtProperty(str, notify=channelChanged)
|
||||
def short_cid(self):
|
||||
def shortCid(self):
|
||||
return self._channel.short_id_for_GUI()
|
||||
|
||||
@pyqtProperty(str, notify=channelChanged)
|
||||
@@ -171,7 +171,7 @@ class QEChannelDetails(QObject, QtEventListener):
|
||||
return self._channel.can_be_deleted()
|
||||
|
||||
@pyqtProperty(str, notify=channelChanged)
|
||||
def message_force_close(self, notify=channelChanged):
|
||||
def messageForceClose(self, notify=channelChanged):
|
||||
return _(messages.MSG_REQUEST_FORCE_CLOSE).strip()
|
||||
|
||||
@pyqtProperty(bool, notify=channelChanged)
|
||||
|
||||
@@ -166,7 +166,7 @@ class QEInvoice(QObject, QtEventListener):
|
||||
return self._wallet.wallet.get_invoice_status(self._effectiveInvoice)
|
||||
|
||||
@pyqtProperty(str, notify=statusChanged)
|
||||
def status_str(self):
|
||||
def statusString(self):
|
||||
if not self._effectiveInvoice:
|
||||
return ''
|
||||
status = self._wallet.wallet.get_invoice_status(self._effectiveInvoice)
|
||||
|
||||
@@ -65,7 +65,7 @@ class QELnPaymentDetails(QObject):
|
||||
return self._date
|
||||
|
||||
@pyqtProperty(str, notify=detailsChanged)
|
||||
def payment_hash(self):
|
||||
def paymentHash(self):
|
||||
return self._phash
|
||||
|
||||
@pyqtProperty(str, notify=detailsChanged)
|
||||
|
||||
@@ -193,7 +193,7 @@ class QENetwork(QObject, QtEventListener):
|
||||
return self._height
|
||||
|
||||
@pyqtProperty(int, notify=serverHeightChanged)
|
||||
def server_height(self):
|
||||
def serverHeight(self):
|
||||
return self._server_height
|
||||
|
||||
@pyqtProperty(str, notify=statusChanged)
|
||||
@@ -223,11 +223,11 @@ class QENetwork(QObject, QtEventListener):
|
||||
return self._network_status
|
||||
|
||||
@pyqtProperty(str, notify=statusChanged)
|
||||
def server_status(self):
|
||||
def serverStatus(self):
|
||||
return self.network.get_connection_status_for_GUI()
|
||||
|
||||
@pyqtProperty(bool, notify=statusChanged)
|
||||
def is_connected(self):
|
||||
def isConnected(self):
|
||||
return self._is_connected
|
||||
|
||||
@pyqtProperty(int, notify=chaintipsChanged)
|
||||
|
||||
@@ -181,16 +181,16 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
|
||||
self._toreceive = toreceive
|
||||
self.toreceiveChanged.emit()
|
||||
|
||||
server_miningfeeChanged = pyqtSignal()
|
||||
@pyqtProperty(QEAmount, notify=server_miningfeeChanged)
|
||||
def server_miningfee(self):
|
||||
serverMiningfeeChanged = pyqtSignal()
|
||||
@pyqtProperty(QEAmount, notify=serverMiningfeeChanged)
|
||||
def serverMiningfee(self):
|
||||
return self._server_miningfee
|
||||
|
||||
@server_miningfee.setter
|
||||
def server_miningfee(self, server_miningfee):
|
||||
@serverMiningfee.setter
|
||||
def serverMiningfee(self, server_miningfee):
|
||||
if self._server_miningfee != server_miningfee:
|
||||
self._server_miningfee = server_miningfee
|
||||
self.server_miningfeeChanged.emit()
|
||||
self.serverMiningfeeChanged.emit()
|
||||
|
||||
serverfeepercChanged = pyqtSignal()
|
||||
@pyqtProperty(str, notify=serverfeepercChanged)
|
||||
@@ -319,7 +319,7 @@ class QESwapHelper(AuthMixin, QObject, QtEventListener):
|
||||
# fee breakdown
|
||||
self.serverfeeperc = f'{swap_manager.percentage:0.1f}%'
|
||||
server_miningfee = swap_manager.lockup_fee if self.isReverse else swap_manager.normal_fee
|
||||
self.server_miningfee = QEAmount(amount_sat=server_miningfee)
|
||||
self.serverMiningfee = QEAmount(amount_sat=server_miningfee)
|
||||
if self.isReverse:
|
||||
self.check_valid(self._send_amount, self._receive_amount)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user