Commit graph

5 commits

Author SHA1 Message Date
Tomaz Canabrava
42f36d6315 Update the picture model to use the new picture function calls.
Update the picture model to use the new picture function calls, wich made
the code smaller and easyer to understand. AND as a plus, it doesn't use
the magic 123 identifier for pictures.  AND it correctly adds images
without timestamp to the list.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-03 00:01:13 -07:00
Tomaz Canabrava
f1d67cfbac Add threaded processing of image pixmaps
This code adds threaded processing of a batch of images. It uses the
QtConcurrent implementations to call a function repeteadly using
MAX_THREADS (Qt gets that for us) and returns a list of it.

This call is blocking, so while the pixmaps are being scaled in threads,
it will wait for all scalling to be done.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:29 -07:00
Tomaz Canabrava
e140703d34 Add a method to update the dive pictures on the model.
Call that method from the mainWindow when the dive changes.
The updateDivePictures walks around the events of the first dc (since all
pictures are distributed allong all dive computers) to get the events of
type '123' (I wonder if there's not a better way to save pictures on the
dive, like an linked list of char* named pictures.)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:29 -07:00
Tomaz Canabrava
4b520a8fbc Add a new widget on the main tab: Pictures.
Currently this does nothing, but since "dive photos" can also mean
photos that were taken during the trip to the dive, some of them
will not be visible on the profile. this currently shows nothing,
because I didn't work out the Model bits yet.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:29 -07:00
Tomaz Canabrava
1c34c831a4 Add stub for a widget to show the dive pictures.
This has a few classes: the model is the list of pictures for the current
dive, the delegate is how this pictures will be displayed on screen, the
widget is the collection of delegates, and the DivePictureThumbnailThread
is a worker-thread to generate the thumbnails so the UI will not freeze.

[Dirk Hohndel: added the new files to subsurface.pro]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:07 -07:00