#include "ruler.hpp"
#include "signal.hpp"
#include "tracegroup.hpp"
+#include "triggermarker.hpp"
#include "view.hpp"
#include "viewport.hpp"
show_cursors_(false),
cursors_(new CursorPair(*this)),
next_flag_text_('A'),
+ trigger_markers_(),
hover_point_(-1, -1)
{
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
items.push_back(cursors_);
items.push_back(cursors_->first());
items.push_back(cursors_->second());
+
+ for (auto trigger_marker : trigger_markers_)
+ items.push_back(trigger_marker);
+
return items;
}
{
flags_.push_back(shared_ptr<Flag>(new Flag(*this, time,
QString("%1").arg(next_flag_text_))));
+
next_flag_text_ = (next_flag_text_ >= 'Z') ? 'A' :
(next_flag_text_ + 1);
+
time_item_appearance_changed(true, true);
}
i->animate_to_layout_v_offset();
}
+void View::trigger_event(util::Timestamp location)
+{
+ trigger_markers_.push_back(shared_ptr<TriggerMarker>(
+ new TriggerMarker(*this, location)));
+}
+
void View::get_scroll_layout(double &length, Timestamp &offset) const
{
const pair<Timestamp, Timestamp> extents = get_time_extents();
void View::capture_state_updated(int state)
{
- if (state == Session::Running)
+ if (state == Session::Running) {
set_time_unit(util::TimeUnit::Samples);
+ trigger_markers_.clear();
+ }
+
if (state == Session::Stopped) {
// After acquisition has stopped we need to re-calculate the ticks once
// as it's otherwise done when the user pans or zooms, which is too late