Esempio n. 1
0
 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())
Esempio n. 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())
Esempio n. 3
0
 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())