@ -484,7 +484,7 @@ void DvbPanel::searchChannel( const TQString &text )
channelsCb - > visibleItems = 0 ;
while ( it . current ( ) ) {
if ( text . isEmpty ( ) | | it . current ( ) - > text ( c ) . tq contains( text , false ) ) {
if ( text . isEmpty ( ) | | it . current ( ) - > text ( c ) . contains( text , false ) ) {
it . current ( ) - > setVisible ( true ) ;
+ + channelsCb - > visibleItems ;
}
@ -1406,9 +1406,9 @@ void DvbPanel::setRecord()
s = desc - > title ;
if ( s . isEmpty ( ) ) {
if ( ! dvbConfig - > filenameFormat . tq contains( " %chan " ) )
if ( ! dvbConfig - > filenameFormat . contains( " %chan " ) )
s = curchan . name ;
if ( ! dvbConfig - > filenameFormat . tq contains( " %date " ) )
if ( ! dvbConfig - > filenameFormat . contains( " %date " ) )
s + = " _ " + TQDateTime : : tqcurrentDateTime ( ) . toString ( " yyyyMMdd-hhmmss " ) ;
}
@ -1643,7 +1643,7 @@ void DvbPanel::newTimer( TQString channel, TQString name, TQDateTime begin, TQTi
RecTimer * t ;
RecTimer * rt = new RecTimer ( ) ;
rt - > name = name . tq replace( " / " , " _ " ) . tq replace( " > " , " _ " ) . tq replace( " < " , " _ " ) . tq replace( " : " , " _ " ) . tq replace( ' " ' , " _ " ) . tq replace( " \\ " , " _ " ) . tq replace( " | " , " _ " ) ;
rt - > name = name . replace( " / " , " _ " ) . replace( " > " , " _ " ) . replace( " < " , " _ " ) . replace( " : " , " _ " ) . replace( ' " ' , " _ " ) . replace( " \\ " , " _ " ) . replace( " | " , " _ " ) ;
rt - > channel = channel ;
rt - > begin = begin . addSecs ( - ( dvbConfig - > beginMargin * 60 ) ) ;
rt - > duration = duration . addSecs ( ( dvbConfig - > beginMargin + dvbConfig - > endMargin ) * 60 ) ;
@ -1901,7 +1901,7 @@ void DvbPanel::next()
TQListViewItem * nextItem ;
TQListViewItem * playingItem = channelsCb - > tq findItem( TQString ( ) . sprintf ( " %05d " , dvbConfig - > lastChannel ) , 0 ) ;
TQListViewItem * playingItem = channelsCb - > findItem( TQString ( ) . sprintf ( " %05d " , dvbConfig - > lastChannel ) , 0 ) ;
if ( ! playingItem = = 0 ) // yes, it's in the current category
{
@ -1927,7 +1927,7 @@ void DvbPanel::previous()
TQListViewItem * prevItem ;
TQListViewItem * playingItem = channelsCb - > tq findItem( TQString ( ) . sprintf ( " %05d " , dvbConfig - > lastChannel ) , 0 ) ;
TQListViewItem * playingItem = channelsCb - > findItem( TQString ( ) . sprintf ( " %05d " , dvbConfig - > lastChannel ) , 0 ) ;
if ( ! playingItem = = 0 ) // yes, it's in the current category
{
@ -2149,12 +2149,12 @@ bool DvbPanel::getChannelList()
while ( ! tt . eof ( ) ) {
s = tt . readLine ( ) ;
if ( s . startsWith ( " # " ) ) {
if ( s . tq contains( " KaxTV " ) )
if ( s . contains( " KaxTV " ) )
break ;
continue ;
}
chan = new ChannelDesc ( ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
if ( c = = " TV " | | c = = " TVC " )
chan - > type = 1 ;
@ -2163,13 +2163,13 @@ bool DvbPanel::getChannelList()
if ( c = = " TVC " | | c = = " RAC " )
chan - > fta = 1 ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > name = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
tpos = c . tq find( " ( " ) ;
tpos = c . find( " ( " ) ;
if ( tpos > 0 )
chan - > vpid = c . left ( tpos ) . toUShort ( ) ;
else
@ -2183,17 +2183,17 @@ bool DvbPanel::getChannelList()
chan - > vType = 2 ;
if ( ! chan - > vpid )
chan - > vType = 0 ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
while ( ( pos = c . tq find( " , " ) ) ! = - 1 ) {
while ( ( pos = c . find( " , " ) ) ! = - 1 ) {
t = c . left ( pos ) ;
chan - > napid + + ;
if ( t . tq contains( " (ac3) " ) ) {
if ( t . contains( " (ac3) " ) ) {
chan - > apid [ chan - > napid - 1 ] . ac3 = 1 ;
t . remove ( " (ac3) " ) ;
}
if ( ( tpos = t . tq find( " ( " ) ) ! = - 1 ) {
if ( ( tpos = t . find( " ( " ) ) ! = - 1 ) {
t . remove ( " ) " ) ;
chan - > apid [ chan - > napid - 1 ] . lang = t . right ( t . length ( ) - tpos - 1 ) ;
t = t . left ( tpos ) ;
@ -2201,16 +2201,16 @@ bool DvbPanel::getChannelList()
chan - > apid [ chan - > napid - 1 ] . pid = t . toUShort ( ) ;
c = c . right ( c . length ( ) - pos - 1 ) ;
}
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > ttpid = s . left ( pos ) . toUShort ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > sid = s . left ( pos ) . toUShort ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > tp . tsid = s . left ( pos ) . toUShort ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
if ( c . startsWith ( " T " ) ) {
chan - > tp . type = FE_OFDM ;
@ -2230,17 +2230,17 @@ bool DvbPanel::getChannelList()
chan - > tp . source = " Atsc " ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > tp . freq = s . left ( pos ) . toULong ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > tp . sr = s . left ( pos ) . toULong ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
chan - > tp . pol = c [ 0 ] . latin1 ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 0 : chan - > tp . coderateH = FEC_NONE ; break ;
case 12 : chan - > tp . coderateH = FEC_1_2 ; break ;
@ -2256,14 +2256,14 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . coderateH = FEC_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 0 : chan - > tp . inversion = INVERSION_OFF ; break ;
case 1 : chan - > tp . inversion = INVERSION_ON ; break ;
case - 1 : chan - > tp . inversion = INVERSION_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 8 : chan - > tp . modulation = QPSK ; break ;
case 16 : chan - > tp . modulation = QAM_16 ; break ;
@ -2279,7 +2279,7 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . modulation = QAM_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 0 : chan - > tp . coderateL = FEC_NONE ; break ;
case 12 : chan - > tp . coderateL = FEC_1_2 ; break ;
@ -2295,7 +2295,7 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . coderateL = FEC_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 8 : chan - > tp . bandwidth = BANDWIDTH_8_MHZ ; break ;
case 7 : chan - > tp . bandwidth = BANDWIDTH_7_MHZ ; break ;
@ -2303,14 +2303,14 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . bandwidth = BANDWIDTH_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 2 : chan - > tp . transmission = TRANSMISSION_MODE_2K ; break ;
case 8 : chan - > tp . transmission = TRANSMISSION_MODE_8K ; break ;
case - 1 : chan - > tp . transmission = TRANSMISSION_MODE_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 32 : chan - > tp . guard = GUARD_INTERVAL_1_32 ; break ;
case 16 : chan - > tp . guard = GUARD_INTERVAL_1_16 ; break ;
@ -2319,7 +2319,7 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . guard = GUARD_INTERVAL_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 0 : chan - > tp . hierarchy = HIERARCHY_NONE ; break ;
case 1 : chan - > tp . hierarchy = HIERARCHY_1 ; break ;
@ -2328,39 +2328,39 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . hierarchy = HIERARCHY_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > num = s . left ( pos ) . toUInt ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
c = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
while ( ( pos = c . tq find( " , " ) ) ! = - 1 ) {
while ( ( pos = c . find( " , " ) ) ! = - 1 ) {
t = c . left ( pos ) ;
tpos = t . tq find( " ( " ) ;
tpos = t . find( " ( " ) ;
ns = ( int ) chan - > nsubpid ;
chan - > subpid [ ns ] . pid = t . left ( tpos ) . toUShort ( ) ;
t = t . right ( t . length ( ) - tpos - 1 ) ;
tpos = t . tq find( " ) " ) ;
tpos = t . find( " ) " ) ;
chan - > subpid [ ns ] . type = t . left ( tpos ) . toUShort ( ) ;
t = t . right ( t . length ( ) - tpos - 2 ) ;
tpos = t . tq find( " ) " ) ;
tpos = t . find( " ) " ) ;
chan - > subpid [ ns ] . page = t . left ( tpos ) . toUShort ( ) ;
t = t . right ( t . length ( ) - tpos - 2 ) ;
tpos = t . tq find( " ) " ) ;
tpos = t . find( " ) " ) ;
chan - > subpid [ ns ] . id = t . left ( tpos ) . toUShort ( ) ;
t = t . right ( t . length ( ) - tpos - 2 ) ;
tpos = t . tq find( " ) " ) ;
tpos = t . find( " ) " ) ;
chan - > subpid [ ns ] . lang = t . left ( tpos ) ;
c = c . right ( c . length ( ) - pos - 1 ) ;
chan - > nsubpid + + ;
}
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > category = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > tp . nid = s . left ( pos ) . toUShort ( ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
switch ( s . left ( pos ) . toInt ( ) ) {
case 20 : chan - > tp . rolloff = ROLLOFF_20 ; break ;
case 25 : chan - > tp . rolloff = ROLLOFF_25 ; break ;
@ -2368,7 +2368,7 @@ bool DvbPanel::getChannelList()
case - 1 : chan - > tp . rolloff = ROLLOFF_AUTO ;
}
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
chan - > tp . S2 = s . left ( pos ) . toInt ( ) ;
if ( chan - > tp . source . isEmpty ( ) ) {
@ -2587,23 +2587,23 @@ bool DvbPanel::getTimerList()
if ( s . startsWith ( " # " ) )
continue ;
t = new RecTimer ( ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
t - > name = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
t - > channel = s . left ( pos ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
t - > begin = TQDateTime : : fromString ( s . left ( pos ) , Qt : : ISODate ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
t - > duration = TQTime : : fromString ( s . left ( pos ) ) ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
//t->filetype = s.left( pos ).toInt();
t - > mode = 0 ;
s = s . right ( s . length ( ) - pos - 1 ) ;
pos = s . tq find( " | " ) ;
pos = s . find( " | " ) ;
t - > mode = s . left ( pos ) . toInt ( ) ;
t - > running = 0 ;
timers . append ( t ) ;