I am trying to do field data collection using QGIS. One of the features that I regard as necessary for data management is timestamps. For example, a timestamp can indicate that an inspection record has been updated.
I have figured out how to add triggers using Spatialite to add a timestamp on update, however the timestamp is added when the edited records are saved and not when the identify dialog box is closed. This means that timestamps can be out by many minutes. One solution would be to force the updated record to be saved by using a custom form with an OK button (Can do the form with Qt-Designer but don't know how to add the save command to the button yet.) However my preferred solution would be to take a timestamp for new records, when the point or line is created. The reason for this is if I am surveying a road, I can stand on the road, collect the point and them move to the side to complete data collection.
I have been unable to work out how to get Spatialite to run a trigger that puts in the start of feature editing. Perhaps this is also something that needs to be done by code in a custom form. Is there an On-dirty event or signal in QGIS that indicates when someone starts editing a record and that can be used to capture the time? Could I also ask what the Python code (and what to hook it to) that would put such a timestamp in the timestamp field.