Trace::Trace(shared_ptr<data::SignalBase> channel) :
base_(channel),
axis_pen_(AxisPen),
+ segment_display_mode_(ShowLastSegmentOnly), // Will be overwritten by View
+ current_segment_(0),
popup_(nullptr),
popup_form_(nullptr)
{
label_size.height());
}
+void Trace::set_current_segment(const int segment)
+{
+ current_segment_ = segment;
+}
+
+int Trace::get_current_segment() const
+{
+ return current_segment_;
+}
+
void Trace::paint_back(QPainter &p, ViewItemPaintParams &pp)
{
const View *view = owner_->view();
base_->set_colour(colour);
}
+void Trace::set_segment_display_mode(SegmentDisplayMode mode)
+{
+ segment_display_mode_ = mode;
+
+ if (owner_)
+ owner_->row_item_appearance_changed(true, true);
+}
+
void Trace::on_name_changed(const QString &text)
{
/* This event handler is called by SignalBase when the name was changed there */