mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Waiting and Debriefing Window, QT UI is now functionnal.
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
from PySide2.QtCore import QObject, Signal
|
||||
|
||||
from game import Game
|
||||
from game.event import Event, Debriefing
|
||||
|
||||
|
||||
class DebriefingSignal:
|
||||
|
||||
def __init__(self, game, gameEvent, debriefing):
|
||||
self.game = game
|
||||
self.gameEvent = gameEvent
|
||||
self.debriefing = debriefing
|
||||
|
||||
|
||||
class GameUpdateSignal(QObject):
|
||||
|
||||
instance = None
|
||||
gameupdated = Signal(Game)
|
||||
debriefingReceived = Signal(DebriefingSignal)
|
||||
|
||||
def __init__(self):
|
||||
super(GameUpdateSignal, self).__init__()
|
||||
@@ -14,6 +25,11 @@ class GameUpdateSignal(QObject):
|
||||
def updateGame(self, game: Game):
|
||||
self.gameupdated.emit(game)
|
||||
|
||||
def sendDebriefing(self, game: Game, gameEvent: Event, debriefing: Debriefing):
|
||||
sig = DebriefingSignal(game, gameEvent, debriefing)
|
||||
self.gameupdated.emit(game)
|
||||
self.debriefingReceived.emit(sig)
|
||||
|
||||
@staticmethod
|
||||
def get_instance():
|
||||
return GameUpdateSignal.instance
|
||||
|
||||
Reference in New Issue
Block a user