Feature request #3297
Add projectSaved() signal to the QgisInterface
|Pull Request or Patch supplied:||Resolution:||worksforme|
|Easy fix?:||No||Copied to github as #:||13357|
Creates a projectSaved() signal that can be used by plugins to take actions when a project is saved.
This matches the projectRead() signal emitted when a project is read, allowing a plugin to carry out corresponding activities when a project is saved and read.
#2 Updated by Martin Dobias almost 11 years ago
The patch looks OK, but I'm wondering whether the plugins wouldn't profit more from a signal e.g. "projectWillBeSaved" which would be called before saving the project file, so that plugins could alter the project file somehow (given they receive project's QDomDocument with the signal).
#3 Updated by Chris Crook almost 11 years ago
In this case I'm thinking that I need a signal after the project is successfully saved. I'm not doing anything with the DOM, I'm saving other data external to the project file. I want to be sure that the project file is successfully saved (and the filename is defined), before I do this.
I agree that a projectWillBeSaved(QDom), or maybe savingProject(QDom), would also be a useful signal.
#5 Updated by Chris Crook almost 11 years ago
- Resolution set to worksforme
- Status changed from Open to Closed
Good point .. it does indeed seem to work.
I hadn't realised that the QgsProject was a singleton, so I can just attach to the .instance() signals. Although the timing of the event doesn't fit perfectly (the file is not completely written) I think this is works for me!