[mythtv] DVB-S - mythchannels setup problems
Steve Brown
sbrown at cortland.com
Tue Aug 12 18:04:41 EDT 2003
Edward Wildgoose wrote:
>
>Sounds like the code is confused and only showing the dvb-t dialog. It certainly worked in the past though, so I assume that this is a minor error somewhere. (I think if you look at the screen shots in the link you gave you will see that you have something different?)
>
>
>Ed W
>
>
>
With the attached changes, I can edit dvb-s channels with the tune screen.
When I hit accept on the tune screen and return to the edit screen, the
"save" button is disabled. I have to make a trivial change like
overwriting a character in the channel name to enable the save button.
The save button does the database update. I'm looking for a clean way to
signal that when the tune screen ends and a change was made. I think
that the test screen has a similar problem. Maybe a "dirty" field in the
metadata?
The patch isn't complete, but I wanted to get come concensus that I was
going in the right direction.
Steve
-------------- next part --------------
--- mythchannels.orig/channelstune.cpp 2003-08-07 18:31:01.000000000 -0400
+++ mythchannels/channelstune.cpp 2003-08-12 15:57:50.000000000 -0400
@@ -191,7 +191,8 @@
m_pol = new MythComboBox( false, this, "polarization" );
m_pol->insertItem("V");
m_pol->insertItem("H");
- m_pol->setCurrentText(channel_data->Pol());
+ if (channel_data->Pol() != "")
+ m_pol->setCurrentText(channel_data->Pol());
hbox->addWidget(m_pol);
hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
@@ -231,8 +232,8 @@
m_tone->setValue(channel_data->Tone());
hbox->addWidget(m_tone);
} // if DVB-s
- if ((channel_data->ChannelType() == "DVB-t") or
- (channel_data->ChannelType() == "DVB-c")) {
+// if ((channel_data->ChannelType() == "DVB-t") or
+// (channel_data->ChannelType() == "DVB-c")) {
message = tr("Inv:");
label = new QLabel(message, this);
label->setBackgroundOrigin(WindowOrigin);
@@ -246,7 +247,7 @@
if (channel_data->Inversion() != "")
m_inversion->setCurrentText(channel_data->Inversion());
hbox->addWidget(m_inversion);
- }
+// }
if (channel_data->ChannelType() == "DVB-t") {
message = tr("Bandwidth:");
@@ -265,8 +266,8 @@
hbox->addWidget(m_bandwidth);
}
- if ((channel_data->ChannelType() == "DVB-t") or
- (channel_data->ChannelType() == "DVB-c")) {
+// if ((channel_data->ChannelType() == "DVB-t") or
+// (channel_data->ChannelType() == "DVB-c")) {
hbox = new QHBoxLayout(vbox, (int)(10 * wmult));
@@ -308,7 +309,7 @@
if (channel_data->Modulation() != "")
m_modulation->setCurrentText(channel_data->Modulation());
hbox->addWidget(m_modulation);
- }
+// }
if (channel_data->ChannelType() == "DVB-t") {
message = tr("Trans. Mode:");
@@ -434,6 +435,18 @@
this, SLOT(DVBChanged(void)));
connect(m_tone, SIGNAL(valueChanged(int)),
this, SLOT(DVBChanged(void)));
+ connect(m_inversion, SIGNAL(highlighted(int)),
+ this, SLOT(DVBChanged(void)));
+ connect(m_inversion, SIGNAL(activated(int)),
+ this, SLOT(DVBChanged(void)));
+ connect(m_modulation, SIGNAL(highlighted(int)),
+ this, SLOT(DVBChanged(void)));
+ connect(m_modulation, SIGNAL(activated(int)),
+ this, SLOT(DVBChanged(void)));
+ connect(m_hp_code_rate, SIGNAL(highlighted(int)),
+ this, SLOT(DVBChanged(void)));
+ connect(m_hp_code_rate, SIGNAL(activated(int)),
+ this, SLOT(DVBChanged(void)));
}
if (channel_data->ChannelType() == "DVB-t") {
connect(m_inversion, SIGNAL(highlighted(int)),
@@ -541,6 +554,9 @@
}
channel_data->setField("vpids",m_vpid->text());
channel_data->setField("apids",m_apid->text());
+ channel_data->setField("modulation",m_modulation->currentText());
+ channel_data->setField("inversion",m_inversion->currentText());
+ channel_data->setField("hp_code_rate",m_hp_code_rate->currentText());
gContext->SaveSetting("lastDVBvPIDs",m_vpid->text());
gContext->SaveSetting("lastDVBaPIDs",m_apid->text());
}
More information about the mythtv-dev
mailing list