6 |
|
|
7 |
#include <QTimer> |
#include <QTimer> |
8 |
|
|
9 |
#include <VideoPlayer> //Phonon |
//#include <VideoPlayer> //Phonon |
10 |
#include <MediaSource> //Phonon |
//#include <MediaSource> //Phonon |
11 |
|
|
12 |
#include "MyWebView.h" |
#include "MyWebView.h" |
13 |
|
#include "clientsiderender.h" |
14 |
|
|
15 |
|
|
16 |
MainView::MainView(QWidget* parent) |
MainView::MainView(QWidget* parent) |
17 |
: QWidget(parent) |
: QWidget(parent) |
18 |
{ |
{ |
19 |
|
this->resize(400,400); |
20 |
this->setWindowState( Qt::WindowFullScreen ); |
this->setWindowState( Qt::WindowFullScreen ); |
21 |
qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); |
|
22 |
|
// qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); |
23 |
|
|
24 |
|
|
25 |
//Phonon::VideoPlayer* video; |
//Phonon::VideoPlayer* video; |
28 |
//layout->addWidget(video,1); |
//layout->addWidget(video,1); |
29 |
//video->play(); |
//video->play(); |
30 |
|
|
31 |
web = new MyWebView(this); |
render = new ClientSideRender(this); |
32 |
|
render->setVisible( false ); |
33 |
|
web = new MyWebView(this); |
34 |
|
web->setVisible( true); |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
QVBoxLayout* layout = new QVBoxLayout(); |
QVBoxLayout* layout = new QVBoxLayout(); |
39 |
layout->addWidget(web,1); |
layout->addWidget(web,1); |
40 |
|
layout->addWidget(render,1); |
41 |
layout->addStretch(); |
layout->addStretch(); |
42 |
layout->setContentsMargins(0,0,0,0); |
layout->setContentsMargins(0,0,0,0); |
43 |
setLayout(layout); |
setLayout(layout); |
44 |
|
|
45 |
QTimer* timer = new QTimer(this); |
QTimer* timer = new QTimer(this); |
46 |
connect(timer, SIGNAL(timeout() ), this, SLOT(onTimer() )); |
connect(timer, SIGNAL(timeout() ), this, SLOT(onTimer() )); |
47 |
timer->start(1000); |
timer->start(1000); |
48 |
|
|
49 |
|
web->start(); |
|
web->start(); |
|
50 |
} |
} |
51 |
|
|
52 |
|
|