31 """ |
31 """ |
32 Class implementing the chat dialog. |
32 Class implementing the chat dialog. |
33 |
33 |
34 @signal connected(connected) emitted to signal a change of the connected |
34 @signal connected(connected) emitted to signal a change of the connected |
35 state (bool) |
35 state (bool) |
36 @signal editorCommand(hash, filename, message) emitted when an editor |
36 @signal editorCommand(hashStr, filename, message) emitted when an editor |
37 command has been received (string, string, string) |
37 command has been received (string, string, string) |
38 @signal shareEditor(share) emitted to signal a share is requested (bool) |
38 @signal shareEditor(share) emitted to signal a share is requested (bool) |
39 @signal startEdit() emitted to start a shared edit session |
39 @signal startEdit() emitted to start a shared edit session |
40 @signal sendEdit() emitted to send a shared edit session |
40 @signal sendEdit() emitted to send a shared edit session |
41 @signal cancelEdit() emitted to cancel a shared edit session |
41 @signal cancelEdit() emitted to cancel a shared edit session |
389 |
389 |
390 @return reference to the cooperation client (CooperationClient) |
390 @return reference to the cooperation client (CooperationClient) |
391 """ |
391 """ |
392 return self.__client |
392 return self.__client |
393 |
393 |
394 def __editorCommandMessage(self, hash, fileName, message): |
394 def __editorCommandMessage(self, hashStr, fileName, message): |
395 """ |
395 """ |
396 Private slot to handle editor command messages from the client. |
396 Private slot to handle editor command messages from the client. |
397 |
397 |
398 @param hash hash of the project (string) |
398 @param hashStr hash of the project (string) |
399 @param fileName project relative file name of the editor (string) |
399 @param fileName project relative file name of the editor (string) |
400 @param message command message (string) |
400 @param message command message (string) |
401 """ |
401 """ |
402 self.editorCommand.emit(hash, fileName, message) |
402 self.editorCommand.emit(hashStr, fileName, message) |
403 |
403 |
404 from QScintilla.Editor import Editor |
404 from QScintilla.Editor import Editor |
405 if message.startswith(Editor.StartEditToken + Editor.Separator) or \ |
405 if message.startswith(Editor.StartEditToken + Editor.Separator) or \ |
406 message.startswith(Editor.EndEditToken + Editor.Separator): |
406 message.startswith(Editor.EndEditToken + Editor.Separator): |
407 vm = e5App().getObject("ViewManager") |
407 vm = e5App().getObject("ViewManager") |