Ticket #541: videosource.patch
File videosource.patch, 5.7 KB (added by , 18 years ago) |
---|
-
videosource.h
209 209 QString grabber; 210 210 }; 211 211 212 class OnAirGuide_config: public LabelSetting { 213 public: 214 OnAirGuide_config(); 215 216 virtual void load() {}; 217 virtual void save() {}; 218 }; 219 212 220 class XMLTVConfig: public VerticalConfigurationGroup, 213 221 public TriggeredConfigurationGroup { 214 222 public: -
videosource.cpp
904 904 pdlg.Close(); 905 905 } 906 906 907 OnAirGuide_config::OnAirGuide_config() 908 { 909 } 910 907 911 XMLTVConfig::XMLTVConfig(const VideoSource& parent) 908 912 { 909 913 setUseLabel(false); … … 921 925 addTarget("technovera", new DataDirect_config(parent, DD_LXM)); 922 926 grabber->addSelection("LxM (United States)", "technovera"); 923 927 928 addTarget("onairguide", new OnAirGuide_config()); 929 grabber->addSelection("Transmitted Over Air Guide (EIT)", "onairguide"); 930 924 931 addTarget("tv_grab_de_tvtoday", new XMLTV_generic_config(parent, "tv_grab_de_tvtoday")); 925 932 grabber->addSelection("Germany (tvtoday)", "tv_grab_de_tvtoday"); 926 933 -
channelsettings.cpp
167 167 }; 168 168 }; 169 169 170 class OnAirGuide: public CheckBoxSetting, public CSetting {171 public:172 OnAirGuide(const ChannelID& id):173 CheckBoxSetting(), CSetting(id, "useonairguide") {174 setLabel(QObject::tr("Use on air guide"));175 setHelpText(QObject::tr("If set the guide information will be taken "176 "from the On Air Channel guide."));177 };178 };179 180 170 /***************************************************************************** 181 171 Channel Options - Video 4 Linux 182 172 *****************************************************************************/ … … 274 264 addChild(new VideoFilters(id)); 275 265 addChild(new OutputFilters(id)); 276 266 277 #ifdef USING_DVB_EIT 278 HorizontalConfigurationGroup *bottomhoz = new HorizontalConfigurationGroup(false,true); 279 bottomhoz->addChild(onairguide = new OnAirGuide(id)); 280 bottomhoz->addChild(xmltvID = new XmltvID(id)); 281 addChild(bottomhoz); 282 283 connect(onairguide,SIGNAL(valueChanged(bool)),this,SLOT(onAirGuideChanged(bool))); 267 addChild(xmltvID = new XmltvID(id)); 284 268 connect(source,SIGNAL(valueChanged(const QString&)),this,SLOT(sourceChanged(const QString&))); 285 #else286 addChild(new XmltvID(id));287 #endif288 269 }; 289 270 290 271 void ChannelOptionsCommon::load() … … 292 273 VerticalConfigurationGroup::load(); 293 274 } 294 275 295 void ChannelOptionsCommon::onAirGuideChanged(bool fValue)296 {297 (void)fValue;298 #ifdef USING_DVB299 xmltvID->setEnabled(!fValue);300 #endif301 }302 303 276 void ChannelOptionsCommon::sourceChanged(const QString& str) 304 277 { 305 278 (void)str; 306 279 #ifdef USING_DVB 307 280 308 281 bool fDVB =false; 282 bool fOnAirGuide = false; 309 283 310 284 MSqlQuery query(MSqlQuery::InitCon()); 311 285 … … 323 297 { 324 298 query.next(); 325 299 if (query.value(0).toInt()) 326 fDVB = true; 300 { 301 fDVB = true; 302 query.prepare("SELECT xmltvgrabber FROM videosource WHERE " 303 "videosource.sourceid = :SOURCEID "); 304 query.bindValue(":SOURCEID", str); 305 if (query.exec() && query.isActive() && query.size() > 0) 306 { 307 query.next(); 308 if (query.value(0).toString() == "onairguide") 309 fOnAirGuide = true; 310 } 311 } 327 312 } 328 313 if (fDVB) 329 { 330 onairguide->setEnabled(true); 331 xmltvID->setEnabled(!onairguide->boolValue()); 332 } 314 xmltvID->setEnabled(!fOnAirGuide); 333 315 else 334 {335 onairguide->setEnabled(false);336 316 xmltvID->setEnabled(true); 337 }338 317 #endif 339 318 } 340 319 -
eithelper.cpp
145 145 // linkage to chanid is different than DVB 146 146 if (event.ATSC) 147 147 { 148 query.prepare(QString("SELECT chanid, useonairguide FROM channel " 148 query.prepare(QString("SELECT chanid, xmltvgrabber " 149 "FROM channel, videosource " 149 150 "WHERE atscsrcid = %1 AND mplexid = %2") 150 151 .arg(event.ServiceID) 151 152 .arg(mplexid)); … … 153 154 else 154 155 { 155 156 /* DVB Link to chanid */ 156 query.prepare(QString("SELECT chanid, useonairguide"157 "FROM channel, dtv_multiplex "157 query.prepare(QString("SELECT chanid, xmltvgrabber " 158 "FROM channel, videosource, dtv_multiplex " 158 159 "WHERE serviceid = %1 AND " 159 160 " networkid = %2 AND " 160 161 " channel.mplexid = dtv_multiplex.mplexid") … … 173 174 return -1; 174 175 } 175 176 176 // Check to see if we are inter seted in this channel177 // Check to see if we are interested in this channel 177 178 query.next(); 178 bool useOnAirGuide = query.value(1).to Bool();179 bool useOnAirGuide = query.value(1).toString() == "onairguide"; 179 180 return (useOnAirGuide) ? query.value(0).toInt() : -1; 180 181 } 181 182 -
channelsettings.h
108 108 ChannelOptionsCommon(const ChannelID& id); 109 109 void load(); 110 110 public slots: 111 void onAirGuideChanged(bool);112 111 void sourceChanged(const QString&); 113 112 114 113 protected: