'Add a new saveable.
Args:
name: The name to use.
save: The function to call to save this saveable.
changed: The signal emitted when this saveable changed.
config_opt: A (section, option) tuple deciding whether to auto-save
or not.
filename: The filename of the underlying file, so we can force
saving if it doesn\'t exist.
dirty: Whether the saveable is already dirty.'

def add_saveable(self, name, save, changed=None, config_opt=None, filename=None, dirty=False):

    if (name in self.saveables):
        raise ValueError('Saveable    {}    already    registered!'.format(name))
    saveable = Saveable(name, save, changed, config_opt, filename)
    self.saveables[name] = saveable
    if dirty:
        saveable.mark_dirty()
        QTimer.singleShot(0, saveable.save)
