X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.cpp;h=d319a7b1bffc3b69e67e937c46a3b0a38aee1747;hb=f0c0b38f812bfbb2bb1978d40e2ce93f1da3f89d;hp=83e6f7334cbd907a370265f6e18589fe9c572948;hpb=8debe10dd47a5f519cd6e9069231f8e77c9c04e1;p=pulseview.git diff --git a/pv/view/cursorpair.cpp b/pv/view/cursorpair.cpp index 83e6f733..d319a7b1 100644 --- a/pv/view/cursorpair.cpp +++ b/pv/view/cursorpair.cpp @@ -20,13 +20,17 @@ #include "cursorpair.h" -#include "ruler.h" #include "view.h" +#include "pv/util.h" +#include #include -using namespace boost; -using namespace std; +using std::max; +using std::make_pair; +using std::min; +using std::shared_ptr; +using std::pair; namespace pv { namespace view { @@ -96,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 @@ -134,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(); }