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

Diff of /infoscreen/webview.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 506 by torben, Fri Dec 11 21:47:49 2009 UTC revision 508 by torben, Sat Dec 12 17:48:23 2009 UTC
# Line 1  Line 1 
1  #include <QApplication>  #include <QApplication>
 #include <QtWebKit>  
2  #include <QDesktopWidget>  #include <QDesktopWidget>
3  #include <iostream>  #include <iostream>
4  #include <stdexcept>  #include <stdexcept>
# Line 12  MyWebView::MyWebView(QWidget* parent) : Line 11  MyWebView::MyWebView(QWidget* parent) :
11          qApp->setOverrideCursor( QCursor( Qt::BlankCursor) );          qApp->setOverrideCursor( QCursor( Qt::BlankCursor) );
12                                    
13          connect(this, SIGNAL( loadStarted() ), this, SLOT( test() ) );          connect(this, SIGNAL( loadStarted() ), this, SLOT( test() ) );
14    
15            QTimer* timer = new QTimer(this);
16            connect(timer, SIGNAL(timeout()), this, SLOT(onTimer()));
17            timer->start(1000);
18  }  }
19    
20  void MyWebView::show() {  void MyWebView::show() {
# Line 65  void MyWebView::test() { Line 68  void MyWebView::test() {
68          std::cout << "test" << std::endl;          std::cout << "test" << std::endl;
69  }  }
70    
71    
72    void MyWebView::onTimer() {
73            static int count = 0;
74            count++;
75    
76            if (count == 10) {
77                    system("xset dpms force off");
78            }
79            
80            std::cout << "timer" << std::endl;
81    }

Legend:
Removed from v.506  
changed lines
  Added in v.508

  ViewVC Help
Powered by ViewVC 1.1.20