]> sigrok.org Git - pulseview.git/commitdiff
Rename ViewItem::point() to ViewItem::drag_point() for clarity
authorSoeren Apel <redacted>
Tue, 18 Jul 2017 15:51:01 +0000 (17:51 +0200)
committerSoeren Apel <redacted>
Sat, 22 Jul 2017 19:42:50 +0000 (21:42 +0200)
16 files changed:
pv/views/trace/cursorpair.cpp
pv/views/trace/cursorpair.hpp
pv/views/trace/flag.cpp
pv/views/trace/header.cpp
pv/views/trace/signalscalehandle.cpp
pv/views/trace/signalscalehandle.hpp
pv/views/trace/timemarker.cpp
pv/views/trace/timemarker.hpp
pv/views/trace/trace.cpp
pv/views/trace/tracetreeitem.cpp
pv/views/trace/tracetreeitem.hpp
pv/views/trace/triggermarker.cpp
pv/views/trace/triggermarker.hpp
pv/views/trace/viewitem.cpp
pv/views/trace/viewitem.hpp
pv/views/trace/viewport.cpp

index 9a8744054bb0792fafded3281bf8686a7fe26c50..2ddecb278e6e86c8b7785d9402ad54a73f5454f3 100644 (file)
@@ -73,9 +73,9 @@ float CursorPair::get_x() const
        return (first_->get_x() + second_->get_x()) / 2.0f;
 }
 
        return (first_->get_x() + second_->get_x()) / 2.0f;
 }
 
-QPoint CursorPair::point(const QRect &rect) const
+QPoint CursorPair::drag_point(const QRect &rect) const
 {
 {
-       return first_->point(rect);
+       return first_->drag_point(rect);
 }
 
 pv::widgets::Popup* CursorPair::create_popup(QWidget *parent)
 }
 
 pv::widgets::Popup* CursorPair::create_popup(QWidget *parent)
index 7a73e1980395d16b43c22420ed23bb802e6f0304..5d53bacfd3ad839c825e6fbc90a33b21569a34cd 100644 (file)
@@ -71,7 +71,7 @@ public:
 
        float get_x() const override;
 
 
        float get_x() const override;
 
-       QPoint point(const QRect &rect) const override;
+       QPoint drag_point(const QRect &rect) const override;
 
        pv::widgets::Popup* create_popup(QWidget *parent) override;
 
 
        pv::widgets::Popup* create_popup(QWidget *parent) override;
 
index 1db843e08193e5508d8298da841e82389be102fe..f5579ca14429298b80f5f6a35e49e4fc08d6e492 100644 (file)
@@ -66,7 +66,7 @@ pv::widgets::Popup* Flag::create_popup(QWidget *parent)
 
        Popup *const popup = TimeMarker::create_popup(parent);
        popup->set_position(parent->mapToGlobal(
 
        Popup *const popup = TimeMarker::create_popup(parent);
        popup->set_position(parent->mapToGlobal(
-               point(parent->rect())), Popup::Bottom);
+               drag_point(parent->rect())), Popup::Bottom);
 
        QFormLayout *const form = (QFormLayout*)popup->layout();
 
 
        QFormLayout *const form = (QFormLayout*)popup->layout();
 
index 58096dc07df4893687724b8f35c7b58a096925ee..10fc7eb9fc3600920f50280f7d521685abe97e88 100644 (file)
@@ -103,7 +103,7 @@ void Header::paintEvent(QPaintEvent*)
 
        stable_sort(items.begin(), items.end(),
                [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
 
        stable_sort(items.begin(), items.end(),
                [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
-                       return a->point(QRect()).y() < b->point(QRect()).y(); });
+                       return a->drag_point(QRect()).y() < b->drag_point(QRect()).y(); });
 
        QPainter painter(this);
        painter.setRenderHint(QPainter::Antialiasing);
 
        QPainter painter(this);
        painter.setRenderHint(QPainter::Antialiasing);
index 11f9bdef3a93297ffb68571c6ef7338fd77f479a..b7bd85fbb2487ac25d65d6cbdabf7456bf8e8643 100644 (file)
@@ -62,9 +62,9 @@ void SignalScaleHandle::drag_by(const QPoint &delta)
        owner_.owner()->row_item_appearance_changed(true, true);
 }
 
        owner_.owner()->row_item_appearance_changed(true, true);
 }
 
