Act as an app.

topo-mov
LEdoian 1 year ago
parent e962ec9cdb
commit c83c545c43

@ -0,0 +1,4 @@
#!/usr/bin/env python3
from birdvisu.ui import main
main()

@ -1,4 +1,11 @@
#!/usr/bin/env python3
"""This module contains the UI. Most of interfacing Qt happens here, especially if not related to the Graphics view framework
The MainWindow class acts as the coordinator for the whole project. Apart from
it, there is at least one dialog window used by the MainWindow.
The function :func:main can be used as the entrypoint to the program, if run in
standalone mode.
"""
from birdvisu.annotations import AnnotatedTopology, AnnotatorID
from birdvisu.annotations.analysis import TopologyDifference, ShortestPathTree
@ -16,8 +23,6 @@ from PySide6.QtCore import Slot, QObject
from random import randint
import sys
app = QtWidgets.QApplication([])
class BirdTopologyLoader(QtWidgets.QDialog):
def __init__(self, *a, **kwa):
super().__init__(*a, **kwa)
@ -140,7 +145,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.statusbar.showMessage('Hello!')
self.create_menus()
self.edgeWeightMode()
self.autoLoad()
#self.autoLoad()
#Hack
@Slot()
@ -332,7 +337,8 @@ class MainWindow(QtWidgets.QMainWindow):
def create_edge(self, edge):
return EdgeGraphicsItem(edge, self)
def main():
app = QtWidgets.QApplication([])
main_window = MainWindow()
main_window.show()
app.exec()

@ -8,6 +8,9 @@ dependencies = [
'PySide6',
]
[project.gui-scripts]
visu = "birdvisu.ui:main"
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

@ -0,0 +1,4 @@
#!/usr/bin/env python3
from birdvisu.ui import main
main()
Loading…
Cancel
Save