| 827 | QMap<AudioProps, QString> audioFlags; |
| 828 | audioFlags[AUD_DOLBY] = "dolby"; |
| 829 | audioFlags[AUD_SURROUND] = "surround"; |
| 830 | audioFlags[AUD_STEREO] = "stereo"; |
| 831 | audioFlags[AUD_MONO] = "mono"; |
| 832 | |
| 833 | QMap<VideoProps, QString> videoFlags; |
| 834 | videoFlags[VID_1080] = "hd1080"; |
| 835 | videoFlags[VID_720] = "hd720"; |
| 836 | videoFlags[VID_HDTV] = "hdtv"; |
| 837 | videoFlags[VID_WIDESCREEN] = "widescreen"; |
| 838 | |
| 839 | QMap<SubtitleTypes, QString> subtitleFlags; |
| 840 | subtitleFlags[SUB_SIGNED] = "deafsigned"; |
| 841 | subtitleFlags[SUB_ONSCREEN] = "onscreensub"; |
| 842 | subtitleFlags[SUB_NORMAL] = "subtitles"; |
| 843 | subtitleFlags[SUB_HARDHEAR] = "cc"; |
| 844 | |
| 845 | QMap<AudioProps, QString>::iterator ait; |
| 846 | for (ait = audioFlags.begin(); ait != audioFlags.end(); ++ait) |
| 847 | { |
| 848 | if (pginfo->GetAudioProperties() & ait.key()) |
| 849 | item->DisplayState(ait.value(), "audioprops"); |
| 850 | } |
| 851 | |
| 852 | QMap<VideoProps, QString>::iterator vit; |
| 853 | for (vit = videoFlags.begin(); vit != videoFlags.end(); ++vit) |
| 854 | { |
| 855 | if (pginfo->GetVideoProperties() & vit.key()) |
| 856 | item->DisplayState(vit.value(), "videoprops"); |
| 857 | } |
| 858 | |
| 859 | QMap<SubtitleTypes, QString>::iterator sit; |
| 860 | for (sit = subtitleFlags.begin(); sit != subtitleFlags.end(); ++sit) |
| 861 | { |
| 862 | if (pginfo->GetSubtitleType() & sit.key()) |
| 863 | item->DisplayState(sit.value(), "subtitletypes"); |
| 864 | } |
| 865 | |
| 866 | item->DisplayState(pginfo->GetCategoryType(), "categorytype"); |
| 867 | |
1319 | | QMap<AudioProps, QString> audioFlags; |
1320 | | audioFlags[AUD_DOLBY] = "dolby"; |
1321 | | audioFlags[AUD_SURROUND] = "surround"; |
1322 | | audioFlags[AUD_STEREO] = "stereo"; |
1323 | | audioFlags[AUD_MONO] = "mono"; |
1324 | | |
1325 | | QMap<VideoProps, QString> videoFlags; |
1326 | | videoFlags[VID_1080] = "hd1080"; |
1327 | | videoFlags[VID_720] = "hd720"; |
1328 | | videoFlags[VID_HDTV] = "hdtv"; |
1329 | | videoFlags[VID_WIDESCREEN] = "widescreen"; |
1330 | | |
1331 | | QMap<SubtitleTypes, QString> subtitleFlags; |
1332 | | subtitleFlags[SUB_SIGNED] = "deafsigned"; |
1333 | | subtitleFlags[SUB_ONSCREEN] = "onscreensub"; |
1334 | | subtitleFlags[SUB_NORMAL] = "subtitles"; |
1335 | | subtitleFlags[SUB_HARDHEAR] = "cc"; |
1336 | | |
1346 | | |
1347 | | QString state = extract_main_state(**it, m_player); |
1348 | | |
1349 | | item->SetFontState(state); |
1350 | | |
1351 | | InfoMap infoMap; |
1352 | | (*it)->ToMap(infoMap); |
1353 | | item->SetTextFromMap(infoMap); |
1354 | | |
1355 | | QString tempSubTitle = extract_subtitle(**it, groupname); |
1356 | | |
1357 | | if (groupname == (*it)->GetTitle().toLower()) |
1358 | | item->SetText(tempSubTitle, "titlesubtitle"); |
1359 | | |
1360 | | item->DisplayState(state, "status"); |
1361 | | |
1362 | | item->DisplayState(QString::number((*it)->GetStars(10)), "ratingstate"); |
1363 | | |
1364 | | SetItemIcons(item, (*it)); |
1365 | | |
1366 | | QMap<AudioProps, QString>::iterator ait; |
1367 | | for (ait = audioFlags.begin(); ait != audioFlags.end(); ++ait) |
1368 | | { |
1369 | | if ((*it)->GetAudioProperties() & ait.key()) |
1370 | | item->DisplayState(ait.value(), "audioprops"); |
1371 | | } |
1372 | | |
1373 | | QMap<VideoProps, QString>::iterator vit; |
1374 | | for (vit = videoFlags.begin(); vit != videoFlags.end(); ++vit) |
1375 | | { |
1376 | | if ((*it)->GetVideoProperties() & vit.key()) |
1377 | | item->DisplayState(vit.value(), "videoprops"); |
1378 | | } |
1379 | | |
1380 | | QMap<SubtitleTypes, QString>::iterator sit; |
1381 | | for (sit = subtitleFlags.begin(); sit != subtitleFlags.end(); ++sit) |
1382 | | { |
1383 | | if ((*it)->GetSubtitleType() & sit.key()) |
1384 | | item->DisplayState(sit.value(), "subtitletypes"); |
1385 | | } |
1386 | | |
1387 | | item->DisplayState((*it)->GetCategoryType(), "categorytype"); |
| 1370 | // Defer initialization of the item's properties until it |
| 1371 | // first becomes visible. |