def __init__(self, editor):
        """
        Constructor.

        Autosave is disabled after construction and needs to be enabled
        explicitly if required.

        Args:
            editor (Editor): editor plugin.
        """
        self.editor = editor
        self.timer = QTimer(self.editor)
        self.timer.setSingleShot(True)
        self.timer.timeout.connect(self.do_autosave)
        self._enabled = False  # Can't use setter here
        self._interval = self.DEFAULT_AUTOSAVE_INTERVAL
def __init__ ( self , editor ) : self . editor = editor self . timer = QTimer ( self . editor ) self . timer . setSingleShot ( True ) self . timer . timeout . connect ( self . do_autosave ) self . _enabled = False self . _interval = self . DEFAULT_AUTOSAVE_INTERVAL
Constructor.

        Autosave is disabled after construction and needs to be enabled
        explicitly if required.

        Args:
            editor (Editor): editor plugin.