/[projects]/infoscreen/MainView.cpp
ViewVC logotype

Contents of /infoscreen/MainView.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 517 - (show annotations) (download)
Wed Dec 16 09:42:08 2009 UTC (14 years, 5 months ago) by torben
File size: 1259 byte(s)
also disable screensaver
1 #include "MainView.h"
2 #include <QApplication>
3 #include <QPushButton>
4 #include <QLabel>
5 #include <QVBoxLayout>
6
7 #include <QTimer>
8
9 //#include <VideoPlayer> //Phonon
10 //#include <MediaSource> //Phonon
11
12 #include "MyWebView.h"
13 #include "clientsiderender.h"
14
15
16 MainView::MainView(QWidget* parent)
17 : QWidget(parent)
18 {
19 this->resize(400,400);
20 this->setWindowState( Qt::WindowFullScreen );
21
22 // qApp->setOverrideCursor( QCursor( Qt::BlankCursor) );
23
24
25 //Phonon::VideoPlayer* video;
26 //video = new Phonon::VideoPlayer(Phonon::VideoCategory, this);
27 //video->load( Phonon::MediaSource("http://todic.dk/ps3cache/Inglourious_Basterds_2009.avi") );
28 //layout->addWidget(video,1);
29 //video->play();
30
31 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();
39 layout->addWidget(web,1);
40 layout->addWidget(render,1);
41 layout->addStretch();
42 layout->setContentsMargins(0,0,0,0);
43 setLayout(layout);
44
45 QTimer* timer = new QTimer(this);
46 connect(timer, SIGNAL(timeout() ), this, SLOT(onTimer() ));
47 timer->start(1000);
48
49 web->start();
50 }
51
52
53 void MainView::onTimer()
54 {
55 screenManager.timerTick();
56 }

  ViewVC Help
Powered by ViewVC 1.1.20