diff options
author | Jirka Novak <j.novak@netsystem.cz> | 2020-12-30 13:28:31 +0100 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2021-01-01 12:41:09 +0000 |
commit | cf9ffd3d831b5f68de54d58ea01cbdca50e9a6a5 (patch) | |
tree | eaa84ca29c22f08652c2eeab245b847eea5bb2fc /ui/qt/rtp_stream_dialog.cpp | |
parent | 5c936174c6980e93673eae4330792576776959c4 (diff) |
All RTP dialogs: Added option to specify count of decimal places
Preferences are extended with advanced settings:
gui.decimal_places1 - 2
gui.decimal_places2 - 4
gui.decimal_places3 - 6
rtp_analysis_dialog, rtp_player_dialog and rtp_stream_dialog uses new settings
for formating numbers. Same information in all dialogs uses same settings.
It solves request #15481.
Note: Other UI dialogs can be adapted later.
Diffstat (limited to 'ui/qt/rtp_stream_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_stream_dialog.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/qt/rtp_stream_dialog.cpp b/ui/qt/rtp_stream_dialog.cpp index baab626dae..a78cb513dd 100644 --- a/ui/qt/rtp_stream_dialog.cpp +++ b/ui/qt/rtp_stream_dialog.cpp @@ -100,13 +100,13 @@ public: setText(dst_port_col_, QString::number(calc.dst_port)); setText(ssrc_col_, QString("0x%1").arg(calc.ssrc, 0, 16)); setText(start_time_col_, QString::number(calc.start_time_ms, 'f', 6)); - setText(duration_col_, QString::number(calc.duration_ms, 'f', 2)); + setText(duration_col_, QString::number(calc.duration_ms, 'f', prefs.gui_decimal_places1)); setText(payload_col_, calc.all_payload_type_names); setText(packets_col_, QString::number(calc.packet_count)); setText(lost_col_, QObject::tr("%1 (%L2%)").arg(calc.lost_num).arg(QString::number(calc.lost_perc, 'f', 1))); - setText(max_delta_col_, QString::number(calc.max_delta, 'f', 3)); // This is RTP. Do we need nanoseconds? - setText(max_jitter_col_, QString::number(calc.max_jitter, 'f', 3)); - setText(mean_jitter_col_, QString::number(calc.mean_jitter, 'f', 3)); + setText(max_delta_col_, QString::number(calc.max_delta, 'f', prefs.gui_decimal_places3)); // This is RTP. Do we need nanoseconds? + setText(max_jitter_col_, QString::number(calc.max_jitter, 'f', prefs.gui_decimal_places3)); + setText(mean_jitter_col_, QString::number(calc.mean_jitter, 'f', prefs.gui_decimal_places3)); if (calc.problem) { setText(status_col_, UTF8_BULLET); @@ -166,7 +166,7 @@ public: case ssrc_fmt_col_: return QString("0x%1").arg(calc.ssrc, 0, 16); case lost_perc_col_: - return QString::number(calc.lost_perc, 'f', 1); + return QString::number(calc.lost_perc, 'f', prefs.gui_decimal_places1); default: break; } |