6 |
|
|
7 |
#include <QTimer> |
#include <QTimer> |
8 |
|
|
|
//#include <VideoPlayer> //Phonon |
|
|
//#include <MediaSource> //Phonon |
|
|
|
|
9 |
#include "MyWebView.h" |
#include "MyWebView.h" |
10 |
#include "clientsiderender.h" |
#include "clientsiderender.h" |
11 |
|
#include "pictureview.h" |
12 |
|
#include "videoview.h" |
13 |
|
|
14 |
MainView::MainView(QWidget* parent) |
MainView::MainView(QWidget* parent) |
15 |
: QWidget(parent) |
: QWidget(parent) |
17 |
this->resize(400,400); |
this->resize(400,400); |
18 |
this->setWindowState( Qt::WindowFullScreen ); |
this->setWindowState( Qt::WindowFullScreen ); |
19 |
|
|
20 |
// qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); |
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(); |
|
21 |
|
|
22 |
render = new ClientSideRender(this); |
render = new ClientSideRender(this); |
23 |
render->setVisible( false ); |
render->setVisible( false ); |
24 |
|
|
25 |
web = new MyWebView(this); |
web = new MyWebView(this); |
26 |
web->setVisible( true); |
web->setVisible( false); |
27 |
|
|
28 |
|
picture = new PictureView(this); |
29 |
|
picture->setVisible( true ); |
30 |
|
|
31 |
|
video = new VideoView(this); |
32 |
|
video->setVisible(false); |
33 |
|
|
34 |
QVBoxLayout* layout = new QVBoxLayout(); |
QVBoxLayout* layout = new QVBoxLayout(); |
35 |
layout->addWidget(web,1); |
layout->addWidget(web,1); |
36 |
layout->addWidget(render,1); |
layout->addWidget(render,1); |
37 |
|
layout->addWidget(picture,1); |
38 |
|
layout->addWidget(video,1); |
39 |
layout->addStretch(); |
layout->addStretch(); |
40 |
layout->setContentsMargins(0,0,0,0); |
layout->setContentsMargins(0,0,0,0); |
41 |
setLayout(layout); |
setLayout(layout); |
50 |
|
|
51 |
void MainView::onTimer() |
void MainView::onTimer() |
52 |
{ |
{ |
53 |
|
static int count = 0; |
54 |
screenManager.timerTick(); |
screenManager.timerTick(); |
55 |
|
|
56 |
|
//if (count == 0) |
57 |
|
// video->loadUrl(""); |
58 |
|
|
59 |
|
|
60 |
|
if ( (count%10) == 0) { |
61 |
|
|
62 |
|
int t = count / 10; |
63 |
|
|
64 |
|
if ( (t%2) == 0) { |
65 |
|
picture->loadFromUrl("http://87.104.25.138/infoscreens/data/images/image1.jpg"); |
66 |
|
} else { |
67 |
|
picture->loadFromUrl("http://87.104.25.138/infoscreens/data/images/image2.jpg"); |
68 |
|
} |
69 |
|
} |
70 |
|
count++; |
71 |
} |
} |