Esempio n. 1
0
    def focusInEvent(self, e):
        """Refresh the layout on a focus in event"""

        # Only update the layout if the config is outdated
        if self.cfg_ver != config.get_config("cfg_ver"):
            self.set_layout()
            self.cfg_ver = config.get_config("cfg_ver")
        QsciScintilla.focusInEvent(self, e)
Esempio n. 2
0
	def focusInEvent(self, e):

		"""Refresh the layout on a focus in event"""

		# Only update the layout if the config is outdated
		if self.cfg_ver != config.get_config("cfg_ver"):
			self.set_layout()
			self.cfg_ver = config.get_config("cfg_ver")
		QsciScintilla.focusInEvent(self, e)
Esempio n. 3
0
    def focusInEvent(self, event):
        """
        Reimplemented to handle focus

        @param event: 
        @type event:
        """
        if self.isVisible(): self.FocusChanged.emit()
        QsciScintilla.focusInEvent(self, event)
                                                       'The file %1 could not be opened. Error: %2') \
                                                       .arg(pathfile).arg(error.strerror)
                print IOErrorTr
            for line in reversed(file):
                self.insert(line)
            QApplication.restoreOverrideCursor()
            self.setModified(True)
            self.endUndoAction()

            self.parent.tw.listObject(self.parent.tw.currentWidget())
            self.mtime = os.stat(pathfile).st_mtime
            msgText = QCoreApplication.translate('PythonConsole',
                                                 'The file <b>"%1"</b> has been changed and reloaded') \
                                                 .arg(pathfile)
            self.parent.pc.callWidgetMessageBarEditor(msgText, 1, False)
        QsciScintilla.focusInEvent(self, e)

class EditorTab(QWidget):
    def __init__(self, parent, parentConsole, filename, *args):
        QWidget.__init__(self, parent=None, *args)
        self.tw = parent
        self.pc = parentConsole
        self.path = None

        self.fileExcuteList = {}
        self.fileExcuteList = dict()

        self.newEditor = Editor(self)
        if filename:
            self.path = filename
            if os.path.exists(filename):
Esempio n. 5
0
 def focusInEvent(self, event):
     """Reimplemented to handle focus"""
     self.emit(SIGNAL("focus_changed()"))
     self.emit(SIGNAL("focus_in()"))
     QsciScintilla.focusInEvent(self, event)
Esempio n. 6
0
 def focusInEvent(self, event):
     """Reimplemented to handle focus"""
     self.emit(SIGNAL("focus_changed()"))
     self.emit(SIGNAL("focus_in()"))
     QsciScintilla.focusInEvent(self, event)