OS Detection

--001a113a374080d8af04fbd33a62
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sun, Jun 15, 2014 at 1:07 AM, Thiago Macieira <thiago@macieira.org>
wrote:

> Em s=C3=A1b 14 jun 2014, =C3=A0s 15:05:24, Thiago Macieira escreveu:
>
>
> Also, please keep the original copyright headers from the files you copie=
d.
> --
>

Attached patch adds Qt copyright to both files.

--=20
Thanks,
Joshua

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jun 15, 2014 at 1:07 AM, Thiago Macieira <span dir="ltr">&lt;<a href="mailto:thiago@macieira.org" target="_blank">thiago@macieira.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Em sáb 14 jun 2014, às 15:05:24, Thiago Macieira escreveu:<br>
<div class=""><br>
<br>
</div>Also, please keep the original copyright headers from the files you copied.<br>
<div class="HOEnZb"><div class="h5">--<br></div></div></blockquote><div><br></div><div>Attached patch adds Qt copyright to both files. </div></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>Thanks,</div><div>
Joshua</div><div><b><br></b></div></div>
</div></div>

From 092bea260da8b02437c54eac51fd4fa044069e0e Mon Sep 17 00:00:00 2001
From: "Joseph W. Joshua" <joejoshw@gmail.com>
Date: Sun, 15 Jun 2014 01:20:12 +0300
Subject: [PATCH] Include Qt copyright headers in SubsurfaceSysInfo

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Report saving to file errors.

Use subsurface report_error function in save-html and worldmap-save
instead of the ridiculous print to standard output.

Also use subsurface_fopen for the sake of different platforms.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: export DC samples to JSON format.

-Export Dive computer samples to JSON format, for dive profile plotting.
-Add maxdepth and duration to attributes of the JSON dive object.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Write cylinder data to the JSON files.

Iterate the cylinders in each dive and write cylinders data to the
exported JSON files.

Moving the write attribute function to the top of the file.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: define the visited array type to boolean

The boolean array must be defined explicitly, to prevent type casting.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Show dive profile embedded in HTML5 canvas

Plot samples from dive computer (depth,time) with HTML5 canvas.
Add very small API for curve drawing and coloring. Add the dive
equipment to the detailed dive view.

in the dive list when a dive is expanded you can show the dive
profile,equipments and dive information by clicking on 'show more
details'.

Fixing the two themes to work well with the new div added that
carry detailed dive information.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Dynamically loading an external JavaScript or CSS file

This enable the HTML template from linking JS and CSS files dynamically
when starting. This helps to recognize the folder name where js and css
where exported dynamically.

The HTML template will succesfully find the attached files as long as they
exist in a directory named as the HTML file.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: fix the exporting dialog

export HTML into the file name choosen and export additional files into
a subdirectoy beside the html file, called htmlfilename_files

This is to follow the convension and doesn't create additional
directories to wrap the exports.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: remove theme file if already exist in the export directory

as QFile:copy doesn't overwrite files by default, we must check before
copying if file exist and remove it.

We must be able to overwrite files here, user is already notified and
choosed to replace them.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: move between dives in detailed view.

Move between next/prev dives in detailed view, and be able to go back to
the list.
Also fix the initial state of the sorting by number.
(its already exported in ascending order)

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Create Dive Computer configuration dialog

Create a dialog for reading and writing settings to and
from dive computers, with a menu entry in MainWindow to
open the dialog.

I will build up on this dialog and change it as needed.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Load vendor list and product list

Using code from 'downloadfromdivecomputer' class, this code
loads the vendors and products to the respective comboboxes.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Read basic details from dive computer

Added classes for reading data from dive computer. This is
at the basic level and I will expand it as I go along.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Create class to write settings to dive computer

Adds a class to write settings to dive computer, and modifies
the existing ones to integrate it.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Change dive computer family detection

Following suggestions on the mailing list, this changes the
method used to detect the dive computer family. Detection is
now done using: dc_device_get_type.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Improve writing of date and time to dive computer

Improves writing of date and time to the dive computer. This
has been tested using the Heinrichs Weikamp OSTC-3.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Improve writing of device name to dive computers.

Improves the writing of device name to the dive computer. The
code has been updated to use a switch statement.

This will make it easier to add new devices in the future.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Add brightness setting

Adds a setting to control the device's brightness. Currently I
have only the OSTC 3. Will add more afterwards.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Move divecomputer configuration code to different files

This splits the code in configuredivecomputer.cpp into multiple files.
The read and write threads are moved to configuredivecomputerthreads.h/cpp,
and the device details class is moved to devicedetails.h/.cpp

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Polish up on classes

This patch polishes up on all classes added for dive computer
configuration to give a clean workflow. The classes can now
write and read data from the OSTC 3.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>