aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget
AgeCommit message (Collapse)Author
2015-11-07profilewidget2.cpp: remove unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-06Don't connect to the PreferencesDialog in Subsurface-mobileGravatar Dirk Hohndel
Just more untangling from the desktop UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Remove more unnecessary include file referencesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06remove some mainwindow.h includesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Untangle DiveCalculatedCeiling from MainWindowGravatar Lubomir I. Ivanov
DiveCalculatedCeiling is the last class the references MainWindow in the profile-widget stack. In modelDataChanged() it looks for the information() widget and sets a slot for the dateTimeChanged() signal that information() emits. To solve the issue we make DiveCalculatedCeiling recieve a ProfileWidget2 reference and make ProfileWidget2 emit the dateTimeChangedItems() signal. ProfileWidget2 itself listens for the dateTimeChanged() signal that information() emits and emits dateTimeChangedItems() to notify any possible children/item listeners in the ProfileWidget2::dateTimeChanged() slot. The connection between ProfileWidget2 and information() is set in MainWindow. This makes DiveCalculatedCeiling unaware of MainWindow and which class originally emits the dateTimeChanged() signal to ProfileWidget2. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> -- Think delegation. Tomaz, please take a look at this one, to double check if i messed up. also i have zero idea how the mobile app is setting these connections, if it does so even. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06This patch reverts ae709ab30ee6abGravatar Lubomir I. Ivanov
things like: potentially, for every item interested in 'printMode' can clutter the profile-widget stack a lot. instead the items should be aware of the profile widget instance and not MainWindow. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Untagle DiveCartesianAxis from MainWindowGravatar Lubomir I. Ivanov
DiveCartesianAxis and derivatives can recieve ProfileWidget2 as an instance in their constructor. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle profile from MainWindow: work around print modeGravatar Dirk Hohndel
Since we don't support printing in subsurface-mobile this solves the problem at hand - but it doesn't do what we really want which is to untangle the Profile from the MainWindow. Partial credit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Profile: include Qt headers directlyGravatar Dirk Hohndel
No reason to include mainwindow.h Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Profile: don't compile the desktop specific parts on mobileGravatar Dirk Hohndel
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-05Profile: add define when building subsurface-mobileGravatar Dirk Hohndel
This way we can conditionally compile out more dependencies on desktop widgets. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainTabGravatar Dirk Hohndel
This one was easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: edit current profileGravatar Dirk Hohndel
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-05Untangle Profile from MainWindow: update main tab via signalGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: remove silly indirectionGravatar Dirk Hohndel
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-05Untangle Profile from MainWindow: make profile the parent of dialogsGravatar Dirk Hohndel
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-05Untangle Profile from MainWindow: refresh displayGravatar Dirk Hohndel
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-05Untangle Profile from MainWindow: add missing headerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: shortcutsGravatar Dirk Hohndel
This, too, should be done with signals. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: turn off tts/ndl calculationGravatar Dirk Hohndel
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-05Remove dead codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: files on command lineGravatar Dirk Hohndel
There's no reason why this should be on the MainWindow widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Profile: begin untangling from MainWindowGravatar Dirk Hohndel
Use a signal to turn the toolbar on or off. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: small fixGravatar Guido Lerch
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-02Merge branch 'cmakeAndPreferences'Gravatar Dirk Hohndel
2015-11-02Preferences: Remove the old dialog and use the new oneGravatar Tomaz Canabrava
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-10-30Move Profile widget out of desktop-widgetsGravatar Tomaz Canabrava
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>