Commit graph

66 commits

Author SHA1 Message Date
Miika Turkia
f6be4ccf22 Add GUI support for exporting in CSV format
This patch adds an item to File menu to export all dives in CSV format.
Naturally this includes also the code to perform the export.

Fixes #434

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-26 17:20:32 -07:00
Willem Ferguson
1b6d4f55df Use Luisa's new icons
Move the heart rate graph icon up in the toolbox with the cluster of
buttons that control graphs

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-16 12:10:41 -07:00
Lakshman
6a8d929876 Feature to show or hide heart rate graph
Adds new push button "HR" to the button bar on the dive profile to
toggle display of heart rate.

TODO: New icon for the heart rate button is needed.

Fixes #485

Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-10 09:21:43 -07:00
Gehad
71afa05b84 Adding shortcut key sequence to the worldmap exporter
Adding Shortcut (Ctrl+H) to the worldmap exporter for consistency with
the other commands in the file menu

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02 19:05:57 -07:00
Joshua Joseph
ede6a38bcf Add "Check for updates" Feature
This patch adds a check for updates feature.

It connects to http://subsurface.hohndel.org/updatecheck.html to check for
any new versions. It then prompts the user with a download link if an
update is available.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-02 12:47:41 -07:00
Gehad
0cd9d09410 Exporting a World-Map
This patch adds the world map exporter.

- add worldmap-save.c that writes the html to the file
- use Google maps v3 API to put the place marks on the map
- add worldmap-options.h to contain some settings for the JS which will
  make it easier for those to be changed
- add save HTML action in the mainwindow user interface

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-30 15:52:32 -07:00
Tomaz Canabrava
ac9a23ef3b Remove the old profile from the main screen of Subsurface
This patch partially removes the code for the old profile from
Subsurface. It removes the use of the old profile on the mainwindow,
but keeping the code in the tree for now.

A bit of code-cleanup also entered this commit because I had to change
every instance of the code that used the old profile.

Now to the real code-cleanup

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-07 08:54:20 -08:00
Willem Ferguson
480280937a Changes to icons in profile panel
- Replace dustbin icon.
- Replace NDL/TTS tool tip with "Show NDL / TTS"
- Create tool tip for scale icon: "Rescale depth axis"

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-04 12:59:17 -08:00
Willem Ferguson
8518348304 Reorganise buttons in profile panel
- Move the buttons of the profile window around to have more sane positions.
- All the buttons affecting the ceiling(s) are now grouped together.
- All the buttons affecting the Information Box are now grouped together.
- The previous icon for "Show calculated ceiling" has been reassigned to
  "Show all tissues"
- A new stand-in button hav been included for "Show calculated ceiling"

Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-04 07:54:52 -08:00
Giuseppe 'ferdy' Miceli
9b0817596d Correct another typo
Non-stop Dive Limit (or No Deco Limit) abbreviation is not NTL but NDL

Signed-off-by: Giuseppe 'ferdy' Miceli <ferdy@ferdy.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03 09:43:07 -08:00
Giuseppe 'ferdy' Miceli
3b1b01b293 Correct typo in partial pressure abbreviations
Partial pressures abbreviations should have capitalized chemical element
symbols  e.g. pn2 -> pN2

