summaryrefslogtreecommitdiff
path: root/test/qv4l2/qv4l2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/qv4l2/qv4l2.cpp')
-rw-r--r--test/qv4l2/qv4l2.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/qv4l2/qv4l2.cpp b/test/qv4l2/qv4l2.cpp
index 69146defa..e3d6bf775 100644
--- a/test/qv4l2/qv4l2.cpp
+++ b/test/qv4l2/qv4l2.cpp
@@ -53,9 +53,9 @@ ApplicationWindow::ApplicationWindow()
(void)QWhatsThis::whatsThisButton( fileTools );
const char * fileOpenText = "<p><img source=\"fileopen\"> "
- "Click this button to open a <em>new v4l device</em>.<br>"
- "You can also select the <b>Open</b> command "
- "from the <b>File</b> menu.</p>";
+ "Click this button to open a <em>new v4l device</em>.<br>"
+ "You can also select the <b>Open</b> command "
+ "from the <b>File</b> menu.</p>";
QWhatsThis::add( fileOpen, fileOpenText );
@@ -111,7 +111,7 @@ void ApplicationWindow::setDevice(const QString &device)
tabs = new QTabWidget(this);
tabs->setMargin(3);
sigMapper = new QSignalMapper(this);
- connect(sigMapper, SIGNAL(mapped(int)), this, SLOT(ctrlAction(int)));
+ connect(sigMapper, SIGNAL(mapped(int)), this, SLOT(ctrlAction(int)));
ctrlMap.clear();
widgetMap.clear();
classMap.clear();
@@ -159,7 +159,7 @@ void ApplicationWindow::addTabs()
ctrlMap[qctrl.id] = qctrl;
classMap[V4L2_CTRL_CLASS_USER].push_back(qctrl.id);
}
- for (qctrl.id = V4L2_CID_PRIVATE_BASE;
+ for (qctrl.id = V4L2_CID_PRIVATE_BASE;
::ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0; qctrl.id++) {
if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED)
continue;
@@ -186,7 +186,7 @@ void ApplicationWindow::addTabs()
finishGrid(vbox, grid, ctrl_class, i & 1);
}
}
-
+
void ApplicationWindow::finishGrid(QWidget *vbox, QGrid *grid, unsigned ctrl_class, bool odd)
{
if (odd) {
@@ -247,9 +247,9 @@ void ApplicationWindow::addCtrl(QGrid *grid, const struct v4l2_queryctrl &qctrl)
switch (qctrl.type) {
case V4L2_CTRL_TYPE_INTEGER:
if (qctrl.flags & V4L2_CTRL_FLAG_SLIDER) {
- widgetMap[qctrl.id] =
+ widgetMap[qctrl.id] =
new QSlider(qctrl.minimum, qctrl.maximum,
- qctrl.step, qctrl.default_value,
+ qctrl.step, qctrl.default_value,
Horizontal, grid);
connect(widgetMap[qctrl.id], SIGNAL(valueChanged(int)),
sigMapper, SLOT(map()));
@@ -257,7 +257,7 @@ void ApplicationWindow::addCtrl(QGrid *grid, const struct v4l2_queryctrl &qctrl)
}
if (qctrl.maximum - qctrl.minimum <= 255) {
- widgetMap[qctrl.id] =
+ widgetMap[qctrl.id] =
new QSpinBox(qctrl.minimum, qctrl.maximum, 1, grid);
connect(widgetMap[qctrl.id], SIGNAL(valueChanged(int)),
sigMapper, SLOT(map()));
@@ -412,11 +412,11 @@ int ApplicationWindow::getVal(unsigned id)
switch (qctrl.type) {
case V4L2_CTRL_TYPE_INTEGER:
if (qctrl.flags & V4L2_CTRL_FLAG_SLIDER) {
- return static_cast<QSlider *>(w)->value();
+ return static_cast<QSlider *>(w)->value();
}
if (qctrl.maximum - qctrl.minimum <= 255) {
- return static_cast<QSpinBox *>(w)->value();
+ return static_cast<QSpinBox *>(w)->value();
}
return static_cast<QLineEdit *>(w)->text().toInt();
@@ -440,7 +440,7 @@ int ApplicationWindow::getVal(unsigned id)
}
return 0;
}
-
+
void ApplicationWindow::updateCtrl(unsigned id)
{
unsigned ctrl_class = V4L2_CTRL_ID2CLASS(id);
@@ -542,7 +542,7 @@ void ApplicationWindow::refresh(unsigned ctrl_class)
else
setVal(id, c[i].value);
::ioctl(fd, VIDIOC_QUERYCTRL, &ctrlMap[id]);
- widgetMap[id]->setDisabled(ctrlMap[id].flags &
+ widgetMap[id]->setDisabled(ctrlMap[id].flags &
(V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_INACTIVE));
}
}
@@ -559,9 +559,9 @@ void ApplicationWindow::setVal(unsigned id, int v)
switch (qctrl.type) {
case V4L2_CTRL_TYPE_INTEGER:
if (qctrl.flags & V4L2_CTRL_FLAG_SLIDER)
- static_cast<QSlider *>(w)->setValue(v);
+ static_cast<QSlider *>(w)->setValue(v);
else if (qctrl.maximum - qctrl.minimum <= 255)
- static_cast<QSpinBox *>(w)->setValue(v);
+ static_cast<QSpinBox *>(w)->setValue(v);
else
static_cast<QLineEdit *>(w)->setText(QString::number(v));
break;
@@ -599,7 +599,7 @@ void ApplicationWindow::setVal64(unsigned id, long long v)
break;
}
}
-
+
void ApplicationWindow::setDefaults(unsigned ctrl_class)
{
for (unsigned i = 0; i < classMap[ctrl_class].size(); i++) {