mavlink/qgroundcontrol — pull request #1147 by crashmatt (2014-12-25 21:47:38+00:00)
Title: Load/Save connection settings - incomplete review

Status
The comm ports can now be stored and recalled in any quantity and order. Code is based on a relatively recent master using Qt5.3.2. Changes are mostly the minimum to make it work.

Auto-connection does not work yet. I am not sure how to decide which ports should re-connect. It can either remember shich ports were open on shutdown or add a menu option. Open to suggestions.

Settings are stored on shutdown so crashed settings are not remembered. It is possible to serialize a connection when it is created but that is more complex to manage.

Mavlink protocol has not been tested, only opening a link. Only UDP and serial are tested.

Significant changes:
Both LinkManager and LinkInterface are a QGCSettingsGroup. The group serializes itself and uses a link to its parent to get the full settings path. This means groups can be moved around without a problem. I have not considered how multipe settings files will work.

The link ID number is used as an identifier for serialization and is persistent. New Link IDs are now set as the next avaialble link number, not the auto-increment it used to be.

There is now a LinkInterface.cc. There was quite a bit of repeated functionality in the children that should be in LinkInterface. For some reason it would not allow me to put this in the header. Re-re-re-comping the header was getting very tiresome so LinkInterface.cc was born. Not commented yet.