Browse Source

remove qml_test plugin, remove plugin settings test

patch-4
Sander van Grieken 2 years ago
parent
commit
28b5103d93
  1. 5
      electrum/plugins/qml_test/__init__.py
  2. 15
      electrum/plugins/qml_test/qml.py
  3. 3
      electrum/plugins/trustedcoin/qml.py
  4. 46
      electrum/plugins/trustedcoin/qml/Settings.qml

5
electrum/plugins/qml_test/__init__.py

@ -1,5 +0,0 @@
from electrum.i18n import _
fullname = 'QML Plugin Test'
description = '%s\n%s' % (_("Plugin to test QML integration from plugins."), _("Note: Used for development"))
available_for = ['qml']

15
electrum/plugins/qml_test/qml.py

@ -1,15 +0,0 @@
from typing import TYPE_CHECKING
from PyQt5.QtQml import QQmlApplicationEngine
from electrum.plugin import hook, BasePlugin
from electrum.logging import get_logger
if TYPE_CHECKING:
from electrum.gui.qml import ElectrumGui
class Plugin(BasePlugin):
def __init__(self, parent, config, name):
BasePlugin.__init__(self, parent, config, name)
@hook
def init_qml(self, gui: 'ElectrumGui'):
self.logger.debug('init_qml hook called')

3
electrum/plugins/trustedcoin/qml.py

@ -49,9 +49,6 @@ class Plugin(TrustedCoinPlugin):
def __init__(self, plugin, parent):
super().__init__(plugin, parent)
@pyqtSlot(result=str)
def settingsComponent(self): return '../../../plugins/trustedcoin/qml/Settings.qml'
@pyqtProperty(str, notify=disclaimerChanged)
def disclaimer(self):
return '\n\n'.join(MOBILE_DISCLAIMER)

46
electrum/plugins/trustedcoin/qml/Settings.qml

@ -1,46 +0,0 @@
import QtQuick 2.6
import QtQuick.Layouts 1.0
import QtQuick.Controls 2.14
import QtQuick.Controls.Material 2.0
import org.electrum 1.0
//import "controls"
Item {
width: parent.width
height: rootLayout.height
property QtObject plugin
RowLayout {
id: rootLayout
Button {
text: 'Force upload'
enabled: !plugin.busy
onClicked: plugin.upload()
}
Button {
text: 'Force download'
enabled: !plugin.busy
onClicked: plugin.download()
}
}
Connections {
target: plugin
function onUploadSuccess() {
console.log('upload success')
}
function onUploadFailed() {
console.log('upload failed')
}
function onDownloadSuccess() {
console.log('download success')
}
function onDownloadFailed() {
console.log('download failed')
}
}
}
Loading…
Cancel
Save