|
|
@ -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 import AnnotatedTopology, AnnotatorID
|
|
|
|
from birdvisu.annotations.analysis import TopologyDifference, ShortestPathTree
|
|
|
|
from birdvisu.annotations.analysis import TopologyDifference, ShortestPathTree
|
|
|
@ -16,8 +23,6 @@ from PySide6.QtCore import Slot, QObject
|
|
|
|
from random import randint
|
|
|
|
from random import randint
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
app = QtWidgets.QApplication([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BirdTopologyLoader(QtWidgets.QDialog):
|
|
|
|
class BirdTopologyLoader(QtWidgets.QDialog):
|
|
|
|
def __init__(self, *a, **kwa):
|
|
|
|
def __init__(self, *a, **kwa):
|
|
|
|
super().__init__(*a, **kwa)
|
|
|
|
super().__init__(*a, **kwa)
|
|
|
@ -140,7 +145,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
|
self.statusbar.showMessage('Hello!')
|
|
|
|
self.statusbar.showMessage('Hello!')
|
|
|
|
self.create_menus()
|
|
|
|
self.create_menus()
|
|
|
|
self.edgeWeightMode()
|
|
|
|
self.edgeWeightMode()
|
|
|
|
self.autoLoad()
|
|
|
|
#self.autoLoad()
|
|
|
|
|
|
|
|
|
|
|
|
#Hack
|
|
|
|
#Hack
|
|
|
|
@Slot()
|
|
|
|
@Slot()
|
|
|
@ -332,7 +337,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
|
def create_edge(self, edge):
|
|
|
|
def create_edge(self, edge):
|
|
|
|
return EdgeGraphicsItem(edge, self)
|
|
|
|
return EdgeGraphicsItem(edge, self)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
main_window = MainWindow()
|
|
|
|
app = QtWidgets.QApplication([])
|
|
|
|
main_window.show()
|
|
|
|
main_window = MainWindow()
|
|
|
|
app.exec()
|
|
|
|
main_window.show()
|
|
|
|
|
|
|
|
app.exec()
|