* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_MARKER_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_MARKER_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_TIMEMARKER_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_TIMEMARKER_HPP
#include <QColor>
#include <QDoubleSpinBox>
float get_x() const override;
- virtual const pv::util::Timestamp delta(const pv::util::Timestamp& other) const override;
-
/**
* Gets the arrow-tip point of the time marker.
* @param rect the rectangle of the ruler area.
QRectF hit_box_rect(const ViewItemPaintParams &pp) const override;
/**
- * Gets the text to show in the marker.
+ * Gets the current text to show in the marker - this may be dynamic.
+ */
+ virtual QString get_display_text() const;
+
+ /**
+ * Gets the default text used to show the marker - e.g. the user-editable
+ * name.
*/
virtual QString get_text() const = 0;
+ /**
+ * Sets the text to show in the marker.
+ */
+ virtual void set_text(const QString &text);
+
/**
* Paints the marker's label to the ruler.
* @param p The painter to draw with.
virtual pv::widgets::Popup* create_popup(QWidget *parent) override;
private Q_SLOTS:
+ void on_popup_closed();
+
void on_value_changed(const pv::util::Timestamp& value);
protected:
} // namespace views
} // namespace pv
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_MARKER_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_TIMEMARKER_HPP