1 |
#include "MainView.h" |
#include "mainview.h" |
2 |
#include <QApplication> |
#include <QApplication> |
3 |
#include <QPushButton> |
#include <QPushButton> |
4 |
#include <QLabel> |
#include <QLabel> |
68 |
layout->setContentsMargins(0,0,0,0); |
layout->setContentsMargins(0,0,0,0); |
69 |
setLayout(layout); |
setLayout(layout); |
70 |
|
|
71 |
clockOverlay = new ClockOverlay(this); |
if (showClock == true) { |
72 |
clockOverlay->move(10,10); |
clockOverlay = new ClockOverlay(this); |
73 |
clockOverlay->resize(100,50); |
clockOverlay->move(10,10); |
74 |
|
clockOverlay->resize(150,75); |
75 |
|
} |
76 |
|
|
77 |
|
|
78 |
|
|
119 |
screenManagerOff = settings->value("screenmanager_off").toTime(); |
screenManagerOff = settings->value("screenmanager_off").toTime(); |
120 |
} |
} |
121 |
|
|
122 |
|
showClock = settings->value("showclock").toBool(); |
123 |
|
|
124 |
xmlInterval = settings->value("xmlinterval", 30).toInt(); |
xmlInterval = settings->value("xmlinterval", 30).toInt(); |
125 |
xmlInterval = (xmlInterval * 60 * 1000); //convert to milliseconds |
xmlInterval = (xmlInterval * 60 * 1000); //convert to milliseconds |
126 |
|
|
172 |
if (currentMode == ModeXml || currentMode == ModeLocal) { |
if (currentMode == ModeXml || currentMode == ModeLocal) { |
173 |
switchScreens(); |
switchScreens(); |
174 |
} |
} |
175 |
clockOverlay->timerTick(); |
if (showClock == true) { |
176 |
|
clockOverlay->timerTick(); |
177 |
|
} |
178 |
} |
} |
179 |
|
|
180 |
|
|
312 |
|
|
313 |
void MainView::errorInfoScreen(QString msg) |
void MainView::errorInfoScreen(QString msg) |
314 |
{ |
{ |
315 |
ensureVisible(web); |
ensureVisible(web); |
316 |
web->setHtml("<html>\ |
QString html("<html><body text='#505050' bgcolor='#000000'>"); |
317 |
<body text='#505050' bgcolor='#000000'>\ |
html.append("<table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>") |
318 |
<table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>" + msg+ "</h1></td></tr></table>\ |
.append(msg) |
319 |
</body></html>"); |
.append("</h1></td></tr></table></body></html>"); |
320 |
|
web->setHtml(html); |
321 |
} |
} |
322 |
|
|
323 |
void MainView::ensureVisible(QWidget* widget) |
void MainView::ensureVisible(QWidget* widget) |