summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2013-10-15Dependencies are too aggressive for version.hGravatar Dirk Hohndel
Apparently qmake can't tell that #include "version.h" and #include "libdivecomputer/version.h" are not the same thing. Instead of spending another bunch of hours on fixing the buildsystem I decided to just cleanup the spots where we actually use the version file and rename it to ssrf-version.h. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Fixed the moving around of the InfoPanel on non KDE enviroments.Gravatar Tomaz Canabrava
This patch restores the ability to move the info-overlay panel on the profile. For some reason the eventFilter wasn't working (and actually, looking at the code, it really shouldn't, because I didn't see where I set it to work, maybe someone (me) broke it a long time ago) well, it seems fixed now at least. :) Tested on XFCE, Gnome and KDE, with three different window managers. [Dirk Hohndel: removed debug output] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Printing adjustmentsGravatar Robert Helling
Add units to the SAC in the print-out, reduce max depth in metric to one decimal place, and leave some more characters of the notes to be printed.. Signed-off-by: Robert C. Helling <helling@atdotde.de Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Fix stupid editing errorGravatar Dirk Hohndel
Don't do "obvious cleanups" at 4 in the morning when you can't sleep because of emotionally draining issues outside of your control... and if you do, at least compile test them. This was introduced by me in commit 2f9f46cb0253 ("Random white space cleanup"). Sorry. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Fixed the Tab behavior on the QCombobox DelegateGravatar Tomaz Canabrava
This Patch fixes the tab behavior on the QComboBox delegate. For a QComboBox, tab was being treated as 'cancel' action on edit, but since it will send a editingFinished() signal, and the Qt::Key_Return will also send a editingFinished() signal, I couldn't use that method and had to do a little hack around it. The code is mostly clean and works. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Random white space cleanupGravatar Dirk Hohndel
Because I can. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15printlayout.cpp: Remove convertPixmapToGrayscale()Gravatar Lubomir I. Ivanov
Function is redundant as we should only render the profile with a custom color table. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15printdialog: Remove the pre-set DPI and some commentsGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15profilegraphics.cpp: Use text sizes in plot_text()Gravatar Lubomir I. Ivanov
Make the active font (fnt) use the 'size' member of the received text_render_options_t. This allows changing the size of certain text elements. For the moment most text elements are set to 12px. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15printlayout.cpp: Increase the font size in tables bellow profileGravatar Lubomir I. Ivanov
Because of varying font (screen) DPI we use pixel sized fonts when printing. Apparently 8px does not look that good on Windows default fonts, but kinda OK on Linux. We compensate by increasing the font size and table rows to 9px. Also decrease the padding between the table and profile to 5px. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15graphicsview-common.cpp: Add more contrast to certain B/W colorsGravatar Lubomir I. Ivanov
There was a report that the depth and time texts were small and require more contrast on the B/W print. Use BLACK1 for these. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Print: remove profile border when printingGravatar Lubomir I. Ivanov
Custom widget frame styles such as 'Sunken' and 'Raised' which seem to varry between OS will be captured as well: http://harmattan-dev.nokia.com/docs/library/html/qt4/qframe.html#Shape-enum So instead we temporarily set the profile frame to QFrame::NoFrame and then restore it to the previous value. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Enable file selection dialog for preferencesGravatar Miika Turkia
This enabled a file selection dialog for selecting default log file under the preferences. [Dirk Hohndel: added missing declaration to .h file] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14Fix the DC ceiling in the profile.Gravatar Patrick Valsecchi
entry->ndl is computed and therefore should not be used for showing the DC's ceiling. That made the DC ceiling jump to 0m when the computed celing was at 0. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Models: fix two potential crashesGravatar Lubomir I. Ivanov
CylinderModels::setDive() and WeightModel::setDive() have potential to pass the 'last' argument to beginInsertRows() as a negative number which triggers an assert that 'last' cannot be smaller than 'first'. Patch attempts to fix that by only calling beginInsertRows() when there is at least one row to insert. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Adds missing "EndPress" column header for cylinder tableGravatar Tim Wootton
The end pressure was appearing in the column headed "O2" Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13Fix uninitialized variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Fix dive planner sidebar depth unitsGravatar Linus Torvalds
The dive planner always showed the depth in our internal units, ie millimeter, in the sidebar that showed the plan points. That made little sense in metric mode, and none at all in imperial. The _graph_ showed things in meter and feet. So make the DivePlannerPointsModel always convert things to and from the user units. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Remove unused arg in plot_cylinder_pressureGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11Finish clearing up the TableModelsGravatar Tomaz Canabrava
There are other models ( Tree Models and Model Items ) that are not affected by this commits, this is already a good cleanup but it can be extended to also fix those two other possibilities. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Another Model CleanupGravatar Tomaz Canabrava
Conversion of the WSInfoModel, that populates the list of weigthsystems in the Equipment tab. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Second model converted to be less boilerplated.Gravatar Tomaz Canabrava
Second model converted to be less boilerplated, there are right now 7 models that will need to be ported. each model can remove around 30 to 40 LOC, so this is not such a bigger improvement, but it's an 'keeping an eye on the future'. Also fixed a bug where the returned value was dummy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Begin to Cleanup the Models, trying to reduce boilerplate.Gravatar Tomaz Canabrava
The Model View system in Qt is *very* verbose, this is the beginning of a series of patches that will concentrate the boilerplate somewhere and reduce the amount of lines and will also try to make the code cleaner and easyer to understand, Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-11Good deal of whitespace fixes and code cleanup.Gravatar Tomaz Canabrava
I just went thru all of subsurface code removing some whitespaces issues and trying to make the code prettyer, I also removed a few QString issues.d Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-10Added salinity to the Dive Info tab.Gravatar Patrick Valsecchi
Took the opportunity to remove some copy&paste. Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
2013-10-10Fixed mix of spaces and tabs in maintab.uiGravatar Patrick Valsecchi
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
2013-10-09Fix potential uninitialized variableGravatar Dirk Hohndel
Most of the "possibly unitialized" warnings are bogus, but this one is a potential real bug. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-08Fix crash when cancelling 'Add Dive'Gravatar Dirk Hohndel
If selected_dive is -1 get_dive(selected_dive) will return NULL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Compile without depending on the global MAX macroGravatar Thiago Macieira
There's a C++ way for it. And, for some reason, it wasn't defined on my MinGW build: qt-ui/profilegraphics.cpp:1006:57: error: 'MAX' was not declared in this sscope Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove even more code and declarationsGravatar Dirk Hohndel
There's lots more stuff that can go. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Remove info.c/info.hGravatar Dirk Hohndel
The one remaining helper function in there was moved to maintab.cpp (which was the one remaining user). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Print: allow optional table on top of profileGravatar Lubomir I. Ivanov
Patch enables the 'Profile on top' / 'Notes on top' functionality in the print options dialog. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-07Maximum depth of a dive/a series of dives is not show correctlyGravatar Benjamin
After selecting a dive or a series of dives, the "Stats" tab shows the minimum, average and maximum stats for the selected dives. The "Depth" section does not display the correct value for the maximum depth. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Merge branch 'glib-removal-hack'Gravatar Dirk Hohndel
Fix obvious merge issue in Rules.mk Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Trying to switch to Qt translationGravatar Dirk Hohndel
This compiles and looks about right, but it doesn't appear to work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06Parse GPS text in C++ and re-implement GPS changed checkGravatar Dirk Hohndel
This is SO MUCH easier then the convoluted and fragile C / glib code it replaces. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-06First steps towards removing glib dependenciesGravatar Dirk Hohndel
- remove the build flags and libraries from the Makefile / Configure.mk - remove the glib types (gboolean, gchar, gint64, gint) - comment out / hack around gettext - replace the glib file helper functions - replace g_ascii_strtod - replace g_build_filename - use environment variables instead of g_get_home_dir() & g_get_user_name() - comment out GPS string parsing (uses glib utf8 macros) This needs massive cleanup, but it's a snapshot of what I have right now, in case people want to look at it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-05Modify the dialog text for the question to make more sense.Gravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Add a helper function to calculate weight display stringGravatar Benjamin
Add a helper function to unify the calculation of the weight display string, instead of having the same calculation in two places in the code. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Merge branch 'bugfixes' of git://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-10-04Fix display sane values on subsurface at first time opening.Gravatar Tomaz Canabrava
This patch fixes some unsane values that was being retrieved by the ui-files on first time opening. it creates a basic layout of the application using the current desktop size. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Fix showing all columns by default on first run.Gravatar Tomaz Canabrava
Some columns are a nice addition, but not a must have, and thus are hidden-by-default, uncluttering the user interface. This was discussed with a few designers before writting the code, and also discussed with dirk on irc. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Added the .ssrf extension to the open dialog filter.Gravatar Patrick Valsecchi
Fixes #205 Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Correct spelling of "weight" throughout the code.Gravatar Benjamin
"Weight" was misspelled "weigth" in several places in the code and comments. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Use the same conversion grams->lbs in dive and equipment listGravatar Benjamin
Subsurface stores weight values in grams. When displaying lbs, the dive list was not rounding the converted weights up, but rather truncating the value at the decimal place. The equipment list was rounding the converted weights up. This gave two different displayed values for the same weight value. Signed-off-by: Benjamin Fogel <nystire@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Code Cleanup - Uneeded preferences stored at the old prefs settingGravatar Tomaz Canabrava
Those preferences removed ( basically the ones about visibility of the List View of the Table ) are now managed by the Qt Settings system, and thus there's no need to have them there. wich gave us a pretty good cleanup. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Added configuration options for vertical speed units.Gravatar Patrick Valsecchi
Some people (free divers) are loving ft/s or m/s units for vertical speeds. Now they can choose between /min or /s in the configuration (only Qt UI). Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-04Fixed First run of subsurface - Start on Fullscreen.Gravatar Tomaz Canabrava
For a new installation, subsurface will now start on fullscreen, this fixes the bug where subsurface would start using the interface file ( mainwindow.ui ) configured size, and that silly monster always changes when editing something. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-04Fix the first load of Subsurface - "File not found" error.Gravatar Tomaz Canabrava
The first time the user loads subsurface, the default_filename is not configured yet, but yet the software tries to load "", sending an error message that this file doesn't exists. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Taiane Ramos <exhora.tat@gmail.com>
2013-10-03Partially revert 7a368ab06b4926236ec93207e66ff7b14c234fe1Gravatar Thiago Macieira
If we #include "qt-ui/ui_anything" from anywhere, the Makefile rules will blow up. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>