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

Diff of /infoscreen/mainview.cpp

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

revision 873 by torben, Tue Jun 22 20:29:40 2010 UTC revision 876 by torben, Tue Jun 22 21:01:37 2010 UTC
# Line 16  Line 16 
16  #include "videoview.h"  #include "videoview.h"
17    
18  #include "httpwrapper.h"  #include "httpwrapper.h"
19    #include "screenmanager.h"
20    
21    
22    
# Line 71  MainView::MainView(QWidget* parent) Line 72  MainView::MainView(QWidget* parent)
72          web->start(url,screenid);          web->start(url,screenid);
73      }      }
74    
75        if (enableScreenManager) {
76            screenManager = new ScreenManager(screenManagerOn, screenManagerOff);
77        } else {
78            qDebug() << "ScreenManager is disabled";
79        }
80    
81    
82      qDebug() << "Starting timer...";      qDebug() << "Starting timer...";
83      timer = new QTimer(this);      timer = new QTimer(this);
# Line 97  void MainView::loadSettings() Line 104  void MainView::loadSettings()
104          exit(1);          exit(1);
105      }      }
106    
107        enableScreenManager = settings->value("enablescreenmanager").toBool();
108        if (enableScreenManager) {
109            screenManagerOn = settings->value("screenmanager_on").toTime();
110            screenManagerOff = settings->value("screenmanager_off").toTime();
111        }
112    
113    
114      if (currentMode == ModeSimpleWeb || currentMode == ModeXml) {      if (currentMode == ModeSimpleWeb || currentMode == ModeXml) {
115          url = settings->value("url").toString();          url = settings->value("url").toString();
# Line 134  void MainView::keyPressEvent ( QKeyEvent Line 147  void MainView::keyPressEvent ( QKeyEvent
147    
148  void MainView::onTimer()  void MainView::onTimer()
149  {  {
150      qDebug() << "onTimer()";      if (enableScreenManager == true) {
151      screenManager.timerTick();          screenManager->timerTick();
152        }
153    
154      if (currentMode == ModeXml) {      if (currentMode == ModeXml) {
155          readXml();          readXml();
# Line 271  void MainView::switchScreens() Line 285  void MainView::switchScreens()
285              }              }
286    
287          } else {          } else {
             qDebug() << "no screen";  
288              errorInfoScreen("Der er ingen information at vise");              errorInfoScreen("Der er ingen information at vise");
289          }          }
290          lastScreenSwitch = QTime::currentTime();          lastScreenSwitch = QTime::currentTime();

Legend:
Removed from v.873  
changed lines
  Added in v.876

  ViewVC Help
Powered by ViewVC 1.1.20