#include <QLineEdit>
#include <QMenu>
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
#include <pv/widgets/popup.hpp>
const QColor Flag::FillColour(0x73, 0xD2, 0x16);
-Flag::Flag(View &view, double time, const QString &text) :
+Flag::Flag(View &view, const pv::util::Timestamp& time, const QString &text) :
TimeMarker(view, FillColour, time),
text_(text)
{
pv::widgets::Popup* Flag::create_popup(QWidget *parent)
{
- pv::widgets::Popup *const popup = TimeMarker::create_popup(parent);
+ using pv::widgets::Popup;
+
+ Popup *const popup = TimeMarker::create_popup(parent);
+ popup->set_position(parent->mapToGlobal(
+ point(parent->rect())), Popup::Bottom);
+
QFormLayout *const form = (QFormLayout*)popup->layout();
QLineEdit *const text_edit = new QLineEdit(popup);