src/gui/eventlist.cpp -add fsk filter to epg-search

Origin commit data
------------------
Branch: ni/coolstream
Commit: 81049d89cd
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2015-07-01 (Wed, 01 Jul 2015)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2015-07-01 21:39:20 +02:00
parent 09ed0e1b15
commit 2eee2dfdf9
8 changed files with 76 additions and 11 deletions

View File

@@ -103,6 +103,7 @@ CEventList::CEventList()
m_search_channel_id = 1;
m_search_bouquet_id= 1;
m_search_genre = 1;
m_search_fsk = 1;
full_width = width = 0;
height = 0;
@@ -1044,7 +1045,8 @@ bool CEventList::findEvents(void)
&m_search_list,
&m_search_channel_id,
&m_search_bouquet_id,
&m_search_genre
&m_search_genre,
&m_search_fsk
);
hide();
menu.exec(NULL,"");
@@ -1057,7 +1059,7 @@ bool CEventList::findEvents(void)
evtlist.clear();
if(m_search_list == SEARCH_LIST_CHANNEL)
{
CEitManager::getInstance()->getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre);
CEitManager::getInstance()->getEventsServiceKey(m_search_channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre,m_search_fsk);
}
else if(m_search_list == SEARCH_LIST_BOUQUET)
{
@@ -1065,7 +1067,7 @@ bool CEventList::findEvents(void)
for(int channel = 0; channel < channel_nr; channel++)
{
channel_id = bouquetList->Bouquets[m_search_bouquet_id]->channelList->getChannelFromIndex(channel)->getChannelID();
CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre);
CEitManager::getInstance()->getEventsServiceKey(channel_id, evtlist, m_search_epg_item,m_search_keyword,false, m_search_genre,m_search_fsk);
}
}
else if(m_search_list == SEARCH_LIST_ALL)
@@ -1085,7 +1087,7 @@ bool CEventList::findEvents(void)
for (it = v.begin(); it != v.end(); ++it){
ch_id_map[*it & 0xFFFFFFFFFFFFULL] = *it;
}
CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true,m_search_genre);//all_chann
CEitManager::getInstance()->getEventsServiceKey(0,evtlist, m_search_epg_item,m_search_keyword, true,m_search_genre,m_search_fsk);//all_chann
if(!evtlist.empty()){
std::map<t_channel_id, t_channel_id>::iterator map_it;
@@ -1200,7 +1202,18 @@ const CMenuOptionChooser::keyval GENRE_GROUP[GENRE_GROUP_COUNT] =
{ 0x97, LOCALE_GENRE_DOCUS_MAGAZINES },
{ 0xA7, LOCALE_GENRE_TRAVEL_HOBBIES }
};
const short FSK_COUNT = 8;
const CMenuOptionChooser::keyval FSK[FSK_COUNT] =
{
{ 0, LOCALE_FSK_ALL },
{ -7, LOCALE_FSK_TO_7 },
{ -12, LOCALE_FSK_TO_12 },
{ -16, LOCALE_FSK_TO_16 },
{ 7, LOCALE_FSK_FROM_7 },
{ 12, LOCALE_FSK_FROM_12 },
{ 16, LOCALE_FSK_FROM_16 },
{ 18, LOCALE_FSK_FROM_18 }
};
#define SEARCH_LIST_OPTION_COUNT 3
const CMenuOptionChooser::keyval SEARCH_LIST_OPTIONS[SEARCH_LIST_OPTION_COUNT] =
{
@@ -1231,7 +1244,8 @@ CEventFinderMenu::CEventFinderMenu( int* event,
int* search_list,
t_channel_id* search_channel_id,
t_bouquet_id* search_bouquet_id,
int* search_genre
int* search_genre,
int* search_fsk
)
/************************************************************************************************/
{
@@ -1242,6 +1256,7 @@ CEventFinderMenu::CEventFinderMenu( int* event,
m_search_channel_id = search_channel_id;
m_search_bouquet_id = search_bouquet_id;
m_search_genre = search_genre;
m_search_fsk = search_fsk;
width = 40;
selected = -1;
}
@@ -1376,6 +1391,7 @@ int CEventFinderMenu::showMenu(void)
CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "#1", CRCInput::RC_green);
CMenuOptionChooser* mgenre = new CMenuOptionChooser(LOCALE_EVENTFINDER_GENRE, m_search_genre, GENRE_GROUP, GENRE_GROUP_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++));
CMenuOptionChooser* mfsk = new CMenuOptionChooser(LOCALE_EVENTFINDER_FSK, m_search_fsk, FSK, FSK_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++));
CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES, 40);
@@ -1393,6 +1409,7 @@ int CEventFinderMenu::showMenu(void)
searchMenu.addItem(mo1);
searchMenu.addItem(GenericMenuSeparatorLine);
searchMenu.addItem(mgenre);
searchMenu.addItem(mfsk);
searchMenu.addItem(GenericMenuSeparatorLine);
searchMenu.addItem(mf2);
searchMenu.addItem(moc1);