예제 #1
0
파일: editor.py 프로젝트: solarmist/anki
 def contextMenuEvent(self, evt):
     m = QMenu(self)
     a = m.addAction(_("Cut"))
     a.triggered.connect(self.onCut)
     a = m.addAction(_("Copy"))
     a.triggered.connect(self.onCopy)
     a = m.addAction(_("Paste"))
     a.triggered.connect(self.onPaste)
     runHook("EditorWebView.contextMenuEvent", self, m)
     m.popup(QCursor.pos())
예제 #2
0
def _on_transcription_button(self):
    """
    Executed when the button on the right top of the editor is pressed.
    Creates popup menu with different phonetics symbols to print.
    """
    m = QMenu(self.mw)
    symbols = "æɑɒɔəɜɪʊʌθðŋɹɫʃʒʍʔ"
    for s in symbols:
        a = m.addAction(_(s))
        a.triggered.connect(lambda ign, _s=s: self.doPaste(_s, True))
    m.popup(QCursor.pos())
예제 #3
0
파일: webview.py 프로젝트: solarmist/anki
 def contextMenuEvent(self, evt):
     m = QMenu(self)
     a = m.addAction(_("Copy"))
     a.triggered.connect(self.onCopy)
     runHook("AnkiWebView.contextMenuEvent", self, m)
     m.popup(QCursor.pos())