474 def __initChatMenu(self): |
474 def __initChatMenu(self): |
475 """ |
475 """ |
476 Private slot to initialize the chat edit context menu. |
476 Private slot to initialize the chat edit context menu. |
477 """ |
477 """ |
478 self.__chatMenu = QMenu(self) |
478 self.__chatMenu = QMenu(self) |
479 self.__cutChatAct = \ |
|
480 self.__chatMenu.addAction( |
|
481 UI.PixmapCache.getIcon("editCut.png"), |
|
482 self.trUtf8("Cut"), self.__cutChat) |
|
483 self.__copyChatAct = \ |
479 self.__copyChatAct = \ |
484 self.__chatMenu.addAction( |
480 self.__chatMenu.addAction( |
485 UI.PixmapCache.getIcon("editCopy.png"), |
481 UI.PixmapCache.getIcon("editCopy.png"), |
486 self.trUtf8("Copy"), self.__copyChat) |
482 self.trUtf8("Copy"), self.__copyChat) |
487 self.__chatMenu.addSeparator() |
483 self.__chatMenu.addSeparator() |
512 Private slot to react to text selection/deselection of the chat edit. |
508 Private slot to react to text selection/deselection of the chat edit. |
513 |
509 |
514 @param yes flag signaling the availability of selected text (boolean) |
510 @param yes flag signaling the availability of selected text (boolean) |
515 """ |
511 """ |
516 self.__copyChatAct.setEnabled(yes) |
512 self.__copyChatAct.setEnabled(yes) |
517 self.__cutChatAct.setEnabled(yes) |
|
518 |
513 |
519 @pyqtSlot(QPoint) |
514 @pyqtSlot(QPoint) |
520 def on_chatEdit_customContextMenuRequested(self, pos): |
515 def on_chatEdit_customContextMenuRequested(self, pos): |
521 """ |
516 """ |
522 Private slot to show the context menu for the chat. |
517 Private slot to show the context menu for the chat. |
579 """ |
574 """ |
580 Private slot to copy the contents of the chat display to the clipboard. |
575 Private slot to copy the contents of the chat display to the clipboard. |
581 """ |
576 """ |
582 self.chatEdit.copy() |
577 self.chatEdit.copy() |
583 |
578 |
584 def __cutChat(self): |
|
585 """ |
|
586 Private slot to cut the contents of the chat display to the clipboard. |
|
587 """ |
|
588 self.chatEdit.cut() |
|
589 |
|
590 def __copyAllChat(self): |
579 def __copyAllChat(self): |
591 """ |
580 """ |
592 Private slot to copy the contents of the chat display to the clipboard. |
581 Private slot to copy the contents of the chat display to the clipboard. |
593 """ |
582 """ |
594 txt = self.chatEdit.toPlainText() |
583 txt = self.chatEdit.toPlainText() |