New profile: add image pixmaps for image events

For reasons that I don’t understand, the image is only shown if the event
happens to be at the same time as a depth sample. This is, however, not
specific to these image events, it seems to apply to all events.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-02-21 22:29:35 +01:00 committed by Dirk Hohndel
parent 6fa52f3c34
commit 0474fe70fc

View file

@ -46,8 +46,12 @@ void DiveEventItem::setupPixmap()
setPixmap(EVENT_PIXMAP(":warning"));
} else if ((strcmp(internalEvent->name, "bookmark") == 0)) {
setPixmap(EVENT_PIXMAP(":flag"));
} else if(strcmp(internalEvent->name, "heading") == 0) {
} else if (strcmp(internalEvent->name, "heading") == 0) {
setPixmap(EVENT_PIXMAP(":flag"));
} else if (internalEvent->type == 123) {
QPixmap picture;
picture.load(internalEvent->name);
setPixmap(picture.scaled(100, 100, Qt::KeepAspectRatio, Qt::SmoothTransformation));
} else {
setPixmap(EVENT_PIXMAP(":warning"));
}