The strings will be filled-out to the end of the step size. That way the user
doesn't have to count spaces just to make sure the right string length is
returned.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
const v4l2_queryctrl &qctrl = m_ctrlMap[id];
QWidget *w = m_widgetMap[qctrl.id];
QString v;
+ int mod;
switch (qctrl.type) {
case V4L2_CTRL_TYPE_STRING:
v = static_cast<QLineEdit *>(w)->text();
+ mod = v.length() % qctrl.step;
+ if (mod)
+ v += QString(qctrl.step - mod, ' ');
break;
default:
break;
}
- setWhat(w, id, v);
+ setWhat(w, id, QString("'") + v + "'");
return v;
}
default:
break;
}
- setWhat(w, id, v);
+ setWhat(w, id, QString("'") + v + "'");
}
void ApplicationWindow::setDefaults(unsigned ctrl_class)