I’ve been thinking about the code to export dive sites to an XML file and 
wanted to get feedback on the three approaches I see as options:

1) Add a radio button to the Export dialog that selects “Subsurface dive sites 
XML”. The “Selected dives” or “All dives” selection would work to export either 
all of the dive sites in the table or just those associated with the selected 
dives. The upside of this is that it is very simple to implement (to be honest, 
I’ve already done it, but I’m not convinced it is the right long term answer.) 
The downside is that there is no way to export dive sites that are not yet 
associated with a dive unless you dump all dive sites.

2) The second option is to add an “Export dive site” button to the “Dive site 
management” form that Berthold added for the dive site and undo branch. This 
would allow the export of the individual dive sites, whether or not there is a 
dive associated with them yet. An “Export all dive sites” button could also be 
added to the Dive sites tab next to the existing “Purge unused dive sites” 
button.

3) The third option is to add a selection box to the table on the Dive sites 
tab that allows you to select a set of dive sites that you want to export and 
then a button that exports the selected dive sites. A toggle button to toggle 
all sites on or off could be included as well. This offers the most flexibility 
to select exactly which sites you want in the XML file and avoids having a lot 
of individual files if you’re exporting several sites.

I’m leaning towards the last option. It is probably also the most challenging 
for me to code given my limited Qt experience, but I’m willing to take a stab 
at it.

If anyone has another idea, I’m open to hearing it.

-Doug
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to