Beispiel #1
0
 def go_to_error(self, text):
     """Go to error if relevant"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         self.emit(SIGNAL("edit_goto(QString,int,QString)"),
                   osp.abspath(fname), int(lnb), '')
Beispiel #2
0
 def mouseReleaseEvent(self, event):
     """Go to error"""
     self.QT_CLASS.mouseReleaseEvent(self, event)            
     text = self.get_line_at(event.pos())
     if get_error_match(text) and not self.has_selected_text():
         if self.go_to_error is not None:
             self.go_to_error.emit(text)
Beispiel #3
0
 def go_to_error(self, text):
     """Go to error if relevant"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         self.emit(SIGNAL("edit_goto(QString,int,QString)"),
                   osp.abspath(fname), int(lnb), '')
Beispiel #4
0
 def open_with_external_spyder(self, text):
     """Load file in external Spyder's editor, if available
     This method is used only for embedded consoles
     (could also be useful if we ever implement the magic %edit command)"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         builtins.open_in_spyder(fname, int(lnb))
Beispiel #5
0
 def open_with_external_spyder(self, text):
     """Load file in external Spyder's editor, if available
     This method is used only for embedded consoles
     (could also be useful if we ever implement the magic %edit command)"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         builtins.open_in_spyder(fname, int(lnb))
Beispiel #6
0
 def mouseMoveEvent(self, event):
     """Show Pointing Hand Cursor on error messages"""
     text = self.get_line_at(event.pos())
     if get_error_match(text):
         if not self.__cursor_changed:
             QApplication.setOverrideCursor(QCursor(Qt.PointingHandCursor))
             self.__cursor_changed = True
         event.accept()
         return
     if self.__cursor_changed:
         QApplication.restoreOverrideCursor()
         self.__cursor_changed = False
     self.QT_CLASS.mouseMoveEvent(self, event)
Beispiel #7
0
 def mouseMoveEvent(self, event):
     """Show Pointing Hand Cursor on error messages"""
     text = self.get_line_at(event.pos())
     if get_error_match(text):
         if not self.__cursor_changed:
             QApplication.setOverrideCursor(QCursor(Qt.PointingHandCursor))
             self.__cursor_changed = True
         event.accept()
         return
     if self.__cursor_changed:
         QApplication.restoreOverrideCursor()
         self.__cursor_changed = False
     self.QT_CLASS.mouseMoveEvent(self, event)
Beispiel #8
0
 def go_to_error(self, text):
     """Go to error if relevant"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         self.edit_script(fname, int(lnb))
Beispiel #9
0
 def mouseReleaseEvent(self, event):
     """Go to error"""
     self.QT_CLASS.mouseReleaseEvent(self, event)
     text = self.get_line_at(event.pos())
     if get_error_match(text) and not self.has_selected_text():
         self.emit(SIGNAL("go_to_error(QString)"), text)
Beispiel #10
0
 def mouseReleaseEvent(self, event):
     """Go to error"""
     self.QT_CLASS.mouseReleaseEvent(self, event)            
     text = self.get_line_at(event.pos())
     if get_error_match(text) and not self.has_selected_text():
         self.emit(SIGNAL("go_to_error(QString)"), text)
Beispiel #11
0
 def go_to_error(self, text):
     """Go to error if relevant"""
     match = get_error_match(to_text_string(text))
     if match:
         fname, lnb = match.groups()
         self.edit_script(fname, int(lnb))