This currently requires the wip/win branch of qtconnectivity. Eventually
this should be merged into upstream Qt.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Partially cosmetic and partially a bug fix. 1) the seperator line
between trips and dives that are not in a trip was drawn in the
background color => the line was invisible. 2) When looking very
closely, there was a 1-2 pixel wide error between the seperator line
between trips and dives that are not in a trip. 3) there was a comment
that the trip separator needed to be extra thick. IMHO, this
looks ugly, and is superfluous as there is a nice sidebar along
the dives that belong to the trip. Finally, the line shall not
be displayed when not in a trip.
So, basically, the line (the QML rectangle) is completely rewritten,
to take care of all issues. There is 1 hack: the line color is
taken from the dive separator line. But its fully unclear to me
where that color is defined in Qt/QML or Kirigami, so I hardcoded
the proper color. That just works.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
A small cosmetic change. The delete from divelist button was "glued"
to the top of the line. Not nice, so just center it vertically, and
make the button a tiny bit smaller, so that it fits nicely on the line.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Fully usure why the code was as it was. The trip header had 2
overlapping mouse areas, to expand the trip and vise versa. Simply
remove the smallest one.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
A very unimportant change, but found when looking through the code
for places where size of icons where used. The one changed here
has nothing to do with icon related placement of a string, so
its replaced by a way more logical placement of the affected string.
Simply center the "no dives in the dive list" for an empty logbook
on the screen, instead of at some random place in the upper left
corner. Like I said: very unimportant, but it just looks nicer
in the UI.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Currently, we can only delete dives that are indexed in the main
dive table. In the future, we will have to delete dives outside
of this table (e.g. for undo). Therefore, split out the free_dive()
function from delete_single_dive(), which takes an index into
the main dive table.
In the process, adopt the dive freeing-code from clear_dive(),
which frees more data than the code in delete_single_dive().
This potentially fixes a memory-leak.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This reverts commit 1c4a859c8d,
where the override modifiers were removed owing to the noisy
"inconsistent override modifiers" which is default-on in clang.
This warning was disabled in 77577f717f,
so we can reinstate the overrides.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
UserSurveyServices derives from WebServices and therefore has
to define three pure virtual functions [startDownload(),
startUpload(), buttonClicked()] as no-ops. Interestingly,
a comment in the header says
"need to declare them as no ops or Qt4 is unhappy"
which is of course not true as these functions are not
declared by Qt.
There seems to be no point in deriving from WebServices,
therefore don't do it. These function definitions can then
be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
QByteArray::data() provides access to the underlying data
for direct manipulation. Thus, the construct
csv = fileNamePtr.data();
found in MainWindow::importTxtFiles() suggests that modifications
to csv also affect fileNamePtr. This is *not* the case, because
csv itself is a QByteArray. It is therefore constructed from
the data.
Replace this treacherous construct by a simple assignment.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
On CSV import, the dive list was recalculated after the import
dialog was shown. This is pointless, as no dives are yet imported.
Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The non-modal DiveLogImportDialog was only implicitly deleted when
the MainWindow was destroyed. Instead hook into the accept() and
reject() functions and schedule for deletion with deleteLater().
Quite the horrible proposition, but in line with Qt's object model.
Consider making the dialog modal instead. There seems to be no
upside for this being modal.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In d815e0c947 a dive_table pointer
was added to the parsing functions to allow parsing into tables
other than the global dive table. This will be necessary for undo of
import and implementation a cleaner interface. A few cases, notably
CSV and proprietary formats were forgotten.
Implement parsing into arbitrary tables also for these cases.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Turns out that Jan found an issue with the latest Kirigami, so let's go back to
the known good one.
This reverts commit 17ec95e70c.
Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Turns out that Jan found an issue with the latest Kirigami, so let's go back to
the known good one.
This reverts commit 40766db459.
Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A few of these prototypes were already in import-csv.h.
Put them in an 'extern "C" { ... }' block.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
We are not OpenGL heavy so this saves battery life.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update to the master of today, and no issues detected on mobile-on-desktop
and Android.
Only, the ugly border is back as the magic hack of 0b16b547ae failed
due to the patch file that errored. So that is fixed too.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Fix dc_iostream_{read,write} debugging implementation
Mares Icon HD family: send the command as one single write buffer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A relatively big change for such a simple page. Most relevant
changes are:
1) Do not use Kirigami.Header anymore. It appears that this header
has word wrapping on (and we cannot override that). This is
annoying on this page, as headings seems randomly be split over
2 lines, even in cases where there is more than enhough room to
display it on one line. And as the Kirigami.Header is just a
trivial wrapper of a Text field, we can simple replace it.
2) A lot of the toplevel GridLayouts had width properties set. These
are not needed (and confused my debugging code), so they are removed
withput any visual change. As a general rule, do not try to set
properties that are not needed. In general, it can only lead to
binding loops or undefined behavior.
3) Add a font size to our Theme. The step from regular to title size
was a little too big.
4) And, obviously, numerous font.pointSize lines are added to actually
resize the font.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The existing BLE dive computers treat BLE as the packetized protocol it
is, and read whole packets at a time.
However, the Mares BlueLink backend treats it as just a basic "serial
over BLE" transport, and for historical reasons reads the reply packets
in smaller chunks.
This allows that kind of IO behavior, where if the divecomputer backend
reads just a part of a packet, we'll split the packet, return the part
the user asked for, and push back the leftover packet onto the received
packet queue.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We traditionally only allow samples to have a time format of 'mm:ss', so
if you have a dive over an hour, you would just have a minutes field
larger than 60 minutes.
But Matthew Critchley is trying to import some dives from his VMS
Redbare CCR, and the sample timestamp format he has is of the type
'hh:mm:ss'.
That could be fixed by a xslt translation, but there's no real reason
why we couldn't just support that format too.
Reported-by: Matthew Critchley <matthew.s.critchley@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
There was a strange big margin at the top of the the dive details
page. Just make it a bit more "normal".
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
There was a significant of not needed whitespace on the download from
DC page. Most importantly, the bottom buttons where not on the bottom,
so we had to truncate the downloaded dives early (to prevent overflowing
the buttons). Further, a tiny bit of padding is removed between the
3 top pull down items.
All this, results in the diplay of more dives without scrolling.
For example, previously, only 1 dive (with 1 stored DC) was shown
on my 5.5" device, and now 3 (scale: regular).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Changed some hard coded size and positioning of the SsrfCheckBox,
in such a way that is scales nicely to the current setting of the
mobile_scale.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The select buttons in the downloaded dives delegate overlapped
the dive data. Simple margin change fixes this.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Make the ssrfButton and the pull down menu's on the download page
resizable. Notice that also the contents of the pulldown
menu's is scaled based on the font size.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is perhaps overly verbose, but the timing details helped figure out
some EON Core download issues, and it's nice to see when things actually
happen.
It's also good to see when the data actually enters our queues, and when
we read and write the packets. That might help debug the issues Fabio
is seeing with the Mares Bluelink.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
We used to just find all services and connect the characteristics change
signal etc to them all, but we really only care about the actual
preferred service that we'll be using.
So move the qt ble signal connection to after we've selected the
preferred service that we will actually be enabling notifications on and
do the writes to.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
XMP is a media-metadata standard based on XML which may be used
across a variety of media formats. Some video-processing software
writes XMP data without updating the native metadata fields.
Therefore, we should aim at reading XMP metadata and give priority
of XMP data over native fields.
Pros:
- Support for *all* common media formats.
Cons:
- XML (complex, verbose, chaotic).
- Does not even come close to fulfilling its promise of being
well defined (see below).
Implement a simple XMP-parser using libxml2. Connect the XMP-parser to
the existing Quicktime/MP4 parser.
First problem encountered: According to the spec, XMP data supposed
to be put in the 'XMP_' atom. But for example exiftools instead
writes an 'uuid' atom with a special 16-byte uid. Implement both,
more options will probably follow.
Second problem: two versions of recording the creation date were found
1) The content of a <exif:DateTimeOriginal> tag.
2) The xmp::CreateDate attribute of a <rdf:Description> tag.
Here too, more versions are expected to surface and will have
to be supported in due course (with an obvious priority problem).
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
A user reported problems with editing the Suit and DiveMaster fields.
Apparently, editing does not change the currentText. Without doing
a deeper analysis, simply use editText (a more proper fix might be
changing the currentIndex on editing).
(Parially?) fixes#1694
Reported-by: Mark Powell <mcpowell123@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Changing the scale, it seems that the header of trips is not rescaled.
The reason for this is simple. That string does not use our manipulated
font but a different one. In fact, this is the only ocurrence on the
divelist that did not scale. However, other screens hardly rescaled at
all. All these will be fixed in seperate commits.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>