|
|
|
@ -23,6 +23,16 @@ class QEConfig(AuthMixin, QObject): |
|
|
|
super().__init__(parent) |
|
|
|
super().__init__(parent) |
|
|
|
self.config = config |
|
|
|
self.config = config |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pyqtSlot(str, result=str) |
|
|
|
|
|
|
|
def shortDescFor(self, key) -> str: |
|
|
|
|
|
|
|
cv = getattr(self.config.cv, key) |
|
|
|
|
|
|
|
return cv.get_short_desc() if cv else '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pyqtSlot(str, result=str) |
|
|
|
|
|
|
|
def longDescFor(self, key) -> str: |
|
|
|
|
|
|
|
cv = getattr(self.config.cv, key) |
|
|
|
|
|
|
|
return cv.get_long_desc() if cv else '' |
|
|
|
|
|
|
|
|
|
|
|
languageChanged = pyqtSignal() |
|
|
|
languageChanged = pyqtSignal() |
|
|
|
@pyqtProperty(str, notify=languageChanged) |
|
|
|
@pyqtProperty(str, notify=languageChanged) |
|
|
|
def language(self): |
|
|
|
def language(self): |
|
|
|
@ -255,6 +265,17 @@ class QEConfig(AuthMixin, QObject): |
|
|
|
self.config.WALLET_COIN_CHOOSER_OUTPUT_ROUNDING = outputValueRounding |
|
|
|
self.config.WALLET_COIN_CHOOSER_OUTPUT_ROUNDING = outputValueRounding |
|
|
|
self.outputValueRoundingChanged.emit() |
|
|
|
self.outputValueRoundingChanged.emit() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lightningPaymentFeeMaxMillionthsChanged = pyqtSignal() |
|
|
|
|
|
|
|
@pyqtProperty(int, notify=lightningPaymentFeeMaxMillionthsChanged) |
|
|
|
|
|
|
|
def lightningPaymentFeeMaxMillionths(self): |
|
|
|
|
|
|
|
return self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@lightningPaymentFeeMaxMillionths.setter |
|
|
|
|
|
|
|
def lightningPaymentFeeMaxMillionths(self, lightningPaymentFeeMaxMillionths): |
|
|
|
|
|
|
|
if lightningPaymentFeeMaxMillionths != self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS: |
|
|
|
|
|
|
|
self.config.LIGHTNING_PAYMENT_FEE_MAX_MILLIONTHS = lightningPaymentFeeMaxMillionths |
|
|
|
|
|
|
|
self.lightningPaymentFeeMaxMillionthsChanged.emit() |
|
|
|
|
|
|
|
|
|
|
|
@pyqtSlot('qint64', result=str) |
|
|
|
@pyqtSlot('qint64', result=str) |
|
|
|
@pyqtSlot(QEAmount, result=str) |
|
|
|
@pyqtSlot(QEAmount, result=str) |
|
|
|
def formatSatsForEditing(self, satoshis): |
|
|
|
def formatSatsForEditing(self, satoshis): |
|
|
|
|