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

Diff of /infoscreen/mainview.cpp

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

revision 884 by torben, Thu Jun 24 09:44:57 2010 UTC revision 891 by torben, Thu Jun 24 13:01:35 2010 UTC
# Line 70  MainView::MainView(QWidget* parent) Line 70  MainView::MainView(QWidget* parent)
70    
71      clockOverlay = new ClockOverlay(this);      clockOverlay = new ClockOverlay(this);
72      clockOverlay->move(10,10);      clockOverlay->move(10,10);
73      clockOverlay->resize(100,50);      clockOverlay->resize(150,75);
74    
75            
76    
# Line 249  void MainView::switchScreens() Line 249  void MainView::switchScreens()
249      }      }
250    
251      if (lastScreenSwitch.isNull() || lastScreenSwitch.elapsed() > (currentItem.runtime*1000)) {      if (lastScreenSwitch.isNull() || lastScreenSwitch.elapsed() > (currentItem.runtime*1000)) {
   
252          QTime now = QTime::currentTime();          QTime now = QTime::currentTime();
253          if (lastScreenSwitch.isNull())          if (lastScreenSwitch.isNull())
254              currentItemIdx = -1;              currentItemIdx = -1;
# Line 297  void MainView::switchScreens() Line 296  void MainView::switchScreens()
296    
297          } else {          } else {
298              errorInfoScreen("Der er ingen information at vise");              errorInfoScreen("Der er ingen information at vise");
299                currentItem = ScreenItem();
300                currentItem.runtime = 60; //switch screens again in 1 minute
301          }          }
302          lastScreenSwitch = QTime::currentTime();          lastScreenSwitch = QTime::currentTime();
303    
# Line 305  void MainView::switchScreens() Line 306  void MainView::switchScreens()
306    
307  void MainView::errorInfoScreen(QString msg)  void MainView::errorInfoScreen(QString msg)
308  {  {
309          ensureVisible(web);      ensureVisible(web);
310          web->setHtml("<html>\      QString html("<html><body text='#505050' bgcolor='#000000'>");
311                  <body text='#505050' bgcolor='#000000'>\      html.append("<table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>")
312          <table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>" + msg+ "</h1></td></tr></table>\          .append(msg)
313                  </body></html>");          .append("</h1></td></tr></table></body></html>");
314        web->setHtml(html);
315  }  }
316    
317  void MainView::ensureVisible(QWidget* widget)  void MainView::ensureVisible(QWidget* widget)

Legend:
Removed from v.884  
changed lines
  Added in v.891

  ViewVC Help
Powered by ViewVC 1.1.20