Improve flight path display options.

Adds an option show only selected flight, and also changes the show
all option to highlight the selected flight.
This commit is contained in:
Dan Albert
2020-10-09 16:18:08 -07:00
parent 31d5e3151b
commit 2d8c8c63c9
5 changed files with 145 additions and 37 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import annotations
from typing import Optional
from typing import Optional, Tuple
from PySide2.QtCore import QObject, Signal
@@ -24,11 +24,21 @@ class GameUpdateSignal(QObject):
debriefingReceived = Signal(DebriefingSignal)
flight_paths_changed = Signal()
package_selection_changed = Signal(int) # Optional[int]
flight_selection_changed = Signal(int) # Optional[int]
def __init__(self):
super(GameUpdateSignal, self).__init__()
GameUpdateSignal.instance = self
def select_package(self, index: Optional[int]) -> None:
# noinspection PyUnresolvedReferences
self.package_selection_changed.emit(index)
def select_flight(self, index: Optional[int]) -> None:
# noinspection PyUnresolvedReferences
self.flight_selection_changed.emit(index)
def redraw_flight_paths(self) -> None:
# noinspection PyUnresolvedReferences
self.flight_paths_changed.emit()