Пример #1
0
 def doFind(self, kkey):
     if (kkey == IMC.ctl_F) or (self.findText.isEmpty()):
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.webPage.selectedText())
         (ok, self.findText) = pqMsgs.getFindMsg(self, prepText)
     # dialog or no dialog, we should have some findText now
     if not self.findText.isEmpty():
         if not self.webPage.findText(self.findText,
                                      QWebPage.FindWrapsAroundDocument):
             pqMsgs.beep()
Пример #2
0
 def doFind(self,kkey):
     if (kkey == IMC.ctl_F) or (self.findText.isEmpty()) :
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.textCursor().selectedText())
         (ok, self.findText) = pqMsgs.getFindMsg(self,prepText)
     # dialog or no dialog, we should have some findText now
     if not self.findText.isEmpty() :
         if not self.find(self.findText): # no hits going down
             self.moveCursor(QTextCursor.Start) # go to top
             if not self.find(self.findText): # still no hit
                 pqMsgs.beep()
Пример #3
0
 def doFind(self, kkey):
     if (kkey == IMC.ctl_F) or (self.userFindText.isEmpty()):
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.page().selectedText())
         (ok, self.userFindText) = pqMsgs.getFindMsg(self, prepText)
     # We should have some findText now, either left from previous find
     # on a ctl-G, or entered by user. If none, then user cleared dialog.
     if not self.userFindText.isEmpty():
         if not self.page().findText(self.userFindText,
                                     QWebPage.FindWrapsAroundDocument):
             pqMsgs.beep()
Пример #4
0
 def doFind(self, kkey):
     if (kkey == IMC.ctl_F) or (self.findText.isEmpty()):
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.textCursor().selectedText())
         (ok, self.findText) = pqMsgs.getFindMsg(self, prepText)
     # dialog or no dialog, we should have some findText now
     if not self.findText.isEmpty():
         if not self.find(self.findText):  # no hits going down
             self.moveCursor(QTextCursor.Start)  # go to top
             if not self.find(self.findText):  # still no hit
                 pqMsgs.beep()
Пример #5
0
 def doFind(self,kkey):
     if (kkey == IMC.ctl_F) or (self.findText.isEmpty()) :
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.webPage.selectedText())
         (ok, self.findText) = pqMsgs.getFindMsg(self,prepText)
     # dialog or no dialog, we should have some findText now
     if not self.findText.isEmpty() :
         if not self.webPage.findText(
             self.findText, QWebPage.FindWrapsAroundDocument
             ) :
             pqMsgs.beep()
Пример #6
0
 def doFind(self,kkey):
     if (kkey == IMC.ctl_F) or (self.userFindText.isEmpty()) :
         # ctl+F, or ctl+G but no previous find done, show the find dialog
         # with a COPY of current selection as pqMsgs might truncate it
         prepText = QString(self.page().selectedText())
         (ok, self.userFindText) = pqMsgs.getFindMsg(self,prepText)
     # We should have some findText now, either left from previous find
     # on a ctl-G, or entered by user. If none, then user cleared dialog.
     if not self.userFindText.isEmpty() :
         if not self.page().findText(
             self.userFindText, QWebPage.FindWrapsAroundDocument
             ) :
             pqMsgs.beep()