summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/qv4l2
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-01-02 13:50:02 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-02 13:50:02 -0200
commit51549372cf89b75379465e885cb3b2b178be53ad (patch)
tree41b08ee989377bccc25489e4deb7976daf9860c1 /v4l2-apps/util/qv4l2
parent55da391ab67c98f9a35581a880ceadf1574b10da (diff)
downloadmediapointer-dvb-s2-51549372cf89b75379465e885cb3b2b178be53ad.tar.gz
mediapointer-dvb-s2-51549372cf89b75379465e885cb3b2b178be53ad.tar.bz2
Adds device file name to General tab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l2-apps/util/qv4l2')
-rw-r--r--v4l2-apps/util/qv4l2/general-tab.cpp20
-rw-r--r--v4l2-apps/util/qv4l2/general-tab.h2
-rw-r--r--v4l2-apps/util/qv4l2/qv4l2.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/v4l2-apps/util/qv4l2/general-tab.cpp b/v4l2-apps/util/qv4l2/general-tab.cpp
index e00a968f7..d7f5a98d2 100644
--- a/v4l2-apps/util/qv4l2/general-tab.cpp
+++ b/v4l2-apps/util/qv4l2/general-tab.cpp
@@ -31,7 +31,7 @@
#include <sys/ioctl.h>
#include <errno.h>
-GeneralTab::GeneralTab(int _fd, int n, QWidget *parent) :
+GeneralTab::GeneralTab(const char *device, int _fd, int n, QWidget *parent) :
QGrid(n, parent),
fd(_fd)
{
@@ -41,24 +41,24 @@ GeneralTab::GeneralTab(int _fd, int n, QWidget *parent) :
memset(&querycap, 0, sizeof(querycap));
if (ioctl(fd, VIDIOC_QUERYCAP, &querycap) >=0) {
- QLabel *l1 = new QLabel("Driver:", this);
+ QLabel *l1 = new QLabel("Device:", this);
+ QLabel *l1t = new QLabel(device, this);
l1->setAlignment(Qt::AlignRight);
- QLabel *l1t = new QLabel((char *)querycap.driver, this);
-
- QLabel *l2 = new QLabel("Card: ", this);
+ QLabel *l2 = new QLabel("Driver:", this);
l2->setAlignment(Qt::AlignRight);
- QLabel *l2t = new QLabel((char *)querycap.card, this);
+ QLabel *l2t = new QLabel((char *)querycap.driver, this);
- QLabel *l3 = new QLabel("Bus: ", this);
+ QLabel *l3 = new QLabel("Card:", this);
l3->setAlignment(Qt::AlignRight);
- QLabel *l3t = new QLabel((char *)querycap.bus_info, this);
+ QLabel *l3t = new QLabel((char *)querycap.card, this);
- QLabel *l4 = new QLabel("", this);
- QLabel *l4t = new QLabel("", this);
+ QLabel *l4 = new QLabel("Bus:", this);
+ l4->setAlignment(Qt::AlignRight);
+ QLabel *l4t = new QLabel((char *)querycap.bus_info, this);
}
memset(&tuner, 0, sizeof(tuner));
diff --git a/v4l2-apps/util/qv4l2/general-tab.h b/v4l2-apps/util/qv4l2/general-tab.h
index 3612101e7..8130e11e1 100644
--- a/v4l2-apps/util/qv4l2/general-tab.h
+++ b/v4l2-apps/util/qv4l2/general-tab.h
@@ -33,7 +33,7 @@ class GeneralTab: public QGrid
Q_OBJECT
public:
- GeneralTab(int fd, int n, QWidget *parent = 0);
+ GeneralTab(const char *device, int fd, int n, QWidget *parent = 0);
virtual ~GeneralTab() {}
private slots:
diff --git a/v4l2-apps/util/qv4l2/qv4l2.cpp b/v4l2-apps/util/qv4l2/qv4l2.cpp
index f9fb07e09..a93608af2 100644
--- a/v4l2-apps/util/qv4l2/qv4l2.cpp
+++ b/v4l2-apps/util/qv4l2/qv4l2.cpp
@@ -118,7 +118,7 @@ void ApplicationWindow::setDevice(const QString &device)
fd = ::open(device, O_RDONLY);
if (fd >= 0) {
- tabs->addTab(new GeneralTab(fd, 4, tabs), "General");
+ tabs->addTab(new GeneralTab(device, fd, 4, tabs), "General");
addTabs();
}
if (QWidget *current = tabs->currentPage()) {