+ segments_.clear();
+
+ samples_cleared();
+}
+
+double Logic::get_samplerate() const
+{
+ if (segments_.empty())
+ return 1.0;
+
+ return segments_.front()->samplerate();
+}
+
+uint64_t Logic::max_sample_count() const
+{
+ uint64_t l = 0;
+ for (const shared_ptr<LogicSegment>& s : segments_) {
+ assert(s);
+ l = max(l, s->get_sample_count());
+ }
+ return l;
+}
+
+void Logic::notify_samples_added(QObject* segment, uint64_t start_sample,
+ uint64_t end_sample)
+{
+ samples_added(segment, start_sample, end_sample);