icon_grey_(":/icons/status-grey.svg")
{
qRegisterMetaType<util::Timestamp>("util::Timestamp");
+ qRegisterMetaType<uint64_t>("uint64_t");
setup_ui();
restore_ui_settings();
resolution_(0),
autoranging_(1)
{
+ pv::data::Analog* analog_data =
+ dynamic_cast<pv::data::Analog*>(data().get());
+
+ connect(analog_data, SIGNAL(samples_added(QObject*, uint64_t, uint64_t)),
+ this, SLOT(on_samples_added()));
+
base_->set_colour(SignalColours[base_->index() % countof(SignalColours)]);
update_scale();
}
form->addRow(layout);
}
+void AnalogSignal::on_samples_added()
+{
+ perform_autoranging();
+
+ if (owner_) {
+ // Call order is important, otherwise the lazy event handler won't work
+ owner_->extents_changed(false, true);
+ owner_->row_item_appearance_changed(false, true);
+ }
+}
+
void AnalogSignal::on_pos_vdivs_changed(int vdivs)
{
pos_vdivs_ = vdivs;
if (autoranging_)
perform_autoranging(true);
- if (owner_)
+ if (owner_) {
+ // Call order is important, otherwise the lazy event handler won't work
+ owner_->extents_changed(false, true);
owner_->row_item_appearance_changed(false, true);
+ }
}
} // namespace TraceView
void populate_popup_form(QWidget *parent, QFormLayout *form);
private Q_SLOTS:
+ void on_samples_added();
+
void on_pos_vdivs_changed(int vdivs);
void on_neg_vdivs_changed(int vdivs);