19 |
{ |
{ |
20 |
this->resize(400,400); |
this->resize(400,400); |
21 |
this->setWindowState( Qt::WindowFullScreen ); |
this->setWindowState( Qt::WindowFullScreen ); |
22 |
|
this->grabKeyboard(); |
23 |
|
|
24 |
qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); |
qApp->setOverrideCursor( QCursor( Qt::BlankCursor) ); |
25 |
|
|
52 |
|
|
53 |
} |
} |
54 |
|
|
55 |
|
void MainView::keyPressEvent ( QKeyEvent* event ) |
56 |
|
{ |
57 |
|
Q_UNUSED(event); |
58 |
|
qApp->quit(); |
59 |
|
} |
60 |
|
|
61 |
void MainView::onTimer() |
void MainView::onTimer() |
62 |
{ |
{ |
101 |
bool found = false; |
bool found = false; |
102 |
int tries = 0; |
int tries = 0; |
103 |
|
|
104 |
|
if (screenItems.size() > 0) { //only try if we have a any screens |
105 |
while (found == false && tries <= screenItems.size()) { //find next with valid display time |
while (found == false && tries <= screenItems.size()) { //find next with valid display time |
106 |
tries++; |
tries++; |
107 |
currentItemIdx = (currentItemIdx+1) % screenItems.size(); |
currentItemIdx = (currentItemIdx+1) % screenItems.size(); |
108 |
currentItem = screenItems.at(currentItemIdx); |
currentItem = screenItems.at(currentItemIdx); |
109 |
|
|
110 |
if (currentItem.start <= now && now <= currentItem.stop ) |
if (currentItem.start <= now && now <= currentItem.stop ) |
111 |
found = true; |
found = true; |
112 |
|
} |
113 |
} |
} |
114 |
|
|
115 |
if (found) { |
if (found) { |