]> sigrok.org Git - pulseview.git/commitdiff
RowItem: Combined appearance change signals into appearance_changed()
authorJoel Holdsworth <redacted>
Fri, 10 Oct 2014 20:27:41 +0000 (21:27 +0100)
committerJoel Holdsworth <redacted>
Wed, 19 Nov 2014 10:23:02 +0000 (10:23 +0000)
CMakeLists.txt
pv/view/rowitem.h
pv/view/signal.cpp
pv/view/trace.cpp
pv/view/trace.h
pv/view/viewport.cpp

index 0ef18566cec4f6db9f63d950683abd0af9a85fc4..8e2ac69505984c9094cf2c98d54f2dd39962d1f9 100644 (file)
@@ -204,6 +204,7 @@ set(pulseview_HEADERS
        pv/view/header.h
        pv/view/logicsignal.h
        pv/view/marginwidget.h
+       pv/view/rowitem.h
        pv/view/ruler.h
        pv/view/selectableitem.h
        pv/view/signal.h
index 90036389dd39dea17d04d860d2422a1bc474bcc3..161e828917aec9ea8acb98ad8550898fd252c7c8 100644 (file)
@@ -30,6 +30,8 @@ class RowItemOwner;
 
 class RowItem : public SelectableItem
 {
+       Q_OBJECT
+
 public:
        /**
         * Constructor.
@@ -111,6 +113,9 @@ public:
 public:
        virtual void hover_point_changed();
 
+Q_SIGNALS:
+       void appearance_changed();
+
 protected:
        pv::view::RowItemOwner *_owner;
 
index fab76fcfd1f1fcbf593d3cb853eff457ba70f8cb..cbd5ac423b9b23d94bf27cbd0b02c5c5ed381db3 100644 (file)
@@ -85,7 +85,7 @@ bool Signal::enabled() const
 void Signal::enable(bool enable)
 {
        _channel->set_enabled(enable);
-       visibility_changed();
+       appearance_changed();
 }
 
 shared_ptr<Channel> Signal::channel() const
index 3409ecf75cb7a471dba4ebe73b6adf5532cf4762..3b92abe484c14efd5964789eed731077fed21344 100644 (file)
@@ -223,13 +223,13 @@ void Trace::on_popup_closed()
 void Trace::on_text_changed(const QString &text)
 {
        set_name(text);
-       text_changed();
+       appearance_changed();
 }
 
 void Trace::on_colour_changed(const QColor &colour)
 {
        set_colour(colour);
-       colour_changed();
+       appearance_changed();
 }
 
 } // namespace view
index 7fd8c67afb8e917a5384d27fe87b61edd996c7b0..83eb826546184e87e91005a7e461cb9e1f8bc5fc 100644 (file)
@@ -126,11 +126,6 @@ private Q_SLOTS:
 
        void on_popup_closed();
 
-Q_SIGNALS:
-       void visibility_changed();
-       void text_changed();    
-       void colour_changed();
-
 protected:
        QString _name;
        QColor _colour;
index afff74eec85c17f5d1db0845d91a1f37e1660ffe..221714051504a81a7e48b47056217d98f67e05cb 100644 (file)
@@ -229,7 +229,7 @@ void Viewport::on_signals_changed()
 {
        for (shared_ptr<RowItem> r : _view) {
                assert(r);
-               connect(r.get(), SIGNAL(visibility_changed()),
+               connect(r.get(), SIGNAL(appearance_changed()),
                        this, SLOT(update()));
        }
 }