158 |
|
|
159 |
picture->loadFromUrl( currentItem.url ); |
picture->loadFromUrl( currentItem.url ); |
160 |
|
|
161 |
} |
} else if (currentItem.module == "info_web") { |
|
if (currentItem.module == "info_web") { |
|
162 |
ensureVisible(web); |
ensureVisible(web); |
163 |
web->load(currentItem.url); |
web->load(currentItem.url); |
164 |
} |
} else if (currentItem.module == "info_video") { |
|
if (currentItem.module == "info_video") { |
|
165 |
ensureVisible(video); |
ensureVisible(video); |
166 |
video->loadUrl(currentItem.url); |
video->loadUrl(currentItem.url); |
167 |
|
} else { |
168 |
|
errorInfoScreen("Unknown module: " + currentItem.module ); |
169 |
} |
} |
170 |
|
|
|
|
|
171 |
} else { |
} else { |
172 |
qDebug() << "no screen"; |
qDebug() << "no screen"; |
173 |
noInfoScreen(); |
errorInfoScreen("Der er ingen information at vise"); |
174 |
} |
} |
175 |
lastScreenSwitch = QTime::currentTime(); |
lastScreenSwitch = QTime::currentTime(); |
176 |
|
|
177 |
} |
} |
178 |
} |
} |
179 |
|
|
180 |
void MainView::noInfoScreen() |
void MainView::errorInfoScreen(QString msg) |
181 |
{ |
{ |
182 |
ensureVisible(web); |
ensureVisible(web); |
183 |
web->setHtml("<html>\ |
web->setHtml("<html>\ |
184 |
<body text='#505050' bgcolor='#000000'>\ |
<body text='#505050' bgcolor='#000000'>\ |
185 |
<table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>Der er ingen information at vise</h1></td></tr></table>\ |
<table width='100%' height='100%'><tr><td align='center' valign='middel'><h1>" + msg+ "</h1></td></tr></table>\ |
186 |
</body></html>"); |
</body></html>"); |
187 |
} |
} |
188 |
|
|