]> sigrok.org Git - pulseview.git/commitdiff
MarginWidget: Moved in clear_selection
authorJoel Holdsworth <redacted>
Sun, 21 Dec 2014 13:41:28 +0000 (13:41 +0000)
committerJoel Holdsworth <redacted>
Mon, 29 Dec 2014 11:56:00 +0000 (11:56 +0000)
pv/view/header.cpp
pv/view/header.hpp
pv/view/marginwidget.cpp
pv/view/marginwidget.hpp
pv/view/ruler.cpp
pv/view/ruler.hpp

index 83985eda68a28f925e41e9641bdc87fa1fde57f9..1cbe59cec4133711f9287d8c55de7a5caba1335d 100644 (file)
@@ -94,13 +94,6 @@ shared_ptr<ViewItem> Header::get_mouse_over_item(const QPoint &pt)
        return shared_ptr<RowItem>();
 }
 
-void Header::clear_selection()
-{
-       for (auto &i : view_)
-               i->select(false);
-       update();
-}
-
 void Header::paintEvent(QPaintEvent*)
 {
        // The trace labels are not drawn with the arrows exactly on the
index 867944c53650a405f75030f4f3677994eb5afebc..34f851b67a26af234a85c956b47bcd8df0314a09 100644 (file)
@@ -74,8 +74,6 @@ private:
        std::shared_ptr<pv::view::ViewItem> get_mouse_over_item(
                const QPoint &pt);
 
-       void clear_selection();
-
 private:
        void paintEvent(QPaintEvent *event);
 
index 8716439e6f74e294505489f148e8d3e31c7af7f1..2ef262762cc0c13a7683b0aa7379099e3fca2502 100644 (file)
@@ -68,6 +68,10 @@ void MarginWidget::contextMenuEvent(QContextMenuEvent *event)
 
 void MarginWidget::clear_selection()
 {
+       const auto items = this->items();
+       for (auto &i : items)
+               i->select(false);
+       update();
 }
 
 } // namespace view
index 4bd7ac18497991cc7cd8159eea9ca8a47b4339d7..7df6c02d3fbebbcdf8ca5db4222e5a53c41e9713 100644 (file)
@@ -73,7 +73,7 @@ private:
        virtual void contextMenuEvent(QContextMenuEvent *event);
 
 public Q_SLOTS:
-       virtual void clear_selection();
+       void clear_selection();
 
 Q_SIGNALS:
        void selection_changed();
index 21dd16ff398cb4b03178c12353de0ee04a9207f4..fb40e117c8ccfc7850abab1d0756c00f512dcfd1 100644 (file)
@@ -51,14 +51,6 @@ Ruler::Ruler(View &parent) :
                this, SLOT(hover_point_changed()));
 }
 
-void Ruler::clear_selection()
-{
-       const vector< shared_ptr<TimeItem> > items(view_.time_items());
-       for (auto &i : items)
-               i->select(false);
-       update();
-}
-
 QSize Ruler::sizeHint() const
 {
        const int text_height = calculate_text_height();
index 418d398295806ca927670c429f5a8c09ed3162f1..ce9cae30134c0af64fb14ed97ff6ae48c208eb0d 100644 (file)
@@ -48,9 +48,6 @@ private:
 public:
        Ruler(View &parent);
 
-public:
-       void clear_selection();
-
 public:
        QSize sizeHint() const;