MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / add_properties_to_form

Method add_properties_to_form

DSView/pv/prop/binding/binding.cpp:51–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void Binding::add_properties_to_form(QFormLayout *layout, bool auto_commit, QFont font)
52{
53 assert(layout);
54
55 for(auto p : _properties)
56 {
57 QWidget *const widget = p->get_widget(layout->parentWidget(), auto_commit);
58
59 if (p->labeled_widget()){
60 layout->addRow(widget);
61 widget->setFont(font);
62 _row_num++;
63 }
64 else{
65 const QString &lbstr = p->label();
66 //remove data format options
67 if (lbstr == "Data format"){
68 continue;
69 }
70 QLabel *lb = new QLabel(p->label());
71 lb->setFont(font);
72 widget->setFont(font);
73 layout->addRow(lb, widget);
74 _row_num++;
75 }
76 }
77}
78
79std::map<Property*,GVariant*> Binding::get_property_value()
80{

Callers 1

create_decoder_formMethod · 0.80

Calls 2

get_widgetMethod · 0.45
labeled_widgetMethod · 0.45

Tested by

no test coverage detected