00001 #include <qlayout.h>
00002 #include <qpushbutton.h>
00003 #include <qbuttongroup.h>
00004 #include <qlabel.h>
00005 #include <qcursor.h>
00006 #include <qsqldatabase.h>
00007 #include <qdatetime.h>
00008 #include <qapplication.h>
00009 #include <qregexp.h>
00010 #include <qheader.h>
00011
00012 #include <iostream>
00013 #include <map>
00014 #include <vector>
00015 #include <algorithm>
00016 using namespace std;
00017
00018 #include "channelrecpriority.h"
00019 #include "tv.h"
00020
00021 #include "exitcodes.h"
00022 #include "dialogbox.h"
00023 #include "mythcontext.h"
00024 #include "mythdbcon.h"
00025 #include "scheduledrecording.h"
00026 #include "proglist.h"
00027 #include "infostructs.h"
00028
00029 ChannelRecPriority::ChannelRecPriority(MythMainWindow *parent, const char *name)
00030 : MythDialog(parent, name)
00031 {
00032 curitem = NULL;
00033 pageDowner = false;
00034 bgTransBackup = NULL;
00035
00036 listCount = 0;
00037 dataCount = 0;
00038
00039 fullRect = QRect(0, 0, size().width(), size().height());
00040 listRect = QRect(0, 0, 0, 0);
00041 infoRect = QRect(0, 0, 0, 0);
00042
00043 theme = new XMLParse();
00044 theme->SetWMult(wmult);
00045 theme->SetHMult(hmult);
00046 if (!theme->LoadTheme(xmldata, "recprioritychannels"))
00047 {
00048 DialogBox *dlg = new DialogBox(
00049 gContext->GetMainWindow(),
00050 QObject::tr(
00051 "The theme you are using does not contain the "
00052 "%1 element. Please contact the theme creator "
00053 "and ask if they could please update it.<br><br>"
00054 "The next screen will be empty. "
00055 "Escape out of it to return to the menu.")
00056 .arg("'recprioritychannels'"));
00057
00058 dlg->AddButton(QObject::tr("OK"));
00059 dlg->exec();
00060 dlg->deleteLater();
00061
00062 return;
00063 }
00064
00065 LoadWindow(xmldata);
00066
00067 LayerSet *container = theme->GetSet("selector");
00068 if (container)
00069 {
00070 UIListType *ltype = (UIListType *)container->GetType("recprioritylist");
00071 if (ltype)
00072 {
00073 listsize = ltype->GetItems();
00074 }
00075 }
00076 else
00077 {
00078 VERBOSE(VB_IMPORTANT, "MythFrontEnd: ChannelRecPriority - "
00079 "Failed to get selector.");
00080 exit(FRONTEND_BUGGY_EXIT_NO_SELECTOR);
00081 }
00082
00083 bgTransBackup = gContext->LoadScalePixmap("trans-backup.png");
00084 if (!bgTransBackup)
00085 bgTransBackup = new QPixmap();
00086
00087 updateBackground();
00088
00089 FillList();
00090 sortType = (SortType)gContext->GetNumSetting("ChannelRecPrioritySorting",
00091 (int)byChannel);
00092
00093 SortList();
00094 inList = 0;
00095 inData = 0;
00096 setNoErase();
00097
00098 longchannelformat =
00099 gContext->GetSetting("LongChannelFormat", "<num> <name>");
00100
00101 gContext->addListener(this);
00102 gContext->addCurrentLocation("ChannelRecPriority");
00103 }
00104
00105 ChannelRecPriority::~ChannelRecPriority()
00106 {
00107 gContext->removeListener(this);
00108 gContext->removeCurrentLocation();
00109 delete theme;
00110 if (bgTransBackup)
00111 delete bgTransBackup;
00112 if (curitem)
00113 delete curitem;
00114 }
00115
00116 void ChannelRecPriority::keyPressEvent(QKeyEvent *e)
00117 {
00118 bool handled = false;
00119 QStringList actions;
00120 if (gContext->GetMainWindow()->TranslateKeyPress("TV Frontend", e, actions))
00121 {
00122 for (unsigned int i = 0; i < actions.size() && !handled; i++)
00123 {
00124 QString action = actions[i];
00125 handled = true;
00126
00127 if (action == "UP")
00128 cursorUp();
00129 else if (action == "DOWN")
00130 cursorDown();
00131 else if (action == "PAGEUP")
00132 pageUp();
00133 else if (action == "PAGEDOWN")
00134 pageDown();
00135 else if (action == "SELECT" || action == "MENU" ||
00136 action == "INFO" || action == "CUSTOMEDIT")
00137 edit();
00138 else if (action == "UPCOMING")
00139 upcoming();
00140 else if (action == "RANKINC")
00141 changeRecPriority(1);
00142 else if (action == "RANKDEC")
00143 changeRecPriority(-1);
00144 else if (action == "ESCAPE" || action == "LEFT")
00145 {
00146 saveRecPriority();
00147 gContext->SaveSetting("ChannelRecPrioritySorting",
00148 (int)sortType);
00149 done(MythDialog::Accepted);
00150 }
00151 else if (action == "1")
00152 {
00153 if (sortType != byChannel)
00154 {
00155 sortType = byChannel;
00156 SortList();
00157 update(fullRect);
00158 }
00159 }
00160 else if (action == "2")
00161 {
00162 if (sortType != byRecPriority)
00163 {
00164 sortType = byRecPriority;
00165 SortList();
00166 update(fullRect);
00167 }
00168 }
00169 else if (action == "PREVVIEW" || action == "NEXTVIEW")
00170 {
00171 if (sortType == byChannel)
00172 sortType = byRecPriority;
00173 else
00174 sortType = byChannel;
00175 SortList();
00176 update(fullRect);
00177 }
00178 else
00179 handled = false;
00180 }
00181 }
00182
00183 if (!handled)
00184 MythDialog::keyPressEvent(e);
00185 }
00186
00187 void ChannelRecPriority::LoadWindow(QDomElement &element)
00188 {
00189 for (QDomNode child = element.firstChild(); !child.isNull();
00190 child = child.nextSibling())
00191 {
00192 QDomElement e = child.toElement();
00193 if (!e.isNull())
00194 {
00195 if (e.tagName() == "font")
00196 {
00197 theme->parseFont(e);
00198 }
00199 else if (e.tagName() == "container")
00200 {
00201 parseContainer(e);
00202 }
00203 else
00204 {
00205 VERBOSE(VB_IMPORTANT, QString("Unknown child element: %1. Ignoring.")
00206 .arg(e.tagName()));
00207 }
00208 }
00209 }
00210 }
00211
00212 void ChannelRecPriority::parseContainer(QDomElement &element)
00213 {
00214 QRect area;
00215 QString name;
00216 int context;
00217 theme->parseContainer(element, name, context, area);
00218
00219 if (name.lower() == "selector")
00220 listRect = area;
00221 if (name.lower() == "channel_info")
00222 infoRect = area;
00223 }
00224
00225 void ChannelRecPriority::updateBackground(void)
00226 {
00227 QPixmap bground(size());
00228 bground.fill(this, 0, 0);
00229
00230 QPainter tmp(&bground);
00231
00232 LayerSet *container = theme->GetSet("background");
00233 if (!container)
00234 return;
00235
00236 container->Draw(&tmp, 0, 0);
00237
00238 tmp.end();
00239 myBackground = bground;
00240
00241 setPaletteBackgroundPixmap(myBackground);
00242 }
00243
00244 void ChannelRecPriority::paintEvent(QPaintEvent *e)
00245 {
00246 QRect r = e->rect();
00247 QPainter p(this);
00248
00249 if (r.intersects(listRect))
00250 {
00251 updateList(&p);
00252 }
00253 if (r.intersects(infoRect))
00254 {
00255 updateInfo(&p);
00256 }
00257 }
00258
00259 void ChannelRecPriority::cursorDown(bool page)
00260 {
00261 if (page == false)
00262 {
00263 if (inList > (int)((int)(listsize / 2) - 1)
00264 && ((int)(inData + listsize) <= (int)(dataCount - 1))
00265 && pageDowner == true)
00266 {
00267 inData++;
00268 inList = (int)(listsize / 2);
00269 }
00270 else
00271 {
00272 inList++;
00273
00274 if (inList >= listCount)
00275 inList = listCount - 1;
00276 }
00277 }
00278 else if (page == true && pageDowner == true)
00279 {
00280 if (inList >= (int)(listsize / 2) || inData != 0)
00281 {
00282 inData = inData + listsize;
00283 }
00284 else if (inList < (int)(listsize / 2) && inData == 0)
00285 {
00286 inData = (int)(listsize / 2) + inList;
00287 inList = (int)(listsize / 2);
00288 }
00289 }
00290 else if (page == true && pageDowner == false)
00291 {
00292 inList = listsize - 1;
00293 }
00294
00295 if ((int)(inData + inList) >= (int)(dataCount))
00296 {
00297 inData = dataCount - listsize;
00298 inList = listsize - 1;
00299 }
00300 else if ((int)(inData + listsize) >= (int)dataCount)
00301 {
00302 inData = dataCount - listsize;
00303 }
00304
00305 if (inData < 0)
00306 inData = 0;
00307
00308 if (inList >= listCount)
00309 inList = listCount - 1;
00310
00311 update(fullRect);
00312 }
00313
00314 void ChannelRecPriority::cursorUp(bool page)
00315 {
00316 if (page == false)
00317 {
00318 if (inList < ((int)(listsize / 2) + 1) && inData > 0)
00319 {
00320 inList = (int)(listsize / 2);
00321 inData--;
00322 if (inData < 0)
00323 {
00324 inData = 0;
00325 inList--;
00326 }
00327 }
00328 else
00329 {
00330 inList--;
00331 }
00332 }
00333 else if (page == true && inData > 0)
00334 {
00335 inData = inData - listsize;
00336 if (inData < 0)
00337 {
00338 inList = inList + inData;
00339 inData = 0;
00340 if (inList < 0)
00341 inList = 0;
00342 }
00343
00344 if (inList > (int)(listsize / 2))
00345 {
00346 inList = (int)(listsize / 2);
00347 inData = inData + (int)(listsize / 2) - 1;
00348 }
00349 }
00350 else if (page == true)
00351 {
00352 inData = 0;
00353 inList = 0;
00354 }
00355
00356 if (inList > -1)
00357 {
00358 update(fullRect);
00359 }
00360 else
00361 inList = 0;
00362 }
00363
00364 void ChannelRecPriority::changeRecPriority(int howMuch)
00365 {
00366 int tempRecPriority, cnt;
00367 QPainter p(this);
00368 QMap<QString, ChannelInfo>::Iterator it;
00369 ChannelInfo *chanInfo;
00370
00371
00372
00373 for (cnt=0, it = channelData.begin(); cnt < inList+inData; cnt++, ++it);
00374
00375 chanInfo = &(it.data());
00376
00377
00378 tempRecPriority = chanInfo->recpriority.toInt() + howMuch;
00379 if (tempRecPriority > -100 && tempRecPriority < 100)
00380 {
00381 chanInfo->recpriority = QString::number(tempRecPriority);
00382
00383
00384 if (sortType == byRecPriority)
00385 SortList();
00386 updateList(&p);
00387 updateInfo(&p);
00388 }
00389 }
00390
00391 void ChannelRecPriority::applyChannelRecPriorityChange(QString chanid,
00392 const QString &newrecpriority)
00393 {
00394 MSqlQuery query(MSqlQuery::InitCon());
00395 query.prepare("UPDATE channel SET recpriority = :RECPRI "
00396 "WHERE chanid = :CHANID ;");
00397 query.bindValue(":RECPRI", newrecpriority);
00398 query.bindValue(":CHANID", chanid);
00399
00400 if (!query.exec() || !query.isActive())
00401 MythContext::DBError("Save recpriority update", query);
00402 }
00403
00404 void ChannelRecPriority::saveRecPriority(void)
00405 {
00406 QMap<QString, ChannelInfo>::Iterator it;
00407
00408 for (it = channelData.begin(); it != channelData.end(); ++it)
00409 {
00410 ChannelInfo *chanInfo = &(it.data());
00411 QString key = QString::number(chanInfo->chanid);
00412
00413
00414
00415 if (chanInfo->recpriority != origRecPriorityData[key])
00416 applyChannelRecPriorityChange(QString::number(chanInfo->chanid),
00417 chanInfo->recpriority);
00418 }
00419 ScheduledRecording::signalChange(0);
00420 }
00421
00422 void ChannelRecPriority::FillList(void)
00423 {
00424 int cnt = 999;
00425
00426 QMap<int, QString> srcMap;
00427
00428 channelData.clear();
00429 visMap.clear();
00430
00431 MSqlQuery result(MSqlQuery::InitCon());
00432 result.prepare("SELECT sourceid, name FROM videosource;");
00433
00434 if (result.exec() && result.isActive() && result.size() > 0)
00435 {
00436 while (result.next())
00437 {
00438 srcMap[result.value(0).toInt()] =
00439 QString::fromUtf8(result.value(1).toString());
00440 }
00441 }
00442 result.prepare("SELECT chanid, channum, sourceid, callsign, "
00443 "icon, recpriority, name, visible FROM channel;");
00444
00445 if (result.exec() && result.isActive() && result.size() > 0)
00446 {
00447 while (result.next())
00448 {
00449 ChannelInfo *chaninfo = new ChannelInfo;
00450 chaninfo->chanid = result.value(0).toInt();
00451 chaninfo->chanstr = result.value(1).toString();
00452 chaninfo->sourceid = result.value(2).toInt();
00453 chaninfo->callsign = QString::fromUtf8(result.value(3).toString());
00454 chaninfo->iconpath = result.value(4).toString();
00455 chaninfo->recpriority = result.value(5).toString();
00456 chaninfo->channame = QString::fromUtf8(result.value(6).toString());
00457 if (result.value(7).toInt() > 0)
00458 visMap[chaninfo->chanid] = true;
00459 chaninfo->sourcename = srcMap[chaninfo->sourceid];
00460
00461 channelData[QString::number(cnt)] = *chaninfo;
00462
00463
00464
00465 origRecPriorityData[QString::number(chaninfo->chanid)] =
00466 chaninfo->recpriority;
00467
00468 cnt--;
00469 dataCount++;
00470 }
00471 }
00472 else if (!result.isActive())
00473 MythContext::DBError("Get channel recording priorities query", result);
00474 }
00475
00476 typedef struct RecPriorityInfo
00477 {
00478 ChannelInfo *chan;
00479 int cnt;
00480 };
00481
00482 class channelSort
00483 {
00484 public:
00485 bool operator()(const RecPriorityInfo a, const RecPriorityInfo b)
00486 {
00487 if (a.chan->chanstr.toInt() == b.chan->chanstr.toInt())
00488 return(a.chan->sourceid > b.chan->sourceid);
00489 return(a.chan->chanstr.toInt() > b.chan->chanstr.toInt());
00490 }
00491 };
00492
00493 class channelRecPrioritySort
00494 {
00495 public:
00496 bool operator()(const RecPriorityInfo a, const RecPriorityInfo b)
00497 {
00498 if (a.chan->recpriority.toInt() == b.chan->recpriority.toInt())
00499 return (a.chan->chanstr.toInt() > b.chan->chanstr.toInt());
00500 return (a.chan->recpriority.toInt() < b.chan->recpriority.toInt());
00501 }
00502 };
00503
00504 void ChannelRecPriority::SortList()
00505 {
00506 typedef vector<RecPriorityInfo> sortList;
00507 typedef QMap<QString, ChannelInfo> chanMap;
00508
00509 int i, j;
00510 bool cursorChanged = false;
00511 sortList sortedList;
00512 chanMap::Iterator pit;
00513 sortList::iterator sit;
00514 ChannelInfo *chanInfo;
00515 RecPriorityInfo *recPriorityInfo;
00516 chanMap cdCopy;
00517
00518
00519
00520 for (i = 0, pit = channelData.begin(); pit != channelData.end(); ++pit, i++)
00521 {
00522 chanInfo = &(pit.data());
00523 RecPriorityInfo tmp = {chanInfo, i};
00524 sortedList.push_back(tmp);
00525 cdCopy[pit.key()] = pit.data();
00526 }
00527
00528 switch(sortType)
00529 {
00530 case byRecPriority:
00531 sort(sortedList.begin(), sortedList.end(),
00532 channelRecPrioritySort());
00533 break;
00534 case byChannel:
00535 default:
00536 sort(sortedList.begin(), sortedList.end(),
00537 channelSort());
00538 break;
00539 }
00540
00541 channelData.clear();
00542
00543
00544 for(i = 0, sit = sortedList.begin(); sit != sortedList.end(); i++, ++sit )
00545 {
00546 recPriorityInfo = &(*sit);
00547
00548
00549 for (j = 0, pit = cdCopy.begin(); j !=recPriorityInfo->cnt; j++, ++pit);
00550
00551 chanInfo = &(pit.data());
00552
00553
00554 channelData[QString::number(999-i)] = pit.data();
00555
00556
00557
00558
00559 if (!cursorChanged && recPriorityInfo->cnt == inList+inData)
00560 {
00561 inList = dataCount - i - 1;
00562 if (inList > (int)((int)(listsize / 2) - 1))
00563 {
00564 inList = (int)(listsize / 2);
00565 inData = dataCount - i - 1 - inList;
00566 }
00567 else
00568 inData = 0;
00569
00570 if (dataCount > listsize && inData > dataCount - listsize)
00571 {
00572 inList += inData - (dataCount - listsize);
00573 inData = dataCount - listsize;
00574 }
00575 cursorChanged = true;
00576 }
00577 }
00578 }
00579
00580 void ChannelRecPriority::updateList(QPainter *p)
00581 {
00582 QRect pr = listRect;
00583 QPixmap pix(pr.size());
00584 pix.fill(this, pr.topLeft());
00585 QPainter tmp(&pix);
00586
00587 int pastSkip = (int)inData;
00588 pageDowner = false;
00589 listCount = 0;
00590
00591 LayerSet *container = NULL;
00592 container = theme->GetSet("selector");
00593 if (container)
00594 {
00595 UIListType *ltype = (UIListType *)container->GetType("recprioritylist");
00596 if (ltype)
00597 {
00598 int cnt = 0;
00599 ltype->ResetList();
00600 ltype->SetActive(true);
00601
00602 QMap<QString, ChannelInfo>::Iterator it;
00603 for (it = channelData.begin(); it != channelData.end(); ++it)
00604 {
00605 if (cnt < listsize)
00606 {
00607 if (pastSkip <= 0)
00608 {
00609 ChannelInfo *chanInfo = &(it.data());
00610 int recPriority = chanInfo->recpriority.toInt();
00611
00612 if (cnt == inList)
00613 {
00614 if (curitem)
00615 delete curitem;
00616 curitem = new ChannelInfo(*chanInfo);
00617 ltype->SetItemCurrent(cnt);
00618 }
00619
00620 ltype->SetItemText(cnt, 1,
00621 chanInfo->Text(" <num> <sign> \"<name>\""));
00622
00623 if (chanInfo->recpriority.toInt() > 0)
00624 ltype->SetItemText(cnt, 2, "+");
00625 else if (chanInfo->recpriority.toInt() < 0)
00626 ltype->SetItemText(cnt, 2, "-");
00627 ltype->SetItemText(cnt, 3,
00628 QString::number(abs(recPriority)));
00629
00630 if (!visMap[chanInfo->chanid])
00631 ltype->EnableForcedFont(cnt, "inactive");
00632
00633 cnt++;
00634 listCount++;
00635 }
00636 pastSkip--;
00637 }
00638 else
00639 pageDowner = true;
00640 }
00641
00642 ltype->SetDownArrow(pageDowner);
00643 if (inData > 0)
00644 ltype->SetUpArrow(true);
00645 else
00646 ltype->SetUpArrow(false);
00647 }
00648 }
00649
00650 if (channelData.count() <= 0)
00651 container = theme->GetSet("norecordings_list");
00652
00653 if (container)
00654 {
00655 container->Draw(&tmp, 0, 0);
00656 container->Draw(&tmp, 1, 0);
00657 container->Draw(&tmp, 2, 0);
00658 container->Draw(&tmp, 3, 0);
00659 container->Draw(&tmp, 4, 0);
00660 container->Draw(&tmp, 5, 0);
00661 container->Draw(&tmp, 6, 0);
00662 container->Draw(&tmp, 7, 0);
00663 container->Draw(&tmp, 8, 0);
00664 }
00665
00666 tmp.end();
00667 p->drawPixmap(pr.topLeft(), pix);
00668 }
00669
00670 void ChannelRecPriority::updateInfo(QPainter *p)
00671 {
00672 QRect pr = infoRect;
00673 QPixmap pix(pr.size());
00674 pix.fill(this, pr.topLeft());
00675 QPainter tmp(&pix);
00676 QString rectype;
00677 UIImageType *itype = NULL;
00678
00679 if (channelData.count() > 0 && curitem)
00680 {
00681 LayerSet *container = NULL;
00682 container = theme->GetSet("channel_info");
00683 if (container)
00684 {
00685 itype = (UIImageType *)container->GetType("icon");
00686 if (itype) {
00687 int iconwidth = itype->GetSize().width();
00688 int iconheight = itype->GetSize().height();
00689 if (curitem->iconpath == "none" || curitem->iconpath == "")
00690 curitem->iconpath = "blankicon.jpg";
00691 if (!curitem->iconload)
00692 curitem->LoadChannelIcon(iconwidth, iconheight);
00693 if (curitem->iconload)
00694 itype->SetImage(curitem->icon);
00695 }
00696
00697 UITextType *type = (UITextType *)container->GetType("title");
00698 if (type)
00699 type->SetText(curitem->Text(longchannelformat));
00700
00701 type = (UITextType *)container->GetType("source");
00702 if (type)
00703 {
00704 type->SetText(QString("%1 %2").arg(curitem->sourceid)
00705 .arg(curitem->sourcename));
00706 }
00707
00708 type = (UITextType *)container->GetType("recpriority");
00709 if (type) {
00710 if (curitem->recpriority.toInt() > 0)
00711 type->SetText("+"+curitem->recpriority);
00712 else
00713 type->SetText(curitem->recpriority);
00714 }
00715 }
00716
00717 if (container)
00718 {
00719 container->Draw(&tmp, 4, 0);
00720 container->Draw(&tmp, 5, 0);
00721 container->Draw(&tmp, 6, 0);
00722 container->Draw(&tmp, 7, 0);
00723 container->Draw(&tmp, 8, 0);
00724 }
00725 }
00726 else
00727 {
00728 LayerSet *norec = theme->GetSet("norecordings_info");
00729 if (norec)
00730 {
00731 norec->Draw(&tmp, 4, 0);
00732 norec->Draw(&tmp, 5, 0);
00733 norec->Draw(&tmp, 6, 0);
00734 norec->Draw(&tmp, 7, 0);
00735 norec->Draw(&tmp, 8, 0);
00736 }
00737
00738 }
00739
00740 tmp.end();
00741 p->drawPixmap(pr.topLeft(), pix);
00742 }
00743
00744 void ChannelRecPriority::edit()
00745 {
00746 int cnt;
00747 QMap<QString, ChannelInfo>::Iterator it;
00748 ChannelInfo *chanInfo;
00749
00750
00751
00752 for (cnt=0, it = channelData.begin(); cnt < inList+inData; cnt++, ++it);
00753
00754 chanInfo = &(it.data());
00755
00756 ChannelWizard cw(chanInfo->chanid, chanInfo->sourceid);
00757 cw.exec();
00758
00759
00760 MSqlQuery result(MSqlQuery::InitCon());
00761 result.prepare("SELECT chanid, channum, sourceid, callsign, "
00762 "icon, recpriority, name, visible FROM channel "
00763 "WHERE chanid = :CHANID;");
00764 result.bindValue(":CHANID", chanInfo->chanid);
00765
00766 if (result.exec() && result.isActive() && result.size() > 0)
00767 {
00768 result.next();
00769 chanInfo->chanid = result.value(0).toInt();
00770 chanInfo->chanstr = result.value(1).toString();
00771 chanInfo->sourceid = result.value(2).toInt();
00772 chanInfo->callsign = QString::fromUtf8(result.value(3).toString());
00773 chanInfo->iconpath = result.value(4).toString();
00774 chanInfo->recpriority = result.value(5).toString();
00775 chanInfo->channame = QString::fromUtf8(result.value(6).toString());
00776 if (result.value(7).toInt() > 0)
00777 visMap[chanInfo->chanid] = true;
00778 else
00779 visMap[chanInfo->chanid] = false;
00780 }
00781 else if (!result.isActive())
00782 MythContext::DBError("Get channel priorities update", result);
00783
00784 SortList();
00785 update(fullRect);
00786 }
00787
00788 void ChannelRecPriority::upcoming()
00789 {
00790 int cnt;
00791 QMap<QString, ChannelInfo>::Iterator it;
00792 ChannelInfo *chanInfo;
00793
00794
00795
00796 for (cnt=0, it = channelData.begin(); cnt < inList+inData; cnt++, ++it);
00797
00798 chanInfo = &(it.data());
00799
00800 if (chanInfo->chanid < 1)
00801 return;
00802
00803 QString chanID = QString("%1").arg(chanInfo->chanid);
00804 ProgLister *pl = new ProgLister(plChannel, chanID, "",
00805 gContext->GetMainWindow(), "proglist");
00806 pl->exec();
00807 delete pl;
00808 }