20 #ifndef PULSEVIEW_PV_UTIL_HPP 21 #define PULSEVIEW_PV_UTIL_HPP 29 #include <boost/serialization/nvp.hpp> 31 #include <boost/multiprecision/cpp_dec_float.hpp> 36 #include <QFontMetrics> 65 typedef boost::multiprecision::number<
66 boost::multiprecision::cpp_dec_float<24>,
94 QString unit =
"s",
bool sign =
true);
112 QString unit =
"",
bool sign =
true);
130 unsigned precision = 0, QString unit =
"s",
bool sign =
true);
148 vector<string>
split_string(
string text,
string separator);
157 std::streamsize
text_width(
const QFontMetrics &metric,
const QString &
string);
164 #endif // PULSEVIEW_PV_UTIL_HPP
x y t t *t x y t t t x y t t t x *y t *t t x *y t *t t x y t t t x y t t t t(t+t)") define_sfop3(16
QString format_time_si(const Timestamp &v, SIPrefix prefix, unsigned int precision, QString unit, bool sign)
std::streamsize text_width(const QFontMetrics &metric, const QString &string)
QString format_value_si(double v, SIPrefix prefix, unsigned precision, QString unit, bool sign)
QString format_time_si_adjusted(const Timestamp &t, SIPrefix prefix, unsigned precision, QString unit, bool sign)
int exponent(SIPrefix prefix)
Returns the exponent that corresponds to a given prefix.
vector< string > split_string(string text, string separator)
Q_DECLARE_METATYPE(SharedPtrToSegment)
SIPrefix determine_value_prefix(double v)
QString format_time_minutes(const Timestamp &t, signed precision, bool sign)
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > Timestamp
Timestamp type providing yoctosecond resolution.