X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.cpp;h=d319a7b1bffc3b69e67e937c46a3b0a38aee1747;hb=1ef49ddd04f44a4369403fbab19ed235483e2975;hp=ed8829d25befdcc4f0b6f790a2f62bc9b4922bc7;hpb=819f4c25391a9c74d3d2f528d462142d5c4aad4d;p=pulseview.git diff --git a/pv/view/cursorpair.cpp b/pv/view/cursorpair.cpp index ed8829d2..d319a7b1 100644 --- a/pv/view/cursorpair.cpp +++ b/pv/view/cursorpair.cpp @@ -20,15 +20,16 @@ #include "cursorpair.h" -#include "ruler.h" #include "view.h" +#include "pv/util.h" +#include #include -using boost::shared_ptr; using std::max; using std::make_pair; using std::min; +using std::shared_ptr; using std::pair; namespace pv { @@ -99,7 +100,7 @@ void CursorPair::draw_markers(QPainter &p, p.setPen(Cursor::TextColour); p.drawText(text_rect, Qt::AlignCenter | Qt::AlignVCenter, - Ruler::format_time(_second->time() - _first->time(), prefix, 2)); + pv::util::format_time(_second->time() - _first->time(), prefix, 2)); } // Paint the cursor markers @@ -137,7 +138,7 @@ void CursorPair::compute_text_size(QPainter &p, unsigned int prefix) assert(_first); assert(_second); - _text_size = p.boundingRect(QRectF(), 0, Ruler::format_time( + _text_size = p.boundingRect(QRectF(), 0, pv::util::format_time( _second->time() - _first->time(), prefix, 2)).size(); }