Merge branch 'port_host' into 'master'
made host and port configurable See merge request augustin_s/grum!3
This commit is contained in:
@ -3,19 +3,19 @@ from PyQt5.QtWidgets import QMainWindow, QSplitter
|
||||
|
||||
from . import assets
|
||||
from .dictlist import DictList
|
||||
from .mdi import MDIArea, MDISubPlot, MDISubMultiPlot
|
||||
from .rpc import RPCServerThread
|
||||
from .plotdesc import PlotDescription
|
||||
from .menus import BarMenu
|
||||
from .shortcut import shortcut
|
||||
from .exampledata import exampledata
|
||||
from .mdi import MDIArea, MDISubMultiPlot, MDISubPlot
|
||||
from .menus import BarMenu
|
||||
from .plotdesc import PlotDescription
|
||||
from .rpc import RPCServerThread
|
||||
from .shortcut import shortcut
|
||||
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
|
||||
sig_make_new_plot = pyqtSignal(str, PlotDescription)
|
||||
|
||||
def __init__(self, *args, title="grum", **kwargs):
|
||||
def __init__(self, *args, title="grum", host="localhost", port=8000, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.setWindowTitle(title)
|
||||
self.setWindowIcon(assets.icon())
|
||||
@ -45,7 +45,7 @@ class MainWindow(QMainWindow):
|
||||
|
||||
self.setCentralWidget(splitter)
|
||||
|
||||
rst = RPCServerThread("localhost", 8000)
|
||||
rst = RPCServerThread(host, port)
|
||||
rst.start()
|
||||
rst.server.register_function(self.new_plot)
|
||||
rst.server.register_function(self.append_data)
|
||||
|
Reference in New Issue
Block a user