Signed-off-by: Giuseppe 'ferdy' Miceli <ferdy@ferdy.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03 09:40:51 -08:00
Dirk Hohndel
c4f49d5075 Equivalent Air Density Depth was mislabeled
In commit c84ef319a2 ("Create a toolbox on the left side of the new
profile") Tomaz invented a new TLA: EED.

No one noticed. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03 09:22:22 -08:00
Anton Lundin
3df506b081 Spelling fix, Its called Ndl
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 11:16:38 -08:00
Andrey Zhdanov
3be1358b46 Icons for new profile
Existing dummy icons are replaced with new ones for:
- o2 graph
- n2 graph
- He graph
- MOD
- EAD, EED, END
- DC reported ceiling
- calculated ceiling
- calculated ceiling in 3m increments
- SAC
- ruler

Fixes #446

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 10:53:30 -08:00
Tomaz Canabrava
52fe9101c8 New profile: add placeholder code for the RulerItem
This patch just creates two files for the rulerItem, a .h and a .cpp.
nothing was done to make it visible on the new profile yet - will do that
on the next commits

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
8c56b2f45e Store zoomed plot in preferences
This patch makes the 'Zoomed Plot' a preference that can be stored and
retrieved, this way if the user sets the plot to be 'zoomed', this
information will persist even if they closed or opened subsurface again.

Also, added the 'Scale' button on the new profile, but didn't did the glue
code yet.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:35 -08:00
Tomaz Canabrava
bf4144a012 Removed the 'Unused Tanks' from the toolbar.
Just removed the unused tanks from the toolbar,
since it's just a removal of something on the ui
related code, it's good to see how much verbose
the xml to generate the UI is.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-14 21:50:05 -08:00
Boris Barbulovski
51220f26ef Add recent files to main menu.
Add(up to four) recent files to File main menu.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-13 22:05:05 -08:00
Dirk Hohndel
9bd77b51f5 Give the widget for the new profile a better name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-11 12:36:03 -08:00
Danilo Cesar Lemes de Paula
31c45b8c4c Enable the dive planning under a compile flag
Allow subsurface to show the dive planner in case a compile flag is given.

qmake CONFIG+=planner

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-10 08:08:20 -08:00
Tomaz Canabrava
c84ef319a2 Create a toolbox on the left side of the new profile
For quick acess of preferences the show / hide stuff from the Settings
dialog is now in that toolbox and in the future we can put a few more,
like 'Show Notifications Panel' and 'Enable Legend'

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-06 06:34:05 -08:00
Dirk Hohndel
3387ccc6f6 Show old profile when starting Subsurface
Tomaz code had us start on the depth model tab (when built in debug mode).
It seems to make much more sense to still show the fully featured profile
by default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 10:21:50 +07:00
Tomaz Canabrava
946e3855b2 Add the skeleton for the New Profile System.
The idea of this widget is to display and edit the profile.

It has:
 1 - ToolTip / Legend item, displays every information of the current
     mouse position on it, plus the legend for the maps.
 2 - ToolBox, displays the QActions that are used to do special stuff
     on the profile ( like activating the plugins. )
 3 - Cartesian Axis for depth ( y )
 4 - Cartesian Axis for Gases ( y )
 5 - Cartesian Axis for Time  ( x )

It needs to be dynamic, things should *flow* on it, not just appear / disappear.
It's the last attempt to create a QGraphicsView based Profile System,
as the next will most probably be written in QML.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 09:45:42 +07:00
Boris Barbulovski
7d741a0022 Add-main-window-full-screen-feature
This patch enables main window full screen mode by menu toggle or pressing
F11.

[Dirk Hohndel: whitespace cleanup]

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-15 06:28:01 +07:00
Miika Turkia
a62f68e905 Rename menu entry for log import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:09 -08:00
Miika Turkia
b052b790df Refactoring import to DiveLogImportDialog
Changing the import stuff to DiveLogImport. Now we should have one
import function/dialog for importing divelogs instead of multiple menu
entries.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-03 10:30:08 -08:00
Tomaz Canabrava
c5c44e3a82 Kill the use of CSS - Fixes a Lot of issues on dark color schemes.
The css was done by me in the first days of subsurface for Qt, and it
was a code that I was never proud of. Mostly because I tougth at the
time that it was better to write it into CSS than to create a new class
just to take care of the size of the default cell height on a tree view.

Now I see that it was a biased approach since it created issues on
dark color schemes and it also didn't make a 'native' experience on
Gnome or OSX, only on KDE.

This fixes that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 03:26:39 +01:00
Anton Lundin
e6c51cc314 Implement a settingsChanged in DivePlannerWidget
This is so we can default to the GF's from the preferences. We need the
bail handler in createTemporaryPlan, because its triggered when we
change GF's, and if we don't have a stagingDive there, we will access a
NULL-pointer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-09 07:51:40 +01:00
Thiago Macieira
53f38a2410 Set the menuRole property on certain menu entry QActions
Telling Qt that the "Preferences" menu entry is
QAction::PreferencesRole will make it be moved to the System menu on
Mac, for example.

Fixes #327

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 21:46:37 -08:00
Dirk Hohndel
82ac264815 Remove more unused windowTitle properties
These just create pointless source strings for translations.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:02:15 -08:00
Dirk Hohndel
c4a47a7d60 Get rid of the planner
This is nothing but an indefinite time sink. Let's focus on things that
the majority of our users actually need and use.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15 11:39:59 -08:00
Dirk Hohndel
354a091e14 Change the menu structure
Mostly based on suggestions by Tomaz and Luisa (but with some changes
based on my rather strongly held believes).

I also tried to clean up the shortcut keys. Not sure if I got this right.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14 22:17:27 +09:00
Miika Turkia
1a4d098ef2 Add alt based shortcuts to access menus
This adds alt-f shortcut to access file menu as well as other similar
alt based shortcuts for other menu items.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-27 10:58:52 -07:00
Tomaz Canabrava
6cf875ed92 Reorganized the downlads menu for the inclusion of more webservices.
This patch moves around a few items on the menu to a new submenu
downloads/uploads. I think it's not the best way, but it already
fives a bit more of 'unverbosity', because the old menu had
'Download from Dive Computer', 'Download from Webservices', and
now we would introduce a new 'Download from Divelogs.de'
I tougth it was better to have a 'parent' named 'Download' and
put all children inside. this can grow quite big as soon as I implement
the plugin system for that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24 22:57:43 -02:00
Dirk Hohndel
8259b1a59a Implement hook up autogroup menu
This tracks the autogroup state remembered in data files. Toggling the
checkable menu item causes the divelist to be marked as changed. This
might actually be untrue - but that's really hard to track so this is the
"better safe than sorry" approach.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-17 16:30:32 -07:00
Miika Turkia
4c49670cdb GUI for CSV import
This patch implements GUI for importing CSV log files. One is able to
configure what columns contain time, depth and temperature fields.
Pre-configured log applications currently included are ADP log viewer
and XP5. (Both of these use actually tab as separator, so the field
separator currently hard-coded.)

[Dirk Hohndel: minor fixes]

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-16 12:44:07 -07:00
Tomaz Canabrava
28dd4d144a More cleanup for the Gtk+ Style
This patch eliminates 18px offset from the MainWindow main
layout, making the window feel less spacy. Good on the Gtk+
style, but seems to also make a good work on the Oxygen one.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-26 16:55:41 -03:00
Tomaz Canabrava
8f94b904dd Cleanup the prettyness of subsurface on Gtk+ style.
Fix some stuff concerning the pretyness of subsurface while running
on Gnome and XFCE enviroments. This is the kind of stuff that I
really didn`t want to put on the code but sometimes it`s for the
best. this makes the MainTab much more bearable. There are still
things to fix, like the size and positioning of some of the icons.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-26 16:51:11 -03:00
Tomaz Canabrava
3fe3426b14 Fixe: Show the profile and info window on opening.
Fixed showing the profile and info window when opening
the program. For some reason ( easy testing of the planner )
the planner was being opened instead of the profile and
info window. now everything's back to normal.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-02 05:55:37 -03:00
Dirk Hohndel
0c56a8c1b0 Build fix
I don't quite understand why this was needed - or how this can build for
Tomaz without it...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-08-30 20:36:15 -07:00
Tomaz Canabrava
0a043528f7 Added a new widget to control the Planner
Added a new widget to control the DivePlanner, now we
have two widgets, a graphics one and a qt sidget based one.
the Technical divers will most likely use the QtWidget one
while the hobbists will most likely use the QGraphicsView
one. there's not a option to choose one, they both will
appear at the same time.

Next step: make the screens to work.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-08-26 08:43:37 -03:00
Tomaz Canabrava
1244438b01 Moved the DivePlanner to the MainWindow.
Now, activating the dive planner will hide the profile
and show the planner on the same place. we still need
a way to 'cancel' or 'accept' the profile created.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-27 14:48:03 -03:00
Lubomir I. Ivanov
c92cf925bd Reorder the 'View->View ..' list
Use Ctrl+1 for 'View All', while all the singular views follow
with Ctrl+2..5.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-27 07:22:49 +08:00
Tomaz Canabrava
062515ba6f Added back the menu entry 'Dive Planner'
Added back the menu entry Dive Planner, and removed the
calee code from the Print action.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-20 18:48:21 -03:00
Dirk Hohndel
e34da61362 Merge branch 'linusDiveList' of https://github.com/tcanabrava/subsurface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-13 19:56:36 +02:00
Tomaz Canabrava
7e9d6e2829 Fixed the show / hide dialog shortcuts to take the splitter into consideration
Fixed the show / hide dialog shortcuts to take the splitter into consideration,
 So, here's the deal.
 We have a few QSplitters that takes care of helping us with the
 size of a few widgets, they are ok, and we should continue using them
 to manage the visibility of them too. But the way that we did before was to
 widget->hide(); something, and if you hided something using the splitter,
 by holding it's handle and collapsing the widget, then you used the 'ctrl+number'
 shortcut to show it, it whould only show a gray panel.

 This patch makes everything behave using the splitters.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-12 15:54:55 -03:00
Dirk Hohndel
863c485939 Add fifth view mode "Globe" for main window
For consistency I didn't change the meaning of Ctrl-1/2/3/4 and added
this as Ctrl-5 - but one could just as easily make the argument that
"ViewGlobe" should be Ctrl-4 and "ViewAll" should be Ctrl-5.

This ensures that only one of the four widgets is shown in the
individual modes, but it doesn't address the drawing issues with the
profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-12 14:53:23 -04:00
Tomaz Canabrava
1baef83791 Added the option to create a new dive from the menu.
This patch adds a dive from the menu, it's the dive that will
be used to add a new dive plan. so, I also removed the option
'add imput plan' from the menu.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-10 15:34:57 -03:00
Tomaz Canabrava
422e0f94d6 Added the 'F1' key as standard shortcut for the Help
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-31 05:32:59 +09:00
Tomaz Canabrava
5a994b08f6 Saves the selection to select it later.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-28 17:46:40 -03:00