--- infoscreen/MainView.cpp 2009/12/15 13:53:02 512 +++ infoscreen/MainView.cpp 2010/01/05 20:14:22 527 @@ -6,44 +6,66 @@ #include -#include //Phonon -#include //Phonon - #include "MyWebView.h" - +#include "clientsiderender.h" +#include "pictureview.h" +#include "videoview.h" MainView::MainView(QWidget* parent) : QWidget(parent) { + this->resize(400,400); this->setWindowState( Qt::WindowFullScreen ); + qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); - - //Phonon::VideoPlayer* video; - //video = new Phonon::VideoPlayer(Phonon::VideoCategory, this); - //video->load( Phonon::MediaSource("http://todic.dk/ps3cache/Inglourious_Basterds_2009.avi") ); - //layout->addWidget(video,1); - //video->play(); + render = new ClientSideRender(this); + render->setVisible( false ); - web = new MyWebView(this); + web = new MyWebView(this); + web->setVisible( false); + + picture = new PictureView(this); + picture->setVisible( true ); + + video = new VideoView(this); + video->setVisible(false); QVBoxLayout* layout = new QVBoxLayout(); - layout->addWidget(web,1); - + layout->addWidget(web,1); + layout->addWidget(render,1); + layout->addWidget(picture,1); + layout->addWidget(video,1); layout->addStretch(); layout->setContentsMargins(0,0,0,0); - setLayout(layout); + setLayout(layout); QTimer* timer = new QTimer(this); connect(timer, SIGNAL(timeout() ), this, SLOT(onTimer() )); timer->start(1000); - - - web->start(); + + web->start(); } void MainView::onTimer() { + static int count = 0; screenManager.timerTick(); + + //if (count == 0) + // video->loadUrl(""); + + + if ( (count%10) == 0) { + + int t = count / 10; + + if ( (t%2) == 0) { + picture->loadFromUrl("http://87.104.25.138/infoscreens/data/images/image1.jpg"); + } else { + picture->loadFromUrl("http://87.104.25.138/infoscreens/data/images/image2.jpg"); + } + } + count++; }