QtAgOpenGPS lives... and needs a new name

David has been learning QML and motivated me to bring the backend code more up to date and start fleshing out the GUI to make it actually usable.

We’ve come a long ways but a long ways to go, particularly in QML to make everything function as it should. The backend is essentially up to date with the latest released version of AOG, and is compatible with the saved fields (but not saved vehicles). A new release of AOG will be out soon, and that does have some significant changes to the backend code regarding AB curves and lines. In the meantime I want to get QtAOG just working at its current level before I integrate the new AOG line code, which will also require some new QML code to do that GUI.

We could definitely use some help with the QML GUI. In particular we need to make it work on Android better. That means using slide-in panels instead of new windows, and making the views able to be resized and flickable so when the on-screen keyboard is showing, the various input fields are visible still.

Currently we have two primary ways of passing data into QML and causing things to update and change. One is an object called “settings” which follows the internal, persistent QSettings store. All vehicle parameters are in this store. When they are updated in QML, the backend sees the updates, and when the backend changes them, QML sees and reacts without any code.

The other interface is a QML class called AOGInterface. This is a list of properties, signals, and functions. The signals are used any time QML elements wish to communicate something with the backend c++ code (which are connected to FormGPS slots), for example to ask for an updated list of fields or vehicles. Also there are a number of properties (similar to class-member variables) that the backend can write to, that QML will automatically react to. Additionally some of the backend state variables have been moved from C++ into this QML object, so that the C++ code can also react to them. For example, the state of the autosteer button, which used to be a variable in the FormGPS class, is now in this AOGInterface QML class, so the front-end button can turn it on and the backend can react. Also if the backend cancels autosteer, the button will react to it.

By limiting the way the front and backends communicate to these two mechanisms, we are free to alter the GUI in any way without having to change much of the backend. Also the goal is to do as much of the logic that governs how the GUI works in QML (with some javascript) as we can. For example there is no unit conversion code in the backend. Everything is in standard metric units (m, m^2, km/h, etc). The QML gui transforms these units into either metric or imperial units depending on the value of settings.isMetric. The input fields are also unit aware and automatically convert back to base metric units even if they are being entered in imperial. This is done with very little code.

The immediate goal is to get QtAOG functional at the AOG 5.8.4 level, except for some features like Bing map integration, and ISOXML support, which will come later. This means fields, vehicles, boundaries, headlands, tram lines, autosteer, auto uturn, etc.

Once AOG Reffy is released and stable, we will migrate the unified AB line code over. And ongoing will be to change and refine the GUI to better support Android.

One thing that is currently missing is AgIO. This will need to be implemented at some point. For the Android version it will have to be integrated with QtAOG, which isn’t a big deal. Until we have our own version, AgIO.exe will have to be used, perhaps with wine for Linux users.

For the long term future, I do not have specific plans. Likely QtAOG will start to diverge from AOG’s code base, and at some point the data files may not be compatible. I’m certain the GUI will differ, although AOG’s GUI is getting quite refined. Perhaps Android’s material design will influence where it goes.

I’ve got a few more weeks I can devote evenings to this endeavor, and then time starts getting scarce for me. I hope by then with help from David and others it will closer to usable.

1 Like