-QPoint SignalScaleHandle::point(const QRect &rect) const
+QPoint SignalScaleHandle::drag_point(const QRect &rect) const
 {
 {
-       return owner_.point(rect) + QPoint(0, owner_.scale_handle_offset());
+       return owner_.drag_point(rect) + QPoint(0, owner_.scale_handle_offset());
 }
 
 QRectF SignalScaleHandle::hit_box_rect(const ViewItemPaintParams &pp) const
 }
 
 QRectF SignalScaleHandle::hit_box_rect(const ViewItemPaintParams &pp) const
index 54eb59e85eba43d214ca772974f33c6c41f00998..4b256a04a3dabc2d52776ea4a92b4a0f333150b2 100644 (file)
@@ -67,7 +67,7 @@ public:
         * Get the drag point.
         * @param rect the rectangle of the widget area.
         */
         * Get the drag point.
         * @param rect the rectangle of the widget area.
         */
-       QPoint point(const QRect &rect) const;
+       QPoint drag_point(const QRect &rect) const;
 
        /**
         * Computes the outline rectangle of the viewport hit-box.
 
        /**
         * Computes the outline rectangle of the viewport hit-box.
index 487496d9fd102d1c8c3f72295b0669259fbdf702..0718f3cc8780704315e0e649b39c146a7a0e11bf 100644 (file)
@@ -78,7 +78,7 @@ float TimeMarker::get_x() const
        return roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
 }
 
        return roundf(((time_ - view_.offset()) / view_.scale()).convert_to<float>()) + 0.5f;
 }
 
-QPoint TimeMarker::point(const QRect &rect) const
+QPoint TimeMarker::drag_point(const QRect &rect) const
 {
        return QPoint(get_x(), rect.bottom());
 }
 {
        return QPoint(get_x(), rect.bottom());
 }
@@ -171,7 +171,7 @@ pv::widgets::Popup* TimeMarker::create_popup(QWidget *parent)
 
        Popup *const popup = new Popup(parent);
        popup->set_position(parent->mapToGlobal(
 
        Popup *const popup = new Popup(parent);
        popup->set_position(parent->mapToGlobal(
-               point(parent->rect())), Popup::Bottom);
+               drag_point(parent->rect())), Popup::Bottom);
 
        QFormLayout *const form = new QFormLayout(popup);
        popup->setLayout(form);
 
        QFormLayout *const form = new QFormLayout(popup);
        popup->setLayout(form);
index 7c49948b497179a29a32fd22cfcc3e633c2a78f1..24ba9b0341bb331b4026f2285a08f423a5aa2059 100644 (file)
@@ -74,7 +74,7 @@ public:
         * Gets the arrow-tip point of the time marker.
         * @param rect the rectangle of the ruler area.
         */
         * Gets the arrow-tip point of the time marker.
         * @param rect the rectangle of the ruler area.
         */
-       QPoint point(const QRect &rect) const override;
+       QPoint drag_point(const QRect &rect) const override;
 
        /**
         * Computes the outline rectangle of a label.
 
        /**
         * Computes the outline rectangle of a label.
index 46d9edb9ba14bbcfdf2069b42390415b34a6299c..774351c6ea91c53b60f3e803c36cf71a7925b99b 100644 (file)
@@ -134,7 +134,7 @@ pv::widgets::Popup* Trace::create_popup(QWidget *parent)
 
        popup_ = new Popup(parent);
        popup_->set_position(parent->mapToGlobal(
 
        popup_ = new Popup(parent);
        popup_->set_position(parent->mapToGlobal(
-               point(parent->rect())), Popup::Right);
+               drag_point(parent->rect())), Popup::Right);
 
        create_popup_form();
 
 
        create_popup_form();
 
index 470b6ad39b4565ef8e0c624fd20e0ccc84d263da..31b43ca1bd253c9cb51c28ad5b9593ed6c377d86 100644 (file)
@@ -133,7 +133,7 @@ void TraceTreeItem::drag_by(const QPoint &delta)
                owner_->owner_visual_v_offset());
 }
 
                owner_->owner_visual_v_offset());
 }
 
-QPoint TraceTreeItem::point(const QRect &rect) const
+QPoint TraceTreeItem::drag_point(const QRect &rect) const
 {
        return QPoint(rect.right(), get_visual_y());
 }
 {
        return QPoint(rect.right(), get_visual_y());
 }
index 7a4bf4622de5bf11cdd45744acceb198d88eca05..3605aa1a3b9c3fd031ca32211f92498f55ed355b 100644 (file)
@@ -111,7 +111,7 @@ public:
         * Gets the arrow-tip point of the row item marker.
         * @param rect the rectangle of the header area.
         */
         * Gets the arrow-tip point of the row item marker.
         * @param rect the rectangle of the header area.
         */
