| 49 | } |
| 50 | |
| 51 | void 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 | |
| 79 | std::map<Property*,GVariant*> Binding::get_property_value() |
| 80 | { |
no test coverage detected