view_.time_item_appearance_changed(true, false);
}
-void Flag::drag_by(const QPoint &delta)
-{
- // Treat trigger markers as immovable
- if (text_ == "T")
- return;
-
- TimeMarker::drag_by(delta);
-}
-
-
} // namespace view
} // namespace pv
#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_marker_(nullptr),
hover_point_(-1, -1)
{
connect(horizontalScrollBar(), SIGNAL(valueChanged(int)),
items.push_back(cursors_);
items.push_back(cursors_->first());
items.push_back(cursors_->second());
+
+ if (trigger_marker_)
+ items.push_back(trigger_marker_);
+
return items;
}
next_flag_text_ = (next_flag_text_ >= 'Z') ? 'A' :
(next_flag_text_ + 1);
- // Skip 'T' (for trigger) as it's treated special
- if (next_flag_text_ == 'T')
- next_flag_text_ += 1;
-
time_item_appearance_changed(true, true);
}
void View::trigger_event(util::Timestamp location)
{
- char next_flag_text = next_flag_text_;
-
- next_flag_text_ = 'T';
- add_flag(location);
-
- next_flag_text_ = next_flag_text;
+ if (trigger_marker_)
+ trigger_marker_->set_time(location);
+ else
+ trigger_marker_ = std::shared_ptr<TriggerMarker>(new TriggerMarker(*this, location));
}
void View::get_scroll_layout(double &length, Timestamp &offset) const
class Ruler;
class Trace;
class Viewport;
+class TriggerMarker;
class View : public QAbstractScrollArea, public TraceTreeItemOwner {
Q_OBJECT
std::list< std::shared_ptr<Flag> > flags_;
char next_flag_text_;
+ std::shared_ptr<TriggerMarker> trigger_marker_;
+
QPoint hover_point_;
unsigned int sticky_events_;