qv4l2: use "ADC Frequency" for SDR instead of just "Frequency"
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 30 Jul 2014 09:28:38 +0000 (11:28 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Wed, 30 Jul 2014 09:28:38 +0000 (11:28 +0200)
This makes it more obvious what is going on.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
utils/qv4l2/general-tab.cpp

index 5e33562..68079ae 100644 (file)
@@ -366,6 +366,7 @@ void GeneralTab::inputSection(v4l2_input vin)
        if (m_tuner.capability) {
                const char *unit = (m_tuner.capability & V4L2_TUNER_CAP_LOW) ? " kHz" :
                        (m_tuner.capability & V4L2_TUNER_CAP_1HZ ? " Hz" : " MHz");
+               const char *name = m_isSDR ? "ADC Frequency" : "Frequency";
 
                m_freqFac = (m_tuner.capability & V4L2_TUNER_CAP_1HZ) ? 1 : 16;
                m_freq = new QDoubleSpinBox(parentWidget());
@@ -374,14 +375,15 @@ void GeneralTab::inputSection(v4l2_input vin)
                m_freq->setSingleStep(1.0 / m_freqFac);
                m_freq->setSuffix(unit);
                m_freq->setDecimals((m_tuner.capability & V4L2_TUNER_CAP_1HZ) ? 0 : 4);
-               m_freq->setWhatsThis(QString("Frequency\nLow: %1 %3\nHigh: %2 %3")
+               m_freq->setWhatsThis(QString("%1\nLow: %2 %4\nHigh: %3 %4")
+                                    .arg(name)
                                     .arg((double)m_tuner.rangelow / m_freqFac, 0, 'f', 2)
                                     .arg((double)m_tuner.rangehigh / m_freqFac, 0, 'f', 2)
                                     .arg(unit));
                m_freq->setStatusTip(m_freq->whatsThis());
                connect(m_freq, SIGNAL(valueChanged(double)), SLOT(freqChanged(double)));
                updateFreq();
-               m_freqRows->addWidget(new QLabel("Frequency", parentWidget()), 0, 0, Qt::AlignLeft);
+               m_freqRows->addWidget(new QLabel(name, parentWidget()), 0, 0, Qt::AlignLeft);
                m_freqRows->addWidget(m_freq, 0, 1, Qt::AlignLeft);
        }