diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-03-04 08:12:58 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-03-05 00:49:11 +0000 |
commit | 0a4f93ab2bc7d4f45bb97d25a953e474d79550f3 (patch) | |
tree | dfa87b514298a3ebf83cf13a4fdec9fff598983b /ui/qt/qt_ui_utils.h | |
parent | 9df502aff5981c7759968ad1a07365c6cfd3961c (diff) |
Qt: Show the full file path in the status bar.
Add file_size_to_qstring and use it to show the file size. Add a
"shrinkable" property to LabelStack. Make the info status shrinkable.
Elide text so that long file paths don't widen the main window.
Change-Id: Ieb1caaf7e016384609d41fcabaa63d8f7a293eff
Bug: 10949
Reviewed-on: https://code.wireshark.org/review/7534
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/qt_ui_utils.h')
-rw-r--r-- | ui/qt/qt_ui_utils.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ui/qt/qt_ui_utils.h b/ui/qt/qt_ui_utils.h index 85208aacc3..7176605044 100644 --- a/ui/qt/qt_ui_utils.h +++ b/ui/qt/qt_ui_utils.h @@ -118,7 +118,7 @@ const QString address_to_display_qstring(const struct _address *address); const QString val_to_qstring(const guint32 val, const struct _value_string *vs, const char *fmt) G_GNUC_PRINTF(3, 0); -/** Convert an value_string_ext to a QString using val_to_str_ext_wmem(). +/** Convert a value_string_ext to a QString using val_to_str_ext_wmem(). * * @param val The value to convert to string. * @param vse value_string_ext array. @@ -129,13 +129,21 @@ G_GNUC_PRINTF(3, 0); const QString val_ext_to_qstring(const guint32 val, struct _value_string_ext *vse, const char *fmt) G_GNUC_PRINTF(3, 0); -/** Convert bits per second value human-readable QString using format_size(). +/** Convert a bits per second value to a human-readable QString using format_size(). * * @param val The value to convert to string. * - * @return A QString representation of the data rate. + * @return A QString representation of the data rate in SI units. */ -const QString bits_s_to_qstring(const double val); +const QString bits_s_to_qstring(const double bits_s); + +/** Convert a file size value to a human-readable QString using format_size(). + * + * @param val The value to convert to string. + * + * @return A QString representation of the file size in SI units. + */ +const QString file_size_to_qstring(const gint64 size); /** * Round the current size of a font up to its next "smooth" size. |