<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 2:35 PM, Willem Ferguson <span dir="ltr"><<a href="mailto:willemferguson@zoology.up.ac.za" target="_blank">willemferguson@zoology.up.ac.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 26/01/2016 17:23, Dirk Hohndel wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The name downloadmanager.cpp could indicate a number of different things -<br>
I know that you were planning to create the model for dive computer<br>
vendors and models separately; that should go into qt-models.<br>
desktop-widgets should only contain code that's exclusively used in the<br>
desktop app, similarly qt-mobile for Subsurface-mobile.<br>
subsurface-core is intended for core functionality, qt-models for models,<br>
etc.<br>
</blockquote></span>
At this stage I am doing surgery, cutting out useful code from the main<br>
Subsurface code, putting this in a "separate class" that is, in turn, implemented by<br>
the main Subsurface code to build the desktop version. Once this is done<br>
and the desktop version builds & works ok, I will approach this separate<br>
class from the QML side, writing a QML-oriented C++ adapter that<br>
implements the new above class (i.e. methods extracted from the main code).<br>
In this way the existing code can operate more or less as always, but<br>
with some methods accessible from QML. Hope this makes sense at all?<br>
Schematically:<br>
QML <-- Adapter <-- Separate Class --> Main_Subsurface_Code<br></blockquote><div><br></div><div>Separate Class should also be the Adapter to QML<br><br></div><div>SeparateClass -> QML<br></div><div>              |------- > Widget<br></div><div> <br><br></div><div>This is what I'm trying to do with a lot of code that I'm seeing on the Mobile version ATM.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I may merge the two middle classes into a single class but at the moment<br>
I plant to keep separate what operates separate processes.<br>
Any comments on this will be incredibly comforting, or, if not,<br>
incredibly useful.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
As Sebastian pointed out, you need to make sure it's linked into your<br>
application by adding it to the SUBSURFACE_INTERFACE variable in<br>
desktop_widgets/CMakeLists.txt (assuming it is indeed part of the desktop<br>
UI) - or the corresponding variables in the CMakeLists.txt file in the<br>
correct directory.<br>
<br>
</blockquote></span>
Ha, this solves the problem. Thanks a million.<br>
<br>
Kind regards,<br>
willem<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</div></div></blockquote></div><br></div></div>