--- infoscreen/MainView.cpp 2009/12/15 21:06:14 516 +++ infoscreen/MainView.cpp 2010/01/05 14:03:06 524 @@ -11,6 +11,7 @@ #include "MyWebView.h" #include "clientsiderender.h" +#include "pictureview.h" MainView::MainView(QWidget* parent) @@ -29,12 +30,20 @@ //video->play(); render = new ClientSideRender(this); + render->setVisible( false ); + web = new MyWebView(this); - web->setVisible( false ); + web->setVisible( false); + + picture = new PictureView(this); + picture->setVisible( true ); + + QVBoxLayout* layout = new QVBoxLayout(); layout->addWidget(web,1); layout->addWidget(render,1); + layout->addWidget(picture,1); layout->addStretch(); layout->setContentsMargins(0,0,0,0); setLayout(layout); @@ -42,13 +51,25 @@ 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://10.210.210.200/infoscreens/data/images/image1.jpg"); + } else { + picture->loadFromUrl("http://10.210.210.200/infoscreens/data/images/image2.jpg"); + } + } + count++; }