1 /*****************************************************************************
2 * Epg.cpp : Epg Viewer dialog
3 ****************************************************************************
4 * Copyright © 2010 VideoLAN and AUTHORS
6 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
27 #include "dialogs/epg.hpp"
29 #include "components/epg/EPGWidget.hpp"
31 #include <QHBoxLayout>
36 EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
38 setWindowTitle( "Program Guide" );
40 QHBoxLayout *layout = new QHBoxLayout( this );
41 QSplitter *splitter = new QSplitter( this );
42 EPGWidget *epg = new EPGWidget( this );
43 splitter->addWidget( epg );
44 splitter->setOrientation(Qt::Vertical);
46 QGroupBox *descBox = new QGroupBox( qtr( "Description" ), this );
48 QHBoxLayout *boxLayout = new QHBoxLayout( descBox );
50 description = new QLabel( this );
51 description->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
52 description->setAutoFillBackground( true );
55 palette.setBrush(QPalette::Active, QPalette::Window, palette.brush( QPalette::Base ) );
56 description->setPalette( palette );
58 boxLayout->addWidget( description );
60 splitter->addWidget( epg );
61 splitter->addWidget( descBox );
62 layout->addWidget( splitter );
64 CONNECT( epg, descriptionChanged( const QString & ), description, setText( const QString & ) );
67 EpgDialog::~EpgDialog()