X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.h;fp=pv%2Fview%2Fcursorpair.h;h=0000000000000000000000000000000000000000;hb=2acdb232d6bb452cfdfaea3ef5218fb4da592329;hp=f7eb51cacaabe9a79cf2d715c487eed94f5ab222;hpb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;p=pulseview.git diff --git a/pv/view/cursorpair.h b/pv/view/cursorpair.h deleted file mode 100644 index f7eb51ca..00000000 --- a/pv/view/cursorpair.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of the PulseView project. - * - * Copyright (C) 2013 Joel Holdsworth - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef PULSEVIEW_PV_VIEW_CURSORPAIR_H -#define PULSEVIEW_PV_VIEW_CURSORPAIR_H - -#include "cursor.h" - -#include - -#include - -class QPainter; - -namespace pv { -namespace view { - -class CursorPair -{ -private: - static const int DeltaPadding; - -public: - /** - * Constructor. - * @param view A reference to the view that owns this cursor pair. - */ - CursorPair(View &view); - - /** - * Returns a pointer to the first cursor. - */ - std::shared_ptr first() const; - - /** - * Returns a pointer to the second cursor. - */ - std::shared_ptr second() const; - -public: - QRectF get_label_rect(const QRect &rect) const; - - void draw_markers(QPainter &p, - const QRect &rect, unsigned int prefix); - - void draw_viewport_background(QPainter &p, const QRect &rect); - - void draw_viewport_foreground(QPainter &p, const QRect &rect); - - void compute_text_size(QPainter &p, unsigned int prefix); - - std::pair get_cursor_offsets() const; - -private: - std::shared_ptr first_, second_; - const View &view_; - - QSizeF text_size_; -}; - -} // namespace view -} // namespace pv - -#endif // PULSEVIEW_PV_VIEW_CURSORPAIR_H