From: Soeren Apel Date: Fri, 13 Apr 2018 07:27:38 +0000 (+0200) Subject: Trace: Remove unneeded setters X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0acf629d46c91b48cdb5fd6041f40b0479250296;p=pulseview.git Trace: Remove unneeded setters --- diff --git a/pv/views/trace/signal.cpp b/pv/views/trace/signal.cpp index e6c2594f..d9a7a084 100644 --- a/pv/views/trace/signal.cpp +++ b/pv/views/trace/signal.cpp @@ -72,7 +72,7 @@ Signal::Signal(pv::Session &session, void Signal::set_name(QString name) { - Trace::set_name(name); + base_->set_name(name); if (name != name_widget_->currentText()) name_widget_->setEditText(name); diff --git a/pv/views/trace/trace.cpp b/pv/views/trace/trace.cpp index cc91fff5..0e154800 100644 --- a/pv/views/trace/trace.cpp +++ b/pv/views/trace/trace.cpp @@ -244,16 +244,6 @@ void Trace::populate_popup_form(QWidget *parent, QFormLayout *form) add_color_option(parent, form); } -void Trace::set_name(QString name) -{ - base_->set_name(name); -} - -void Trace::set_color(QColor color) -{ - base_->set_color(color); -} - void Trace::set_segment_display_mode(SegmentDisplayMode mode) { segment_display_mode_ = mode; @@ -291,13 +281,13 @@ void Trace::on_popup_closed() void Trace::on_nameedit_changed(const QString &name) { /* This event handler notifies SignalBase that the name changed */ - set_name(name); + base_->set_name(name); } void Trace::on_coloredit_changed(const QColor &color) { /* This event handler notifies SignalBase that the color changed */ - set_color(color); + base_->set_color(color); } } // namespace trace diff --git a/pv/views/trace/trace.hpp b/pv/views/trace/trace.hpp index a9ccd7b7..410d82cd 100644 --- a/pv/views/trace/trace.hpp +++ b/pv/views/trace/trace.hpp @@ -100,16 +100,6 @@ public: */ shared_ptr base() const; - /** - * Sets the name of the signal. - */ - virtual void set_name(QString name); - - /** - * Set the color of the signal. - */ - virtual void set_color(QColor color); - /** * Configures the segment display mode to use. */