PulseView  unreleased development snapshot
A Qt-based sigrok GUI
util.cpp File Reference
#include "util.hpp"
#include <extdef.h>
#include <algorithm>
#include <cassert>
#include <sstream>
#include <QDebug>
#include <QTextStream>
Include dependency graph for util.cpp:

Go to the source code of this file.

Namespaces

 pv
 
 pv::util
 

Functions

static QTextStream & pv::util::operator<< (QTextStream &stream, SIPrefix prefix)
 
int pv::util::exponent (SIPrefix prefix)
 Returns the exponent that corresponds to a given prefix. More...
 
static SIPrefix pv::util::successor (SIPrefix prefix)
 
static QTextStream & pv::util::operator<< (QTextStream &stream, const Timestamp &t)
 
SIPrefix pv::util::determine_value_prefix (double v)
 
QString pv::util::format_time_si (const Timestamp &v, SIPrefix prefix, unsigned int precision, QString unit, bool sign)
 
QString pv::util::format_value_si (double v, SIPrefix prefix, unsigned precision, QString unit, bool sign)
 
QString pv::util::format_time_si_adjusted (const Timestamp &t, SIPrefix prefix, unsigned precision, QString unit, bool sign)
 
static QString pv::util::pad_number (unsigned int number, int length)
 
QString pv::util::format_time_minutes (const Timestamp &t, signed precision, bool sign)
 
vector< string > pv::util::split_string (string text, string separator)
 
std::streamsize pv::util::text_width (const QFontMetrics &metric, const QString &string)