void VideoSetupWizard::loadData(void) { QStringList profiles = m_vdp->GetProfiles(gCoreContext->GetHostName()); for (QStringList::const_iterator i = profiles.begin(); i != profiles.end(); ++i) { MythUIButtonListItem *item = new MythUIButtonListItem(m_playbackProfileButtonList, *i); item->SetData(*i); } QString currentpbp = m_vdp->GetDefaultProfileName(gCoreContext->GetHostName()); if (!currentpbp.isEmpty()) { MythUIButtonListItem *set = m_playbackProfileButtonList->GetItemByData(currentpbp); m_playbackProfileButtonList->SetItemCurrent(set); } }
void ChannelRecPriority::upcoming() { MythUIButtonListItem *item = m_channelList->GetItemCurrent(); if (!item) return; ChannelInfo *chanInfo = item->GetData().value<ChannelInfo *>(); if (!chanInfo || chanInfo->chanid < 1) return; QString chanID = QString("%1").arg(chanInfo->chanid); MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); ProgLister *pl = new ProgLister(mainStack, plChannel, chanID, ""); if (pl->Create()) mainStack->AddScreen(pl); else delete pl; }
void RecordingSelector::updateRecordingList(void) { if (!m_recordingList || m_recordingList->size() == 0) return; m_recordingButtonList->Reset(); if (m_categorySelector) { ProgramInfo *p; vector<ProgramInfo *>::iterator i = m_recordingList->begin(); for ( ; i != m_recordingList->end(); i++) { p = *i; if (p->GetTitle() == m_categorySelector->GetValue() || m_categorySelector->GetValue() == tr("All Recordings")) { MythUIButtonListItem* item = new MythUIButtonListItem( m_recordingButtonList, p->GetTitle() + " ~ " + p->GetScheduledStartTime().toString("dd MMM yy (hh:mm)")); item->setCheckable(true); if (m_selectedList.indexOf((ProgramInfo *) p) != -1) { item->setChecked(MythUIButtonListItem::FullChecked); } else { item->setChecked(MythUIButtonListItem::NotChecked); } item->SetData(qVariantFromValue(p)); } qApp->processEvents(); } } m_recordingButtonList->SetItemCurrent(m_recordingButtonList->GetItemFirst()); titleChanged(m_recordingButtonList->GetItemCurrent()); }
void SearchView::ShowMenu(void) { if (GetFocusWidget() == m_tracksList) { QString label = tr("Search Actions"); MythMenu *menu = new MythMenu(label, this, "searchviewmenu"); MythUIButtonListItem *item = m_tracksList->GetItemCurrent(); if (item) { MusicMetadata *mdata = qVariantValue<MusicMetadata*> (item->GetData()); if (mdata) { if (gPlayer->getCurrentPlaylist() && gPlayer->getCurrentPlaylist()->checkTrack(mdata->ID())) menu->AddItem(tr("Remove From Playlist")); else { menu->AddItem(tr("Add To Playlist")); menu->AddItem(tr("Add To Playlist And Play")); } } } if (GetFocusWidget() == m_tracksList || GetFocusWidget() == m_currentPlaylist) menu->AddItem(tr("Search List...")); menu->AddItem(tr("More Options"), NULL, createSubMenu()); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack, "actionmenu"); if (menuPopup->Create()) popupStack->AddScreen(menuPopup); else delete menu; } else MusicCommon::ShowMenu(); }
void ProgLister::UpdateButtonList(void) { ProgramList::const_iterator it = m_itemList.begin(); for (; it != m_itemList.end(); ++it) { MythUIButtonListItem *item = new MythUIButtonListItem( m_progList, "", qVariantFromValue(*it)); InfoMap infoMap; (**it).ToMap(infoMap); QString state = toUIState((**it).GetRecordingStatus()); if ((state == "warning") && (plPreviouslyRecorded == m_type)) state = "disabled"; item->SetTextFromMap(infoMap, state); if (m_type == plTitle) { QString tempSubTitle = (**it).GetSubtitle(); if (tempSubTitle.trimmed().isEmpty()) tempSubTitle = (**it).GetTitle(); item->SetText(tempSubTitle, "titlesubtitle", state); } item->DisplayState( QString::number((**it).GetStars(10)), "ratingstate"); item->DisplayState(state, "status"); } if (m_positionText) { m_positionText->SetText( tr("%1 of %2", "Current position in list where %1 is the " "position, %2 is the total count") .arg(m_progList->GetCurrentPos()) .arg(m_progList->GetCount())); } }
void ProgramRecPriority::remove(void) { MythUIButtonListItem *item = m_programList->GetItemCurrent(); if (!item) return; ProgramRecPriorityInfo *pgRecInfo = item->GetData().value<ProgramRecPriorityInfo*>(); if (!pgRecInfo || (pgRecInfo->recType == kTemplateRecord && pgRecInfo->GetCategory() .compare("Default", Qt::CaseInsensitive) == 0)) { return; } RecordingRule *record = new RecordingRule(); record->m_recordID = pgRecInfo->GetRecordingRuleID(); if (!record->Load()) { delete record; return; } QString message = tr("Delete '%1' %2 rule?").arg(record->m_title) .arg(toString(pgRecInfo->GetRecordingRuleType())); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythConfirmationDialog *okPopup = new MythConfirmationDialog(popupStack, message, true); okPopup->SetReturnEvent(this, "deleterule"); okPopup->SetData(qVariantFromValue(record)); if (okPopup->Create()) popupStack->AddScreen(okPopup); else delete okPopup; }
/** * \brief Get the currently selected key string * * If no key is selected, an empty string is returned. * * \return The currently selected key string */ QString MythControls::GetCurrentKey(void) { MythUIButtonListItem* currentButton; if (m_leftListType == kKeyList && (currentButton = m_leftList->GetItemCurrent())) { return currentButton->GetText(); } if (GetFocusWidget() == m_leftList) return QString(); if ((m_leftListType == kContextList) && (m_rightListType == kActionList)) { QString context = GetCurrentContext(); QString action = GetCurrentAction(); uint b = GetCurrentButton(); QStringList keys = m_bindings->GetActionKeys(context, action); if (b < (uint)keys.count()) return keys[b]; return QString(); } currentButton = m_rightList->GetItemCurrent(); QString desc; if (currentButton) desc = currentButton->GetText(); int loc = desc.indexOf(" => "); if (loc == -1) return QString(); // Should not happen if (m_rightListType == kKeyList) return desc.left(loc); return desc.mid(loc + 4); }
void ImportFile::recordFile(void) { MythUIButtonListItem *item = m_recordingButtonList->GetItemCurrent(); if (!item) return; ImportItem *i = item->GetData().value<ImportItem *>(); if (!i) return; if (!doPlayFile(i, false)) return; QString message = tr("Getting List Of Recording.\nPlease Wait..."); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(message, popupStack, "recordingbusydialog"); if (busyPopup->Create()) popupStack->AddScreen(busyPopup, false); else { delete busyPopup; busyPopup = NULL; } GetImportRecordingThread *thread = new GetImportRecordingThread(this); while (thread->isRunning()) { qApp->processEvents(); usleep(2000); } if (busyPopup) busyPopup->Close(); }
void ImportFile::updateRecordingList(void) { if (m_recordingList.empty()) return; m_recordingButtonList->Reset(); if (m_categorySelector) { ImportItem *i; for (int x = 0; x < m_recordingList.count(); x++) { i = m_recordingList.at(x); if (i->category == m_categorySelector->GetValue() || m_categorySelector->GetValue() == tr("All Recordings")) { MythUIButtonListItem* item = new MythUIButtonListItem( m_recordingButtonList, i->title + " ~ " + MythDate::toString(i->startTime, MythDate::kDateTimeFull + MythDate::kAutoYear)); item->setCheckable(true); if (m_selectedList.indexOf((ImportItem *) i) != -1) { item->setChecked(MythUIButtonListItem::FullChecked); } else { item->setChecked(MythUIButtonListItem::NotChecked); } item->SetData(qVariantFromValue(i)); } qApp->processEvents(); } } m_recordingButtonList->SetItemCurrent(m_recordingButtonList->GetItemFirst()); titleChanged(m_recordingButtonList->GetItemCurrent()); }
void SearchStream::updateStreams(void) { m_streamList->Reset(); QString station = m_stationList->GetValue(); QString genre = m_genreList->GetValue(); QString channel = m_channelEdit->GetText(); bool searchStation = (station != tr("<All Stations>")); bool searchGenre = (genre != tr("<All Genres>")); bool searchChannel = !channel.isEmpty(); QMap<QString, Metadata>::iterator it; for (it = m_streams.begin(); it != m_streams.end(); ++it) { Metadata *mdata = &(*it); if (searchStation && station != mdata->Station()) continue; if (searchGenre && !mdata->Genre().contains(genre, Qt::CaseInsensitive)) continue; if (searchChannel && !mdata->Channel().contains(channel, Qt::CaseInsensitive)) continue; // if we got here we must have a match so add it to the list MythUIButtonListItem *item = new MythUIButtonListItem(m_streamList, "", qVariantFromValue(mdata)); MetadataMap metadataMap; mdata->toMap(metadataMap); item->SetTextFromMap(metadataMap); item->SetText(" ", "dummy"); } m_matchesText->SetText(QString("%1").arg(m_streamList->GetCount())); }
MythUIButtonListItem* StatusBox::AddLogLine(const QString & line, const QString & help, const QString & detail, const QString & helpdetail, const QString & state, const QString & data) { LogLine logline; logline.line = line; if (detail.isEmpty()) logline.detail = line; else logline.detail = detail; if (help.isEmpty()) logline.help = logline.detail; else logline.help = help; if (helpdetail.isEmpty()) logline.helpdetail = logline.detail; else logline.helpdetail = helpdetail; logline.state = state; logline.data = data; MythUIButtonListItem *item = new MythUIButtonListItem(m_logList, line, qVariantFromValue(logline)); if (logline.state.isEmpty()) logline.state = "normal"; item->SetFontState(logline.state); item->DisplayState(logline.state, "status"); item->SetText(logline.detail, "detail"); return item; }
void ChannelEditor::del() { MythUIButtonListItem *item = m_channelList->GetItemCurrent(); if (!item) return; QString message = tr("Delete channel '%1'?").arg(item->GetText("name")); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythConfirmationDialog *dialog = new MythConfirmationDialog(popupStack, message, true); if (dialog->Create()) { dialog->SetData(qVariantFromValue(item)); dialog->SetReturnEvent(this, "delsingle"); popupStack->AddScreen(dialog); } else delete dialog; }
/** \fn RawSettingsEditor::Init(void) * \brief Initialize the settings screen with the loaded data */ void RawSettingsEditor::Init(void) { QList<QString>settingsList = m_settings.keys(); QList<QString>::iterator it = settingsList.begin(); while (it != settingsList.end()) { MythUIButtonListItem *item = new MythUIButtonListItem(m_settingsList, "", qVariantFromValue(*it)); if (m_settings[*it].isEmpty()) item->SetText(*it); else item->SetText(m_settings[*it]); ++it; } m_settingsList->SetItemCurrent(0); m_textLabel->SetText(m_settingsList->GetItemFirst()->GetText()); updatePrevNextTexts(); }
void ImportFile::editFileMetadata(void) { MythUIButtonListItem *item = m_recordingButtonList->GetItemCurrent(); if (!item) return; ImportItem *i = item->GetData().value<ImportItem *>(); if (!i) return; MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); ImportEditMetadataDialog *editor = new ImportEditMetadataDialog(mainStack, i); connect(editor, SIGNAL(haveResult(bool, ImportItem *)), this, SLOT(editorClosed(bool, ImportItem *))); if (editor->Create()) mainStack->AddScreen(editor); }
void ChannelEditor::menu() { MythUIButtonListItem *item = m_channelList->GetItemCurrent(); if (!item) return; int chanid = item->GetData().toInt(); if (chanid == 0) edit(item); else { QString label = tr("Channel Options"); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menu = new MythDialogBox(label, popupStack, "chanoptmenu"); if (menu->Create()) { menu->SetReturnEvent(this, "channelopts"); menu->AddButton(tr("Edit")); // if () // menu->AddButton(tr("Set Hidden")); // else // menu->AddButton(tr("Set Visible")); menu->AddButton(tr("Delete")); popupStack->AddScreen(menu); } else { delete menu; return; } } }
/** \fn GalleryView::UpdateImageList() * \brief Updates the visible items * \return void */ void GalleryView::UpdateImageList() { m_imageList->Reset(); // get all children from the the selected node MythGenericTree *selectedNode = m_galleryViewHelper->m_currentNode->getSelectedChild(); QList<MythGenericTree *> *childs = m_galleryViewHelper->m_currentNode->getAllChildren(); // go through the entire list and update QList<MythGenericTree *>::const_iterator it; for (it = childs->begin(); it != childs->end(); ++it) { if (*it != NULL) { MythUIButtonListItem *item = new MythUIButtonListItem( m_imageList, QString(), 0, true, MythUIButtonListItem::NotChecked); item->SetData(qVariantFromValue(*it)); // assign and display all information about // the current item, like title and subdirectory count UpdateImageItem(item); // set the currently active node as selected in the image list if (*it == selectedNode) m_imageList->SetItemCurrent(item); } } // when the UpdateImageItem method is called the current node will also // be set to the current image item. After updating all items in the // image list we need to set the current node back to the on it was before m_galleryViewHelper->m_currentNode->setSelectedChild(selectedNode); // Updates all other widgets on the screen that show // information about the selected MythUIButtonListItem UpdateText(m_imageList->GetItemCurrent()); }
/** \brief Create a new MythThemedButton based on the MythThemedMenuState * m_state and the type, text, alt-text and action provided in * the parameters. * * \param type type of button to be created * \param text text to appear on the button * \param alttext alternate text to appear when required * \param action actions to be associated with button */ void MythThemedMenu::addButton(const QString &type, const QString &text, const QString &alttext, const QStringList &action, const QString &description, const QString &password) { ThemedButton newbutton; newbutton.type = type; newbutton.action = action; newbutton.text = text; newbutton.description = description; newbutton.password = password; if (m_watermarkState) m_watermarkState->EnsureStateLoaded(type); MythUIButtonListItem *listbuttonitem = new MythUIButtonListItem(m_buttonList, text, qVariantFromValue(newbutton)); listbuttonitem->DisplayState(type, "icon"); listbuttonitem->SetText(description, "description"); }
/** * \brief Update the right list. */ void MythControls::UpdateRightList(void) { // get the selected item in the right list. MythUIButtonListItem *item = m_leftList->GetItemCurrent(); if (!item) return; QString rtstr = item->GetText(); switch(m_currentView) { case kActionsByContext: SetListContents(m_rightList, m_contexts[rtstr]); break; case kKeysByContext: SetListContents(m_rightList, m_bindings->GetContextKeys(rtstr)); break; case kContextsByKey: SetListContents(m_rightList, m_bindings->GetKeyContexts(rtstr)); break; } }
void ZMEvents::updateUIList() { if (!m_eventGrid) return; m_eventGrid->Reset(); for (uint i = 0; i < m_eventList->size(); i++) { Event *event = m_eventList->at(i); MythUIButtonListItem *item = new MythUIButtonListItem(m_eventGrid, "", NULL, true, MythUIButtonListItem::NotChecked); item->SetText(event->eventName); item->SetText(event->monitorName, "camera" ); item->SetText(event->startTime, "time"); item->SetText(event->length, "length"); } m_eventGrid->SetItemCurrent(m_eventGrid->GetItemFirst()); eventChanged(m_eventGrid->GetItemCurrent()); }
void NetSearch::fillGrabberButtonList() { QMutexLocker locker(&m_lock); m_siteList->Reset(); for (GrabberScript::scriptList::iterator i = m_grabberList.begin(); i != m_grabberList.end(); ++i) { MythUIButtonListItem *item = new MythUIButtonListItem(m_siteList, (*i)->GetTitle()); if (item) { item->SetText((*i)->GetTitle(), "title"); item->SetData((*i)->GetCommandline()); QString thumb = QString("%1mythnetvision/icons/%2").arg(GetShareDir()) .arg((*i)->GetImage()); item->SetImage(thumb); } else delete item; } }
void MythBurn::showMenu() { if (m_archiveList.size() == 0) return; MythUIButtonListItem *item = m_archiveButtonList->GetItemCurrent(); ArchiveItem *curItem = qVariantValue<ArchiveItem *>(item->GetData()); if (!curItem) return; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythDialogBox *menuPopup = new MythDialogBox(tr("Menu"), popupStack, "actionmenu"); if (menuPopup->Create()) popupStack->AddScreen(menuPopup); menuPopup->SetReturnEvent(this, "action"); if (curItem->hasCutlist) { if (curItem->useCutlist) menuPopup->AddButton(tr("Don't Use Cutlist"), SLOT(toggleUseCutlist())); else menuPopup->AddButton(tr("Use Cutlist"), SLOT(toggleUseCutlist())); } menuPopup->AddButton(tr("Remove Item"), SLOT(removeItem())); menuPopup->AddButton(tr("Edit Details"), SLOT(editDetails())); menuPopup->AddButton(tr("Change Encoding Profile"), SLOT(changeProfile())); menuPopup->AddButton(tr("Edit Thumbnails"), SLOT(editThumbnails())); menuPopup->AddButton(tr("Cancel"), NULL); }
void BookmarkManager::ReloadBookmarks(void) { GetSiteList(m_siteList); UpdateGroupList(); m_groupList->MoveToNamedPosition(m_savedBookmark.category); UpdateURLList(); // try to set the current item to name MythUIButtonListItem *item; for (int x = 0; x < m_bookmarkList->GetCount(); x++) { item = m_bookmarkList->GetItemAt(x); if (item && item->GetData().isValid()) { Bookmark *site = qVariantValue<Bookmark*>(item->GetData()); if (site && (*site == m_savedBookmark)) { m_bookmarkList->SetItemCurrent(item); break; } } } }
void MythNewsConfig::slotCategoryChanged(MythUIButtonListItem *item) { QMutexLocker locker(&m_lock); if (!item) return; m_siteList->Reset(); NewsCategory *cat = qVariantValue<NewsCategory*>(item->GetData()); if (!cat) return; NewsSiteItem::List::iterator it = cat->siteList.begin(); for (; it != cat->siteList.end(); ++it) { MythUIButtonListItem *newitem = new MythUIButtonListItem(m_siteList, (*it).name, 0, true, (*it).inDB ? MythUIButtonListItem::FullChecked : MythUIButtonListItem::NotChecked); newitem->SetData(qVariantFromValue(&(*it))); } }
void ThemeChooser::toggleFullscreenPreview(void) { if (m_fullPreviewStateType) { if (m_fullPreviewShowing) { if (m_fullScreenPreview) m_fullScreenPreview->Reset(); if (m_fullScreenName) m_fullScreenName->Reset(); m_fullPreviewStateType->Reset(); m_fullPreviewShowing = false; } else { MythUIButtonListItem *item = m_themes->GetItemCurrent(); ThemeInfo *info = qVariantValue<ThemeInfo*>(item->GetData()); if (info) { if (m_fullScreenPreview) { m_fullScreenPreview->SetFilename(info->GetPreviewPath()); m_fullScreenPreview->Load(); } if (m_fullScreenName) m_fullScreenName->SetText(info->GetName()); m_fullPreviewStateType->DisplayState("fullscreen"); m_fullPreviewShowing = true; } } } }
void ChannelRecPriority::updateList() { m_channelList->Reset(); QMap<QString, ChannelInfo*>::Iterator it; MythUIButtonListItem *item; for (it = m_sortedChannel.begin(); it != m_sortedChannel.end(); ++it) { ChannelInfo *chanInfo = *it; item = new MythUIButtonListItem(m_channelList, "", qVariantFromValue(chanInfo)); QString fontState = "default"; if (!m_visMap[chanInfo->chanid]) fontState = "disabled"; item->SetText(chanInfo->GetFormatted(ChannelInfo::kChannelLong), fontState); InfoMap infomap; chanInfo->ToMap(infomap); item->SetTextFromMap(infomap, fontState); if (m_visMap[chanInfo->chanid]) item->DisplayState("normal", "status"); else item->DisplayState("disabled", "status"); item->SetImage(chanInfo->iconpath, "icon"); item->SetImage(chanInfo->iconpath); item->SetText(chanInfo->recpriority, "priority", fontState); if (m_currentItem == chanInfo) m_channelList->SetItemCurrent(item); } MythUIText *norecordingText = dynamic_cast<MythUIText*> (GetChild("norecordings_info")); if (norecordingText) norecordingText->SetVisible(m_channelData.isEmpty()); }
void ChannelRecPriority::updateList() { m_channelList->Reset(); QMap<QString, ChannelInfo*>::Iterator it; for (it = m_sortedChannel.begin(); it != m_sortedChannel.end(); ++it) { ChannelInfo *chanInfo = *it; MythUIButtonListItem *item = new MythUIButtonListItem(m_channelList, "", qVariantFromValue(chanInfo)); QString fontState = "default"; item->SetText(chanInfo->GetFormatted(ChannelInfo::kChannelLong), fontState); InfoMap infomap; chanInfo->ToMap(infomap); item->SetTextFromMap(infomap, fontState); item->DisplayState("normal", "status"); if (!chanInfo->icon.isEmpty()) { QString iconUrl = gCoreContext->GetMasterHostPrefix("ChannelIcons", chanInfo->icon); item->SetImage(iconUrl, "icon"); item->SetImage(iconUrl); } item->SetText(QString::number(chanInfo->recpriority), "priority", fontState); if (m_currentItem == chanInfo) m_channelList->SetItemCurrent(item); } // this textarea name is depreciated use 'nochannels_warning' instead MythUIText *noChannelsText = dynamic_cast<MythUIText*>(GetChild("norecordings_info")); if (!noChannelsText) noChannelsText = dynamic_cast<MythUIText*>(GetChild("nochannels_warning")); if (noChannelsText) noChannelsText->SetVisible(m_channelData.isEmpty()); }
MythUIButtonListItem *MythGenericTree::CreateListButton(MythUIButtonList *list) { MythUIButtonListItem *item = new MythUIButtonListItem(list, GetText()); item->SetData(qVariantFromValue(this)); item->SetTextFromMap(m_strings); item->SetImageFromMap(m_imageFilenames); item->SetStatesFromMap(m_states); if (visibleChildCount() > 0) item->setDrawArrow(true); return item; }
void ViewScheduleDiff::updateUIList(void) { for (uint i = 0; i < m_recList.size(); i++) { class ProgramStruct s = m_recList[i]; class ProgramInfo *pginfo = s.after; if (!pginfo) pginfo = s.before; MythUIButtonListItem *item = new MythUIButtonListItem( m_conflictList, "", qVariantFromValue(pginfo)); InfoMap infoMap; pginfo->ToMap(infoMap); QString state = toUIState(pginfo->GetRecordingStatus()); item->DisplayState(state, "status"); item->SetTextFromMap(infoMap, state); if (s.before) item->SetText(toString(s.before->GetRecordingStatus(), s.before->GetCardID()), "statusbefore", state); else item->SetText("-", "statusbefore"); if (s.after) item->SetText(toString(s.after->GetRecordingStatus(), s.after->GetCardID()), "statusafter", state); else item->SetText("-", "statusafter"); } if (m_noChangesText) { if (m_recList.empty()) m_noChangesText->Show(); else m_noChangesText->Hide(); } }
void RSSEditor::fillRSSButtonList() { QMutexLocker locker(&m_lock); m_sites->Reset(); for (RSSSite::rssList::iterator i = m_siteList.begin(); i != m_siteList.end(); ++i) { MythUIButtonListItem *item = new MythUIButtonListItem(m_sites, (*i)->GetTitle()); item->SetText((*i)->GetTitle(), "title"); item->SetText((*i)->GetDescription(), "description"); item->SetText((*i)->GetURL(), "url"); item->SetText((*i)->GetAuthor(), "author"); item->SetData(qVariantFromValue(*i)); item->SetImage((*i)->GetImage()); } }
void ProgramRecPriority::changeRecPriority(int howMuch) { MythUIButtonListItem *item = m_programList->GetItemCurrent(); if (!item) return; ProgramRecPriorityInfo *pgRecInfo = item->GetData().value<ProgramRecPriorityInfo*>(); if (!pgRecInfo) return; int tempRecPriority; // inc/dec recording priority tempRecPriority = pgRecInfo->GetRecordingPriority() + howMuch; if (tempRecPriority > -100 && tempRecPriority < 100) { pgRecInfo->recpriority = tempRecPriority; // order may change if sorting by recording priority, so resort if (m_sortType == byRecPriority) SortList(); else { // No need to re-fill the entire list, just update this entry int progRecPriority = pgRecInfo->GetRecordingPriority(); item->SetText(QString::number(progRecPriority), "progpriority"); item->SetText(QString::number(progRecPriority), "recpriority"); if (m_recPriorityText) m_recPriorityText->SetText(QString::number(progRecPriority)); item->SetText(QString::number(progRecPriority), "recpriorityB"); if (m_recPriorityBText) m_recPriorityBText->SetText(QString::number(progRecPriority)); item->SetText(QString::number(progRecPriority), "finalpriority"); if (m_finalPriorityText) m_finalPriorityText->SetText(QString::number(progRecPriority)); } } }