m_rulerWidget = new EPGRuler( this );
m_channelsWidget = new ChannelsWidget( this );
m_epgView = new EPGView( this );
- m_description = new QLabel( "<b>Hello world</b><br/>blablabla" );
m_channelsWidget->setMinimumWidth( 40 );
- m_description->setAlignment( Qt::AlignTop | Qt::AlignLeft );
- m_description->setMinimumHeight( 70 );
m_epgView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
setZoom( 1 );
layout->addWidget( m_rulerWidget, 0, 1 );
layout->addWidget( m_channelsWidget, 1, 0 );
layout->addWidget( m_epgView, 1, 1 );
- layout->addWidget( m_description, 2, 1 );
layout->setSpacing( 0 );
setLayout( layout );
#include <QMultiMap>
class QDateTime;
-class QLabel;
class ChannelsWidget : public QWidget
{
ChannelsWidget* m_channelsWidget;
EPGRuler* m_rulerWidget;
EPGView* m_epgView;
- QLabel* m_description;
QMultiMap<QString, EPGEvent*> m_events;
+
+signals:
+ void descriptionChanged( const QString& );
};
#endif // EPGWIDGET_H
#include "components/epg/EPGWidget.hpp"
#include <QHBoxLayout>
+#include <QSplitter>
+#include <QLabel>
+#include <QGroupBox>
EpgDialog::EpgDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{
- setTitle( "Program Guide" );
+ setWindowTitle( "Program Guide" );
QHBoxLayout *layout = new QHBoxLayout( this );
+ QSplitter *splitter = new QSplitter( this );
EPGWidget *epg = new EPGWidget( this );
+ splitter->addWidget( epg );
+ splitter->setOrientation(Qt::Vertical);
- layout->addWidget( epg );
+ QGroupBox *descBox = new QGroupBox( qtr( "Description" ), this );
+
+ QHBoxLayout *boxLayout = new QHBoxLayout( descBox );
+
+ description = new QLabel( this );
+ description->setFrameStyle( QFrame::Sunken | QFrame::StyledPanel );
+ description->setAutoFillBackground( true );
+
+ QPalette palette;
+ palette.setBrush(QPalette::Active, QPalette::Window, palette.brush( QPalette::Base ) );
+ description->setPalette( palette );
+
+ boxLayout->addWidget( description );
+
+ splitter->addWidget( epg );
+ splitter->addWidget( descBox );
+ layout->addWidget( splitter );
+
+ CONNECT( epg, descriptionChanged( const QString & ), description, setText( const QString & ) );
}
EpgDialog::~EpgDialog()
#include "util/singleton.hpp"
-
+class QLabel;
class EpgDialog : public QVLCFrame, public Singleton<EpgDialog>
{
Q_OBJECT;
EpgDialog( intf_thread_t * );
virtual ~EpgDialog();
+ QLabel *description;
+
friend class Singleton<EpgDialog>;
};
"Ctrl+W" );
#endif
+ addDPStaticEntry( menu, qtr( "Program Guide" ), "", SLOT( epgDialog() ),
+ "" );
+
addDPStaticEntry( menu, qtr( I_MENU_MSG ),
":/menu/messages", SLOT( messagesDialog() ),
"Ctrl+M" );