Clean up include files

They should have a newline at the end.
Forward declarations of classes should be 'class'.
Function / method definitions don't end on a ';'
Remove obsolete QStateMachine forward reference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix bug in logic expression

Yes, the old code made perfect sense when you read it - except the C++
compiler turned it into something quite different from what was intended.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use our macro for FP comparisons

I think that catches all the ones we missed (thanks clang -Wfloat-equal).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Minor cleanup

Remove obsolete header and unused variable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
New profile: enable switching between dive computers

This was mostly in place, just needed to be hooked up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Give the widget for the new profile a better name

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
More renaming

I don't even know what a partial gas might be...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Handle cancel in PreferencesDialog::on_chooseFile_clicked

If I click in the Preferences Dialog on the 3 dots to choose a default
file to load and cancel the opening FileDialog an empty string is returned
and set to the coresponding QLineEdit.

The new behavior (and mostly expected) is to update the QLineEdit only
if there is a filename returned from QFileDialog.

Signed-off-by: Patrick Majewski <dive@patrick-majewski.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
User manual: small updates

The section on the main menu descriptions has been changed a little bit to
reflect the current menu structure.

The section dealing with exprt from other dive software has been changed
to appear more user friendly, with three new icons.

Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Migrate MainTab models(QStringListModel)

Migrate MainTab models
  from static xxxCompletioModel::instance()
  to private MainTab variable members.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update #include statement for QStringListModel

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Put include guard to every header

* ensure include guard to every header
* comment endif guard block

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Take the on-canvas position into account for DiveCartesianAxis::valueAt()

We did this right for posAtValue(), but not for the inverse.

Fixes #438

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>