diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-02-21 22:29:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-22 13:11:40 -0800 |
commit | 0474fe70fc47d4ba12c81c9dfefe6587b8266f31 (patch) | |
tree | ecf2fd8fb687448d2cd357318f50cac0cfaa73e9 /qt-ui/profile/diveeventitem.cpp | |
parent | 6fa52f3c34920a7a7fee4e5c95d3146342b84f78 (diff) | |
download | subsurface-0474fe70fc47d4ba12c81c9dfefe6587b8266f31.tar.gz |
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>
Diffstat (limited to 'qt-ui/profile/diveeventitem.cpp')
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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")); } |