Commit ec1859e9 authored by Adrien Maglo's avatar Adrien Maglo

Qt/EPG: Try to display intelligently the short and long event description with...

Qt/EPG: Try to display intelligently the short and long event description with the dedicated widgets.

It depends of the channels. Some use only the short one, others only the long one and others both.
parent 989ec97a
...@@ -94,14 +94,22 @@ void EpgDialog::showEvent( EPGEvent *event ) ...@@ -94,14 +94,22 @@ void EpgDialog::showEvent( EPGEvent *event )
{ {
if( !event ) return; if( !event ) return;
QString titleDescription, textDescription;
if( event->description.isEmpty() )
textDescription = event->shortDescription;
else
{
textDescription = event->description;
if( !event->shortDescription.isEmpty() )
titleDescription = " - " + event->shortDescription;
}
QDateTime end = event->start.addSecs( event->duration ); QDateTime end = event->start.addSecs( event->duration );
title->setText( event->start.toString( "hh:mm" ) + " - " title->setText( event->start.toString( "hh:mm" ) + " - "
+ end.toString( "hh:mm" ) + " : " + end.toString( "hh:mm" ) + " : "
+ event->name + event->name + titleDescription );
+ ( event->shortDescription.isEmpty()
? "" : " - " + event->shortDescription ) );
description->setText( event->description ); description->setText( textDescription );
} }
void EpgDialog::updateInfos() void EpgDialog::updateInfos()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment