X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.cpp;h=e2c80833f2503631814a5ee1888f1088af13da69;hb=f4e57597347e47a4ea58fbdc7b0a22e07f1c0ede;hp=5ee90aa1357e6f2f89ce32f1cffbf14dcbdb3506;hpb=3ccf0f7f5b1b31ac628a983a2becee6f4c4c1507;p=pulseview.git diff --git a/pv/view/cursorpair.cpp b/pv/view/cursorpair.cpp index 5ee90aa..e2c8083 100644 --- a/pv/view/cursorpair.cpp +++ b/pv/view/cursorpair.cpp @@ -34,7 +34,8 @@ using std::shared_ptr; using std::pair; namespace pv { -namespace view { +namespace views { +namespace TraceView { const int CursorPair::DeltaPadding = 8; const QColor CursorPair::ViewportFillColour(220, 231, 243); @@ -61,7 +62,8 @@ shared_ptr CursorPair::second() const return second_; } -void CursorPair::set_time(const pv::util::Timestamp& time) { +void CursorPair::set_time(const pv::util::Timestamp& time) +{ const pv::util::Timestamp delta = second_->time() - first_->time(); first_->set_time(time); second_->set_time(time + delta); @@ -119,8 +121,7 @@ void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover) const int radius = delta_rect.height() / 2; const QRectF text_rect(delta_rect.intersected( rect).adjusted(radius, 0, -radius, 0)); - if (text_rect.width() >= text_size_.width()) - { + if (text_rect.width() >= text_size_.width()) { const int highlight_radius = delta_rect.height() / 2 - 2; if (selected()) { @@ -144,7 +145,8 @@ void CursorPair::paint_label(QPainter &p, const QRect &rect, bool hover) } } -void CursorPair::paint_back(QPainter &p, const ViewItemPaintParams &pp) { +void CursorPair::paint_back(QPainter &p, const ViewItemPaintParams &pp) +{ if (!enabled()) return; @@ -191,5 +193,6 @@ pair CursorPair::get_cursor_offsets() const ((second_->time() - view_.offset()) / view_.scale()).convert_to()); } -} // namespace view +} // namespace TraceView +} // namespace views } // namespace pv