--- infoscreen/MainView.cpp 2009/12/16 09:42:08 517 +++ infoscreen/MainView.cpp 2010/01/05 20:14:22 527 @@ -6,12 +6,10 @@ #include -//#include //Phonon -//#include //Phonon - #include "MyWebView.h" #include "clientsiderender.h" - +#include "pictureview.h" +#include "videoview.h" MainView::MainView(QWidget* parent) : QWidget(parent) @@ -19,25 +17,25 @@ 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(); + qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); render = new ClientSideRender(this); render->setVisible( false ); + web = new MyWebView(this); - web->setVisible( true); + 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(render,1); + layout->addWidget(picture,1); + layout->addWidget(video,1); layout->addStretch(); layout->setContentsMargins(0,0,0,0); setLayout(layout); @@ -52,5 +50,22 @@ 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++; }