Commit graph

268 commits

Author SHA1 Message Date
Dirk Hohndel
f3232b1a6f Profile: don't compile the desktop specific parts on mobile
When building subsurface-mobile we won't be using all these UI elements,
so let's not build them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 16:05:44 -08:00
Dirk Hohndel
662e2a0ff3 Profile: add define when building subsurface-mobile
This way we can conditionally compile out more dependencies on desktop
widgets.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 16:05:19 -08:00
Dirk Hohndel
332e484d68 Untangle Profile from MainTab
This one was easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 15:20:05 -08:00
Dirk Hohndel
e7edaea4f8 Untangle Profile from MainWindow: edit current profile
And action can't not just trigger a slot, it can also send a signal.

With this there is no reference to the MainWindow left in the profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
2b9316e16a Untangle Profile from MainWindow: update main tab via signal
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
4ec5ce4c7a Untangle Profile from MainWindow: remove silly indirection
Ummm. What? That one was awesome. This seems easier :-)
MainWindow::instance()->graphics() is a way to retrieve a pointer to the
profile widget...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
e70e34801e Untangle Profile from MainWindow: make profile the parent of dialogs
I don't quite know why these were parented to the MainWindow - I bet
there's a very clever reason that I'm missing...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
e28f171731 Untangle Profile from MainWindow: refresh display
Instead of directly calling into the MainWindow, redirect this via a
signal so Subsurface mobile can hook it up as needed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
281a0a945a Untangle Profile from MainWindow: add missing header
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:51 -08:00
Dirk Hohndel
1013ba39c5 Untangle Profile from MainWindow: shortcuts
This, too, should be done with signals.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:50 -08:00
Dirk Hohndel
000c9cc21c Untangle Profile from MainWindow: turn off tts/ndl calculation
I'm not sure we can ever run into this issue anymore since we stop
calculating TTS / NDL past 2 hours, but I guess on a fairly slow CPU this
still could take too long.

But instead of calling into MainWindow let's just change the setting right
here and add a signal to show the notification - that way we can use the
appropriate way to make such notifications on the mobile app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:50 -08:00
Dirk Hohndel
eb2e76a691 Remove dead code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:50 -08:00
Dirk Hohndel
081295cb40 Untangle Profile from MainWindow: files on command line
There's no reason why this should be on the MainWindow widget.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:50 -08:00
Dirk Hohndel
533d724d1b Profile: begin untangling from MainWindow
Use a signal to turn the toolbar on or off.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 13:45:50 -08:00
Guido Lerch
889fa1e4cc Context menu for images: small fix
Required change within DivePictureItem, adding update
parameter defaulted to true in this case.

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03 08:31:41 -08:00
Dirk Hohndel
8ea7f40457 Merge branch 'cmakeAndPreferences' 2015-11-02 19:54:34 -08:00
Tomaz Canabrava
ff57881265 Preferences: Remove the old dialog and use the new one
The new preferences dialog still needs a bit of fine tuning
but should already work.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02 12:52:15 -08:00
Tomaz Canabrava
1d6683f3e0 Move Profile widget out of desktop-widgets
The reason for that is, even if profile widget is made with qpainter
and for that reason it should be a desktop widget, it's being used
on the mobile version because of a lack of QML plotting library that
is fast and reliable.

We discovered that it was faster just to encapsulate our Profile in
a QML class and call it directly.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30 10:36:49 -07:00