gui: add BaseElectrumGui base class for guis
This commit is contained in:
@@ -9,3 +9,22 @@ from typing import TYPE_CHECKING
|
||||
if TYPE_CHECKING:
|
||||
from . import qt
|
||||
from . import kivy
|
||||
from electrum.simple_config import SimpleConfig
|
||||
from electrum.daemon import Daemon
|
||||
from electrum.plugin import Plugins
|
||||
|
||||
|
||||
class BaseElectrumGui:
|
||||
def __init__(self, *, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'):
|
||||
self.config = config
|
||||
self.daemon = daemon
|
||||
self.plugins = plugins
|
||||
|
||||
def main(self) -> None:
|
||||
raise NotImplementedError()
|
||||
|
||||
def stop(self) -> None:
|
||||
"""Stops the GUI.
|
||||
This method must be thread-safe.
|
||||
"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user