comparison frontends/src/quick_frontend/quick_chat.py @ 1360:8ea8fa13c351 frontends_multi_profiles

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
author souliane <souliane@mailoo.org>
date Wed, 11 Mar 2015 12:43:48 +0100
parents ebf72fe68d1c
children d3e9848b9574
comparison
equal deleted inserted replaced
1359:83127a4c89ce 1360:8ea8fa13c351
46 self.current_target = target 46 self.current_target = target
47 self.type = type_ 47 self.type = type_
48 self.id = "" # FIXME: to be removed 48 self.id = "" # FIXME: to be removed
49 self.nick = None 49 self.nick = None
50 self.occupants = set() 50 self.occupants = set()
51 self.games = {}
51 52
52 def __str__(self): 53 def __str__(self):
53 return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile) 54 return u"Chat Widget [target: {}, type: {}, profile: {}]".format(self.target, self.type, self.profile)
54 55
55 @staticmethod 56 @staticmethod
225 me: "/me" information like "/me clenches his fist" ==> "toto clenches his fist" 226 me: "/me" information like "/me clenches his fist" ==> "toto clenches his fist"
226 @param extra (dict): message data 227 @param extra (dict): message data
227 """ 228 """
228 raise NotImplementedError 229 raise NotImplementedError
229 230
230 def startGame(self, game_type, referee, players):
231 """Configure the chat window to start a game"""
232 #No need to raise an error as game are not mandatory
233 log.warning(_('startGame is not implemented in this frontend'))
234
235 def getGame(self, game_type):
236 """Return class managing the game type"""
237 #No need to raise an error as game are not mandatory
238 log.warning(_('getGame is not implemented in this frontend'))
239
240 def updateChatState(self, from_jid, state): 231 def updateChatState(self, from_jid, state):
241 """Set the chat state (XEP-0085) of the contact. 232 """Set the chat state (XEP-0085) of the contact.
242 233
243 @param state: the new chat state 234 @param state: the new chat state
244 """ 235 """
245 raise NotImplementedError 236 raise NotImplementedError
246 237
238 def addGamePanel(self, widget):
239 """Insert a game panel to this Chat dialog.
240
241 @param widget (Widget): the game panel
242 """
243 raise NotImplementedError
244
245 def removeGamePanel(self, widget):
246 """Remove the game panel from this Chat dialog.
247
248 @param widget (Widget): the game panel
249 """
250 raise NotImplementedError
251
252
247 quick_widgets.register(QuickChat) 253 quick_widgets.register(QuickChat)