aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.h
AgeCommit message (Collapse)Author
2017-06-16code cleanup: remove unimplemented classes and structsGravatar Jan Mulder
Remove forward declared but not implemented classes and structs. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-29Add SPDX header to profile widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-26MOBILE: Display pO2 and Setpoint for CCR divesGravatar Joakim Bygdell
For CCR dives we want to display the setpoint and pO2 information, due to the limited screensize we have to remove the temperature graph or the view will be to cluttered. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2016-06-23Now that we are building with C++11 we need override keywordGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-08Silence warnings in Profilewidget2Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-06Profile: don't compile code that isn't needed on mobileGravatar Dirk Hohndel
We were creating a couple dozen objects that we never needed and because of that triggered several dozen callbacks whenever the model data changed. All for UI elements of the profile that are either not used in the mobile app (like the calculated ceiling or the partial pressure / tissue saturation graphs), or are only useful when using the profile interactively (which we also don't do on mobile). I don't know if this will make a significant impact on performance, but it seems like the right thing to do either way. A positive side effect is that the odd blue line on top of the rendered profile is gone as well. Fixes #1007 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Start to use the QSettings ObjectWrapperGravatar Tomaz Canabrava
start of the QSettinsg Object Wrapper usage on the code this first patch removes two macros that generated around 200 lines in runtime for something like a quarter of it Basically, whenever we changed anything we called the PreferencesDialog::settingsChanged and connected everythign to that signal, now each setting has it's own changed signal and we can call it directly. The best thing about this approach is that we don't trigger repaints for things that are not directly profile related. ( actually we still do, but the plan is to remove them in due time) this commit breaks correct atualization of the profile (because everything was connected to PreferencesDialog::settingsChanged) and now I need to hunt a bit for the correct connections Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Drag and Drop ImagesGravatar Robert C. Helling
Now that we have the possibility to add images without meaningful time stamps to a dive, we should let the user provide that time offset manually. This patch allowed pictures to be dragged from the image list to the profile. Signed-off-by: Robert C. Helling <helling@atdotde.de> 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-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-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: 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: 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-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-02Merge branch 'cmakeAndPreferences'Gravatar Dirk Hohndel
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>