--- infoscreen/MainView.cpp 2009/12/15 13:53:02 512 +++ infoscreen/MainView.cpp 2010/01/05 17:19:02 526 @@ -6,16 +6,20 @@ #include -#include //Phonon -#include //Phonon +//#include //Phonon +//#include //Phonon #include "MyWebView.h" +#include "clientsiderender.h" +#include "pictureview.h" MainView::MainView(QWidget* parent) : QWidget(parent) { + this->resize(400,400); this->setWindowState( Qt::WindowFullScreen ); + qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); @@ -25,25 +29,47 @@ //layout->addWidget(video,1); //video->play(); - web = new MyWebView(this); + render = new ClientSideRender(this); + render->setVisible( false ); + + web = new MyWebView(this); + web->setVisible( false); + + picture = new PictureView(this); + picture->setVisible( true ); + + QVBoxLayout* layout = new QVBoxLayout(); - layout->addWidget(web,1); - + layout->addWidget(web,1); + layout->addWidget(render,1); + layout->addWidget(picture,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%10) == 0) { + + int t = count / 10; + qDebug() << t; + 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++; }