Trace::Trace(pv::SigSession &session, QString name) :
_session(session),
_name(name),
- _v_offset(0)
+ _v_offset(0),
+ _popup(NULL),
+ _popup_form(NULL)
{
}
pv::widgets::Popup* Trace::create_popup(QWidget *parent)
{
using pv::widgets::Popup;
- Popup *const popup = new Popup(parent);
- QFormLayout *const form = new QFormLayout(popup);
- popup->setLayout(form);
- populate_popup_form(popup, form);
- return popup;
+
+ _popup = new Popup(parent);
+ _popup_form = new QFormLayout(_popup);
+ _popup->setLayout(_popup_form);
+
+ populate_popup_form(_popup, _popup_form);
+
+ connect(_popup, SIGNAL(closed()),
+ this, SLOT(on_popup_closed()));
+
+ return _popup;
}
int Trace::get_y() const
label_size.width(), label_size.height());
}
+void Trace::on_popup_closed()
+{
+ _popup = NULL;
+ _popup_form = NULL;
+}
+
void Trace::on_text_changed(const QString &text)
{
set_name(text);
void on_colour_changed(const QColor &colour);
+ void on_popup_closed();
+
signals:
void visibility_changed();
void text_changed();
int _v_offset;
QSizeF _text_size;
+
+ pv::widgets::Popup *_popup;
+ QFormLayout *_popup_form;
};
} // namespace view