aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogexportdialog.cpp
AgeCommit message (Collapse)Author
2015-06-16HTML export: separate UI and logic codeGravatar Dirk Hohndel
In order to be able to initiate an HTML export from the core library we need to separate the actual logic from the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Do not connect null to a signalGravatar Tomaz Canabrava
The parent here should have been the mainwindow, but we create this dialog on the stack instead of the heap and because of that we don't set the parent to prevent a double free. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-14Make exporting photos with HTML optionalGravatar Gehad Elrobey
This adds the ability to choose either to export photos or not. Patch is attached. -- regards, Gehad From 6476e1227b72d8297f9aecc2e6cc6f70d07f87ae Mon Sep 17 00:00:00 2001 From: Gehad elrobey <gehadelrobey@gmail.com> Date: Fri, 13 Mar 2015 15:31:24 +0200 Subject: [PATCH] Make exporting photos with HTML optional Add the option to enable/disable exporting photos with the HTML. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27Show translated String.Gravatar Gehad elrobey
Translated notifications are always better. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-27Creating a Notification widget in the Main Window.Gravatar Gehad elrobey
The main error message bar can be used to show exporting information and other notification. So a new Notification handler object is created in the main window <NotificationWidget> that inherits <KMessageWidget> that shows different type of notifications, ex. (Warning, Error and information) Also this class contains a QFutureWatcher object that is set to handle the QFuture variable returned from the exporting thread. this will allow the UI to be updated when the thread finishes execution. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-22Revert "Update Qt4 patch"Gravatar Dirk Hohndel
This reverts commit 762315e7eef47c1a5357e9c8691676707e3c630e. Oops, this was supposed to update the patch, not update and apply it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-19Update Qt4 patchGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix Null values in yearly statistics export.Gravatar Gehad elrobey
Null values should be handeled nicely instead of showing NULL or Nan. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-15HTML: Fix exporting themes in multilingual environmentGravatar Gehad elrobey
Don't compare to static english string, must translate first. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-31Export the XSLT based exports in a new thread.Gravatar Gehad elrobey
The XSLT based exports can consume long time while applying the xml format. This time can make the GUI unresponsive. Simply call the export functions in a new Thread. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Write depth unit for current dive not previousGravatar Miika Turkia
The unit was stored to the variable after it was used, thus we need to delay the print of the unit slightly. (In practice the depth unit for first picture was null before this fix.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-25Fix segmentation fault on exporting picture depthsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Clean up the header filesGravatar Dirk Hohndel
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-31Use unit selection for XSL transformation on CSV exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-29Highlight that this CSV export is about dive profile.Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-29Description of CSV detail exportGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-21Add second CSV export with dive detailsGravatar Dirk Hohndel
This is intended to export all the details that someone might copy from a paper logbook. We need a matching import template to make this simple. This hasn't been well tested, I'm sure it will break when elements and attributes are missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Compare image times and sample times as signed intsGravatar Robert C. Helling
The problem that we were comparing signed and unsigned ints was originally found by Lubomir. As image times can be negative (and the comparison should fail in that case) we need to compared them as signed. Signed-off-by: Robert C. Helling <helling@atdotde.de> Acked-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27divelogexportdialog.cpp: fix a 'uninitialized variable' warningGravatar Lubomir I. Ivanov
DiveLogExportDialog::export_depths() We set a default value of 'unit' which will silence the warning itself. Then hope that the compiler will respect the argument order i.e. call get_depth_units() (which sets 'unit') before using *unit as the last argument passsed to put_format(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20HTML: Export unit preferences to settings fileGravatar Gehad elrobey
Working on HTML exports to support imperial and metric units and also custom selected units based on subsurface preferences. User selected units is exported to settings file that will be mainly used by listlib javascript file. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-14Export to DiveShareGravatar Salvo 'LtWorf' Tomaselli
Adds the possibility of exporting dives to DiveShare. Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Add export for depths of images takenGravatar Robert C. Helling
This adds an option to the export dialog to write an ascii file containing filenames of image files a tab and the depth at the time of the image taken. [Dirk Hohndel: whitespace cleanup] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-28HTML: Changing the files extensions to jsGravatar Gehad elrobey
These are actually javascript files containing js objects and not json files. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: export Translated strings to JSON files.Gravatar Gehad elrobey
First step towards multilingual export. Use the existing translation API to translate and save words to JSON 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>
2014-08-11HTML: Don't export total statistics value if not chosenGravatar Gehad elrobey
Don't export total row in yearly statistics unless exporting the statistics is checked 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>
2014-08-11HTML: Remember General Export Settings.Gravatar Gehad elrobey
Set Default values and remember user selected general HTML export settings. 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>
2014-08-11HTML: Add total row to yearly statistics table.Gravatar Gehad elrobey
Add new row to the yearly statistics table containing the total. Total values are calculated to some columns only, it doesn't make any sense to add the total value to other columns (Temperature cols for example). 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>
2014-08-11HTML: Make export statistics optional.Gravatar Gehad elrobey
Make exporting statistics to the HTML page optional. 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>
2014-08-04HTML: export yearly statistics to JSON files.Gravatar Gehad elrobey
Save Yearly statistics as JSON data to the stats_files. 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>
2014-07-31When exporting to XML and no extension given, default to .ssrfGravatar Dirk Hohndel
See #646 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-14HTML: Add dive photos to the detailed viewGravatar Gehad elrobey
Dive photos are copied to the photos directory on export. The photos section appears only if photos exist. C++ helper functions are added to copy images to the photos directory, Additionally the photos directory must be passed as a parameter to the write_one_dive function to save photos to it. Some options structure may be needed instead of passing many arguments. 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>
2014-07-11HTML: fix profile labelsGravatar Gehad elrobey
Fix labels view in dive profile. Add Jqplot css file to the exports. The css files fix the view and enahnce the plot. 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>
2014-07-10Add diveloexportdialog explaination strings for translationGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10divelogexportdialog capitalisation consistencyGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10Fix exporting all dives in Subsurface formatGravatar Miika Turkia
Exporting in Subsurface format saved only selected dives even if user attempted to save all dives. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30HTML: Use jqplot to draw profile.Gravatar Gehad elrobey
Use jqplot to draw dive profile, Depth and pressure curves. add the library Javascript files under the theme directory and editing the exporter. Load them to the HTML template dynamically with synchronization as they are dependant on each other. Also Adding min version of JQuery that is needed by the library. 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>
2014-06-24HTML: Overwrite all template files if existGravatar Gehad elrobey
Template HTML files must be overwritten when exporting if already exist. 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>
2014-06-24HTML: user export options ask for numberingGravatar Gehad elrobey
Ask if you want the exporter to rearrange the dive numbers starting from 1 or use the existing numbers in subsurface. one may need to have the dives exported in the same number to reference them easier. 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>
2014-06-24HTML: Add export list only optionGravatar Gehad elrobey
Exporting small dive list only or choose to export the dive list with all the dive details like the profile, Bookmarks, dive equipments and statistics. 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>
2014-06-18Don't use std::string in our codeGravatar Thiago Macieira
This also explicitly states the encoding. It's just a file name and it's always ASCII for us, but it's clear now. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-15HTML: remove theme file if already exist in the export directoryGravatar Gehad elrobey
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>
2014-06-15HTML: fix the exporting dialogGravatar Gehad elrobey
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>
2014-06-12Much needed clean on the HTML export dialog code.Gravatar Tomaz Canabrava
Correct usage of QFile, QString and code cleanup. [Dirk Hohndel: plus whitespace cleanup and removal of qDebug() calls] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Change the QDialog for html export to getExistingFolderGravatar Tomaz Canabrava
The QDialog for html creates a folder, we need to choose a folder, not a file. getSaveFileName was wrong. ;p Fixes #533 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08Correctly test QString for being emptyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06HTML: export to system dependant path separatorGravatar Gehad elrobey
This will make the exporting path separators platform dependant 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>
2014-06-03Fix HTML export white space issuesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-03Remember selection of export HTML settingsGravatar Gehad elrobey
Add a new QSettings group "HTML" to save the HTML exporting settings and restore them later. 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>
2014-06-03Add HTML tab in export dialogGravatar Gehad elrobey
- Separate the export dialog into two tabs general exports for other exports and HTML export. - Save HTML settings to JSON file - Copy HTML templates to the exporting directory 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>
2014-05-29HTML list exporterGravatar Gehad elrobey
Exporting the raw dive list into JSON format for later viewing with html and js files. Also some worldmap code organizations. 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>