26 #include <libsigrokcxx/libsigrokcxx.hpp> 41 Property(name, desc, getter, setter),
55 Glib::VariantBase variant =
getter_();
58 }
catch (
const sigrok::Error &
e) {
59 qWarning() << tr(
"Querying config key %1 resulted in %2").arg(
name_, e.what());
68 connect(
line_edit_, SIGNAL(textEdited(
const QString&)),
79 Glib::VariantBase variant;
83 }
catch (
const sigrok::Error &
e) {
84 qWarning() << tr(
"Querying config key %1 resulted in %2").arg(
name_, e.what());
88 assert(variant.gobj());
90 string value = Glib::VariantBase::cast_dynamic<Glib::Variant<ustring>>(
93 line_edit_->setText(QString::fromStdString(value));
103 QByteArray ba =
line_edit_->text().toLocal8Bit();
104 setter_(Glib::Variant<ustring>::create(ba.data()));
String(QString name, QString desc, Getter getter, Setter setter)
T value(details::expression_node< T > *n)
QWidget * get_widget(QWidget *parent, bool auto_commit)
void on_text_edited(const QString &)
function< Glib::VariantBase()> Getter
function< void(Glib::VariantBase)> Setter