From 0474fe70fc47d4ba12c81c9dfefe6587b8266f31 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Fri, 21 Feb 2014 22:29:35 +0100 Subject: New profile: add image pixmaps for image events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveeventitem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index e744e6a0f..92aad1fc4 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -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")); } -- cgit v1.2.3-70-g09d2