From 5f95c226ef4d0def6aafc60a9f4880a3a3374167 Mon Sep 17 00:00:00 2001 From: Willem Ferguson Date: Thu, 5 Apr 2018 14:50:11 +0200 Subject: Provide icons for bailout events on the dive profile. Signed-off-by: Willem Ferguson --- icons/CCR.png | Bin 0 -> 998 bytes icons/OC.png | Bin 0 -> 1347 bytes profile-widget/diveeventitem.cpp | 4 ++++ subsurface.qrc | 2 ++ 4 files changed, 6 insertions(+) create mode 100644 icons/CCR.png create mode 100644 icons/OC.png diff --git a/icons/CCR.png b/icons/CCR.png new file mode 100644 index 000000000..9f29c0854 Binary files /dev/null and b/icons/CCR.png differ diff --git a/icons/OC.png b/icons/OC.png new file mode 100644 index 000000000..6c4e7a7ff Binary files /dev/null and b/icons/OC.png differ diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp index f3c81f102..7e7c602a1 100644 --- a/profile-widget/diveeventitem.cpp +++ b/profile-widget/diveeventitem.cpp @@ -84,6 +84,10 @@ void DiveEventItem::setupPixmap(struct gasmix *lastgasmix) #define EVENT_PIXMAP_BIGGER(PIX) QPixmap(QString(PIX)).scaled(sz_bigger, sz_bigger, Qt::KeepAspectRatio, Qt::SmoothTransformation) if (empty_string(internalEvent->name)) { setPixmap(EVENT_PIXMAP(":status-warning-icon")); + } else if (same_string_caseinsensitive(internalEvent->name, "OC")) { + setPixmap(EVENT_PIXMAP(":bailout-icon")); + } else if (same_string_caseinsensitive(internalEvent->name, "CCR") || same_string_caseinsensitive(internalEvent->name, "PSCR")) { + setPixmap(EVENT_PIXMAP(":onCCRLoop-icon")); } else if (internalEvent->type == SAMPLE_EVENT_BOOKMARK) { setPixmap(EVENT_PIXMAP(":dive-bookmark-icon")); } else if (event_is_gaschange(internalEvent)) { diff --git a/subsurface.qrc b/subsurface.qrc index e15ec2077..c4d43b2fe 100644 --- a/subsurface.qrc +++ b/subsurface.qrc @@ -41,6 +41,8 @@ icons/Nx_changeICD.png icons/Tmx_changeICD.png icons/Oxy_changeICD.png + icons/CCR.png + icons/OC.png icons/flag.png icons/scale.png icons/ruler.png -- cgit v1.2.3-70-g09d2