frontends (quick_frontend, primitivus): fixes room games:

- add quick_frontend.quick_games for registering the signals and registering the UI classes
    - rename the signals handlers to fit the convention (e.g.: tarotGameScoreHandler)
    - rename card_game to game_tarot, quick_card_game to quick_game_tarot, CardGame to TarotGame
This commit is contained in:
souliane 2015-03-11 12:43:48 +01:00
commit e597a804d9

View file

@ -48,6 +48,7 @@ class QuickChat(quick_widgets.QuickWidget):
self.id = "" # FIXME: to be removed
self.nick = None
self.occupants = set()
self.games = {}
def __str__(self):
return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile)
@ -227,16 +228,6 @@ class QuickChat(quick_widgets.QuickWidget):
"""
raise NotImplementedError
def startGame(self, game_type, referee, players):
"""Configure the chat window to start a game"""
#No need to raise an error as game are not mandatory
log.warning(_('startGame is not implemented in this frontend'))
def getGame(self, game_type):
"""Return class managing the game type"""
#No need to raise an error as game are not mandatory
log.warning(_('getGame is not implemented in this frontend'))
def updateChatState(self, from_jid, state):
"""Set the chat state (XEP-0085) of the contact.
@ -244,4 +235,19 @@ class QuickChat(quick_widgets.QuickWidget):
"""
raise NotImplementedError
def addGamePanel(self, widget):
"""Insert a game panel to this Chat dialog.
@param widget (Widget): the game panel
"""
raise NotImplementedError
def removeGamePanel(self, widget):
"""Remove the game panel from this Chat dialog.
@param widget (Widget): the game panel
"""
raise NotImplementedError
quick_widgets.register(QuickChat)