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

Annotation of /infoscreen/mainview.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 517 - (hide annotations) (download)
Wed Dec 16 09:42:08 2009 UTC (14 years, 5 months ago) by torben
Original Path: infoscreen/MainView.cpp
File size: 1259 byte(s)
also disable screensaver
1 torben 509 #include "MainView.h"
2 torben 512 #include <QApplication>
3 torben 510 #include <QPushButton>
4 torben 512 #include <QLabel>
5 torben 510 #include <QVBoxLayout>
6 torben 509
7 torben 510 #include <QTimer>
8    
9 torben 515 //#include <VideoPlayer> //Phonon
10     //#include <MediaSource> //Phonon
11 torben 511
12 torben 512 #include "MyWebView.h"
13 torben 515 #include "clientsiderender.h"
14 torben 511
15 torben 512
16 torben 509 MainView::MainView(QWidget* parent)
17     : QWidget(parent)
18     {
19 torben 516 this->resize(400,400);
20 torben 512 this->setWindowState( Qt::WindowFullScreen );
21 torben 516
22 torben 515 // qApp->setOverrideCursor( QCursor( Qt::BlankCursor) );
23 torben 510
24 torben 511
25 torben 512 //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 torben 510
31 torben 515 render = new ClientSideRender(this);
32 torben 517 render->setVisible( false );
33 torben 515 web = new MyWebView(this);
34 torben 517 web->setVisible( true);
35 torben 511
36 torben 517
37    
38 torben 510 QVBoxLayout* layout = new QVBoxLayout();
39 torben 515 layout->addWidget(web,1);
40     layout->addWidget(render,1);
41 torben 510 layout->addStretch();
42     layout->setContentsMargins(0,0,0,0);
43 torben 515 setLayout(layout);
44 torben 510
45     QTimer* timer = new QTimer(this);
46     connect(timer, SIGNAL(timeout() ), this, SLOT(onTimer() ));
47 torben 511 timer->start(1000);
48 torben 517
49     web->start();
50 torben 509 }
51    
52    
53     void MainView::onTimer()
54     {
55 torben 512 screenManager.timerTick();
56 torben 509 }

  ViewVC Help
Powered by ViewVC 1.1.20