v4l2ucp Webcam Control
Want to make a catkin ROS version of this eventually, but first thing is to play with source for real v4l2ucp.
Made a patch to put a scroll bar in, for some webcams there are a ton of controls and they were off-screen:
v4l2ucp-git/src$ git diff diff --git a/src/mainWindow.cpp b/src/mainWindow.cpp index e124c13..1a0cc8e 100644 --- a/src/mainWindow.cpp +++ b/src/mainWindow.cpp @@ -137,12 +137,9 @@ MainWindow *MainWindow::openFile(const char *fileName) str.append(fileName); mw->setWindowTitle(str); - //QScrollArea *sv = new QScrollArea(mw); - //QWidget *sv = new QWidget(mw); QWidget *grid = new QWidget(mw); QGridLayout *gridLayout = new QGridLayout(); grid->setLayout(gridLayout); - //sv->setWidget(grid); QLabel *l = new QLabel("driver", grid); gridLayout->addWidget(l, 0, 0); @@ -226,7 +223,11 @@ MainWindow *MainWindow::openFile(const char *fileName) } } - mw->setCentralWidget(grid); + QScrollArea *sv = new QScrollArea(mw); + sv->setWidget(grid); + sv->setBackgroundRole(QPalette::Light); + sv->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + mw->setCentralWidget(sv); mw->setVisible(true); return mw; }
The really critical thing was to create and add the scrollarea after the child widget was populated- it looked like a previous author had experimented and it didn’t work. The horizontal scrollbar is unnecessary, want to size screen to show full width and then disable that bar but first couple attempts didn’t work.
Now how to push the changes back to the repository?
It’s on sourceforge, haven’t logged into there in years, had to recover password. (Ought to import http://sourceforge.net/projects/bioviewer/ into github). So to.
sourceforge has git, but no merge requests?
There is also a github clone of the project but since it isn’t official there isn’t much point in merge requesting there, but could fork it and put in own changes just to keep track of them, nice to have central github location for all public code projects.
Made own fork on github: https://github.com/lucasw/v4l2ucp