From 8671e6d0d9406a791542582f5ec4da9a3e98b143 Mon Sep 17 00:00:00 2001 From: dreamsourcelabTAI Date: Mon, 6 Mar 2023 16:53:54 +0800 Subject: [PATCH] Add a capture status for DSO mode --- DSView/pv/view/viewport.cpp | 30 ++++++++++++++++++++++++------ lang/cn/dlg.json | 4 ++++ lang/en/dlg.json | 4 ++++ 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/DSView/pv/view/viewport.cpp b/DSView/pv/view/viewport.cpp index 9d9af890..9f44028b 100644 --- a/DSView/pv/view/viewport.cpp +++ b/DSView/pv/view/viewport.cpp @@ -341,17 +341,38 @@ void Viewport::paintSignals(QPainter &p, QColor fore, QColor back) type = g_variant_get_byte(gvar); g_variant_unref(gvar); + bool bDot = false; + if (type == DSO_TRIGGER_AUTO && roll) { type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_AUTO_ROLL), "Auto(Roll)"); + + if (_view.session().is_instant()){ + type_str += ", "; + type_str += L_S(STR_PAGE_DLG, S_ID(IDS_DLG_VIEW_CAPTURE), "Capturing"); + bDot = true; + } } else if (type == DSO_TRIGGER_AUTO && !_view.session().trigd()) { type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_AUTO), "Auto"); + + if (_view.session().is_instant()){ + type_str += ", "; + type_str += L_S(STR_PAGE_DLG, S_ID(IDS_DLG_VIEW_CAPTURE), "Capturing"); + bDot = true; + } } else if (_waiting_trig > 0) { - type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_WAITING_TRIG), "Waiting Trig"); - + type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_WAITING_TRIG), "Waiting Trig"); + bDot = true; + } + else { + type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIG_D), "Trig'd"); + } + + if (bDot) + { for (int i = 0; i < _tigger_wait_times; i++){ - type_str += "."; + type_str += "."; } high_resolution_clock::time_point cur_time = high_resolution_clock::now(); @@ -365,9 +386,6 @@ void Viewport::paintSignals(QPainter &p, QColor fore, QColor back) if (_tigger_wait_times > 4) _tigger_wait_times = 0; - } - else { - type_str = L_S(STR_PAGE_DLG, S_ID(IDS_DLG_TRIG_D), "Trig'd"); } } p.setPen(fore); diff --git a/lang/cn/dlg.json b/lang/cn/dlg.json index 052a5e1d..af940b21 100644 --- a/lang/cn/dlg.json +++ b/lang/cn/dlg.json @@ -650,5 +650,9 @@ { "id": "IDS_DLG_FILE_THRESHOLD", "text": "阈值: " + }, + { + "id": "IDS_DLG_VIEW_CAPTURE", + "text": "捕获中" } ] \ No newline at end of file diff --git a/lang/en/dlg.json b/lang/en/dlg.json index a7f15fb1..d5fd915c 100644 --- a/lang/en/dlg.json +++ b/lang/en/dlg.json @@ -650,5 +650,9 @@ { "id": "IDS_DLG_FILE_THRESHOLD", "text": "Threshold: " + }, + { + "id": "IDS_DLG_VIEW_CAPTURE", + "text": "Capturing" } ] \ No newline at end of file