Rearrange planner UI elements

This is my first attempt at grouping UI elements of the planner in a
sensible way.

It might still be sensible to combine the two bottom panes into one.

In addition there is a new field "altutude" which is sychronized with the
surface pressure as for planning we often know the altitude of the dive
site rather than the atmospheric pressure.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the dive planner dialog prettier.

It was too much vertical and cluttered, making the usage of the
application a bit strange.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix default widget.

The default widget that was being shown was the planner widget
where we needed to show the normal dive widget.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
New page "Network settings"

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
UI setup for "Network settings" page

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Expose proxy settings into preferences struct

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implement proxy settings loading/saving

- proxy settings are stored under [Network] group
- default is "No proxy"
- duplicate #def GET_TXT replaced with GET_INT_DEF

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implement proxy re-configuration

- application level proxy is reconfigured on settings saving
- tested with direct connection (no proxy), local proxy without auth
  (tinyproxy) and SOCKS (ssh -D dynamic port forwarding)
- not sure about QNetworkProxy reuse between invocations
- consider using QNetworkProxyFactory (but since no plain TCP
  connections are used, QNetworkProxy seems to be good choice)

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make system proxy as default

On first start (no settings saved yet) system-wide proxy should be
default.

Proposed-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Headers cleanup.

Too much noise on the headers, this commit remove uneeded
headers when they are uneeded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Better visualization of the maintab in the designer

The layout of the maintab differed a bit between the application and the
designer because the designer didn't take into account that the
divemaster, buddy and tags were one line widgets.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added a TimeEdit

The thing that I was trying to do didn't worked, getting back
to the original Qt timeEdit.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added code for TimeEdit

This makes the TimeEdit work again.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fixed changing dates with the new date widget.

The maintab was connecting with an invalid slot on the
new date widget, QDateTime instead of QDate

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix crash when trying to add a dive or plan when a filter is active.

The planner used the selected dive on the dive list, and
when there's a filtering in action it can be in a state where
there's no dive selected.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Break really long line

Hard to read on the editor.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Re-enable possibility to edit manually added dive.

This one-liner re-adds the possibility to edit manually added dives.
Tested because I didn't belived that it was going to be so easy, but it
seems that it was.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>