-       QPoint point(const QRect &rect) const;
+       QPoint drag_point(const QRect &rect) const;
 
        /**
         * Computes the vertical extents of the contents of this row item.
 
        /**
         * Computes the vertical extents of the contents of this row item.
index 31afba1c538e3214af64c32039276cc82746221d..2ef4b6badf8663b877b8a693977ee96935954437 100644 (file)
@@ -60,7 +60,7 @@ float TriggerMarker::get_x() const
        return ((time_ - view_.offset()) / view_.scale()).convert_to<float>();
 }
 
        return ((time_ - view_.offset()) / view_.scale()).convert_to<float>();
 }
 
-QPoint TriggerMarker::point(const QRect &rect) const
+QPoint TriggerMarker::drag_point(const QRect &rect) const
 {
        return QPoint(get_x(), rect.bottom());
 }
 {
        return QPoint(get_x(), rect.bottom());
 }
index 09017c0b882a10e57c2219c4e756e38adaa06687..dc9c0e9381c997aa99fcce9971529f856e0a4628 100644 (file)
@@ -67,7 +67,7 @@ public:
         * Gets the arrow-tip point of the time marker.
         * @param rect the rectangle of the ruler area.
         */
         * Gets the arrow-tip point of the time marker.
         * @param rect the rectangle of the ruler area.
         */
-       QPoint point(const QRect &rect) const override;
+       QPoint drag_point(const QRect &rect) const override;
 
        /**
         * Paints the foreground layer of the item with a QPainter
 
        /**
         * Paints the foreground layer of the item with a QPainter
index 61bc99f5f98bba157a1d2eae1ade7078bb892539..445f17958b06719ccdd66f66a2afc43c00b2ae83 100644 (file)
@@ -62,7 +62,7 @@ bool ViewItem::dragging() const
 void ViewItem::drag()
 {
        if (is_draggable())
 void ViewItem::drag()
 {
        if (is_draggable())
-               drag_point_ = point(QRect());
+               drag_point_ = drag_point(QRect());
 }
 
 void ViewItem::drag_release()
 }
 
 void ViewItem::drag_release()
index e1cc20040bd8ab33f3cded664454ebce23835136..39cf034562fb0e11cb500e949a424d9265b47fad 100644 (file)
@@ -98,7 +98,7 @@ public:
         * Get the drag point.
         * @param rect the rectangle of the widget area.
         */
         * Get the drag point.
         * @param rect the rectangle of the widget area.
         */
-       virtual QPoint point(const QRect &rect) const = 0;
+       virtual QPoint drag_point(const QRect &rect) const = 0;
 
        /**
         * Computes the outline rectangle of a label.
 
        /**
         * Computes the outline rectangle of a label.
index 8eb32a5e94f03d11254a87e7eae5b14f714c4810..e9a9df0c89b4fb4e934a24f33f0ac0f6c15df7eb 100644 (file)
@@ -165,7 +165,7 @@ void Viewport::paintEvent(QPaintEvent*)
 
        stable_sort(row_items.begin(), row_items.end(),
                [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
 
        stable_sort(row_items.begin(), row_items.end(),
                [](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
-                       return a->point(QRect()).y() < b->point(QRect()).y(); });
+                       return a->drag_point(QRect()).y() < b->drag_point(QRect()).y(); });
 
        const vector< shared_ptr<TimeItem> > time_items(view_.time_items());
        assert(none_of(time_items.begin(), time_items.end(),
 
        const vector< shared_ptr<TimeItem> > time_items(view_.time_items());
        assert(none_of(time_items.begin(), time_items.end(),