]> sigrok.org Git - pulseview.git/commitdiff
ViewWidget: Renamed dragging_ to item_dragging_
authorJoel Holdsworth <redacted>
Sat, 27 Dec 2014 20:07:21 +0000 (20:07 +0000)
committerJoel Holdsworth <redacted>
Mon, 29 Dec 2014 12:24:23 +0000 (12:24 +0000)
pv/view/header.cpp
pv/view/ruler.cpp
pv/view/viewwidget.cpp
pv/view/viewwidget.hpp

index e3ad9d3815d9aa7de5f83b62d5ac4a18d3431949..26aae49fada6f9a5a7d2d533ad77b2c8e017baaa 100644 (file)
@@ -113,7 +113,7 @@ void Header::paintEvent(QPaintEvent*)
        {
                assert(r);
 
-               const bool highlight = !dragging_ &&
+               const bool highlight = !item_dragging_ &&
                        r->label_rect(rect).contains(mouse_point_);
                r->paint_label(painter, rect, highlight);
        }
index bd106b974c695e19d78a7abdad3adf887ba0e1fb..2f9b140eec8d0f9d1649155166b89f3a0638e5cd 100644 (file)
@@ -148,7 +148,7 @@ void Ruler::paintEvent(QPaintEvent*)
        // Draw the items
        const vector< shared_ptr<TimeItem> > items(view_.time_items());
        for (auto &i : items) {
-               const bool highlight = !dragging_ &&
+               const bool highlight = !item_dragging_ &&
                        i->label_rect(r).contains(mouse_point_);
                i->paint_label(p, r, highlight);
        }
index 0b3b2fd1e233f962bc9f6b50417109e72582722b..57053298d00a81d0495f2ce290a5aa3cdea77ac8 100644 (file)
@@ -35,7 +35,7 @@ namespace view {
 ViewWidget::ViewWidget(View &parent) :
        QWidget(&parent),
        view_(parent),
-       dragging_(false)
+       item_dragging_(false)
 {
        setFocusPolicy(Qt::ClickFocus);
        setMouseTracking(true);
@@ -157,7 +157,7 @@ void ViewWidget::mouse_left_release_event(QMouseEvent *event)
        for (auto &i : items)
                i->drag_release();
 
-       if (dragging_)
+       if (item_dragging_)
                view_.restack_all_row_items();
        else
        {
@@ -171,7 +171,7 @@ void ViewWidget::mouse_left_release_event(QMouseEvent *event)
                }
        }
 
-       dragging_ = false;
+       item_dragging_ = false;
 }
 
 void ViewWidget::mousePressEvent(QMouseEvent *event)
@@ -210,7 +210,7 @@ void ViewWidget::mouseMoveEvent(QMouseEvent *event)
                return;
 
        // Do the drag
-       dragging_ = true;
+       item_dragging_ = true;
        drag_items(event->pos() - mouse_down_point_);
 
        update();
index fc7247627a8783f1a55bf81dc31526da151c8032..1d50832b030c7856a9d71ec47a7c48db42fbc579 100644 (file)
@@ -102,7 +102,7 @@ protected:
        QPoint mouse_point_;
        QPoint mouse_down_point_;
        std::shared_ptr<ViewItem> mouse_down_item_;
-       bool dragging_;
+       bool item_dragging_;
 };
 
 } // namespace view