25 #include <QFormLayout>
29 #include <libsigrokcxx/libsigrokcxx.hpp>
33 using std::shared_ptr;
47 TimeMarker(flag.view_, FillColour, flag.time_),
48 std::enable_shared_from_this<
pv::view::
Flag>(flag)
67 popup->set_position(parent->mapToGlobal(
68 point(parent->rect())), Popup::Bottom);
70 QFormLayout *
const form = (QFormLayout*)popup->layout();
72 QLineEdit *
const text_edit =
new QLineEdit(popup);
73 text_edit->setText(
text_);
75 connect(text_edit, SIGNAL(textChanged(
const QString&)),
78 form->insertRow(0, tr(
"Text"), text_edit);
85 QMenu *
const menu =
new QMenu(parent);
87 QAction *
const del =
new QAction(tr(
"Delete"),
this);
88 del->setShortcuts(QKeySequence::Delete);
89 connect(del, SIGNAL(triggered()),
this, SLOT(
on_delete()));
QMenu * create_context_menu(QWidget *parent)
Flag(View &view, const pv::util::Timestamp &time, const QString &text)
virtual pv::widgets::Popup * create_popup(QWidget *parent)
void time_item_appearance_changed(bool label, bool content)
void on_text_changed(const QString &text)
pv::widgets::Popup * create_popup(QWidget *parent)
static const QColor FillColour
QPoint point(const QRect &rect) const
boost::multiprecision::number< boost::multiprecision::cpp_dec_float< 24 >, boost::multiprecision::et_off > Timestamp
Timestamp type providing yoctosecond resolution.
void remove_flag(std::shared_ptr< Flag > flag)