About c-functions that make UI calls. [qt-rewrite]

Tomaz Canabrava tcanabrava at kde.org
Wed Apr 3 05:50:21 PDT 2013


People,

I'v managed to integrate my files to the Makefile (yey), so now I'm trying
to detach the GTK code and put the Qt code in the old place.

in dive.h there's quite a bunch function definitions of interface related
things, that are being called in a lot of places on the code, and basically
they creates an ui, process things then close the ui.

How this is going to be managed?

1 - Continue the way that it is, port the code *inside* the function calls
to Qt.

This will create a code that's not easily understandable from people with
Qt experience, since we are used to a more 'class-methods' thinking, and Qt
callback system ( Signals / Slots ) needs the callback to be a class
member, so for this one to work a good amount of boilerplate code is needed.

2 - Remove the interface calls from the non-interface code ( there's a few
in main.c for instance ), adapt the code and use it on the interface by
calling a few methods, basically transforming all the logic of the
subsurface in a library, then using the library on the interface.

This will create a code that's easily understandable by qt-people, and can
also have some benefits, like an future Android-based version of subsurface
using QtQuick.

I need to know what you guys prefer before digging more into the code.

Tomaz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130403/11a47153/attachment-0001.html>


More information about the subsurface mailing list