Return to the default mainwindow state when the user accepts
or rejects the dive site edit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since now we found the perfect way to deal with dive site handling on the
dive, we can reenable this widget.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When testing subsurface-mobile on the desktop from an account that had a
default file set up in the Subsurface preferences that file would already
be loaded creating rather confusing output.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't perfect (if you make multiple requests things could go badly),
but it's better than just slapping the new password into the settings,
even if the update failed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
XSLT parsing treats this as numeric value, thus we need to strip out the
" s" part.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds importing of sensor values from the second DC on APD log
import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If APD Log Viewer format is automatically detected, we should set the
sensor values to be imported properly. These need to be added to the
firstline and since we convert the number 2 from column headers to
subscript, this step must be skipped for the APD import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to test for the sensor values on CSV import, not the po2.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hard coding the values of known imports is quite awkward if we add
these. Thus switching to use enum and names instead.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The import of setpoint values is tested with Seabear data.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The divelog export dialog was changed to default to the HTML export when
changing the layout to resemble other dialogs (commit 42acaa40).
However, the default tab should be the first one with most of the export
formats and options.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I was wondering why the colors where wrong on mac, it took
me a while to find the correct spot to fix. It seems that
the Brush is not used to paint the fonts, but the Pen is.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Davide complained about a flickr on windows, I think it
has to do with the QPainter now knowing the right
size of it's paint rect. this should fix it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Removing dead code. the call above this does that already.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also remove the quick hack from commit 947fda14c5 ("Bluetooth support:
quick build fix for Qt5.2"). I should have thought this through before
pushing that commit, but oh well.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The InvalidBluetoothAdapterError error code wasn't introduced until Qt5.3,
so let's not test for it on older versions of Qt.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Advice the user to use his operating system for the pairing
step if the remote device requires a custom PIN code.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If there is only one local Bluetooth adapter, then hide the
selection combobox and the label.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't close the Bluetooth selection widget if the default local
Bluetooth adapter is invalid. Maybe there is a problem with the default
Bluetooth device and the user has another one (a BT dongle) which can be used.
If the selected device is invalid then update the UI information,
disable the available buttons and announce the user about the problem.
Also move the device changed logging message before we call the
update information method. In this way the logging message with
the problem will not be overwritten.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Register to the signal emmited when an error occurs during
Bluetooth device discovery and log a description of the
error which can be used to identify problem's cause.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reinitialize the Bluetooth device discovery agent when the user
selects a new local Bluetooth adapter using the address
of the selected device.
Before this patch the agent was always using the local default
Bluetooth adapter.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a combobox which can be used to list/select the available
local Bluetooth devices. In this way, if a user has more
than one local Bluetooth devices (integrated, dongles, etc.)
he can choose which one he wants to use.
Before this patch, only the default local Bluetooth device
could be used.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
After commit 619e97ee4f ("Stop the SDP agent if the Clear/Save button
was pressed") we don't need to block the save button anymore for scanning
completion because the SDP agent will be stopped manually if the Save
button was pressed.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Cancel button is more relevant to the dialog message.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
We can use custom color palette to edit current color palette.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
- save custom colors to QSettings.
- load custom colors from QSettings.
- set almond color palette as default palette.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add button group and attached edit buttons to it.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
- Add default color struct
- Init the color struct with default colors
- Show color text in labels
- Preview colors
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Select custom colors for print templates, by default there are
five colors that can be used dynamically in prints.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
- Trigger re-rendering on the QPixmap if fields changed.
- Change template selection to custom if template text changed.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
On update call Printer to render on the QPixmap.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add apply button to the dialog, Update the preview after applying
the new settings.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Check if data is changed before saving the new settings.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Show QPixmap in QLabel, Use Printer class to render the Preview on
the QPixmap.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add PRINT/PREVIEW print modes, check for printing modes before
casting.
We must pass a QPaintDevice with type QPixmap for previewing and
with type QPrinter for actual printing.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Before overwriting the new template show confirmation message.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
On Android platforms the system is configured to raise the
itemActivated signal when the user double clicks an item.
Since the items are small it is pretty hard to double click
them. Therefore use the itemClicked signal instead of the
itemActivated signal.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the Cancel button was pressed then we should stop the
SDP agent. The same thing happens when the Save button
was pressed. We don't need to add new BT remote devices
to the list if the widget was closed or if the list with
the discovered BT devices was cleared.
Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I'm not convinced that this is useful enough to keep, but let's give it a
try and see what people think.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>