\r
QFont statusBarFont;\r
statusBarFont.setStyleHint( QFont::Helvetica );\r
- statusBarFont.setPixelSize( 12 );\r
+ statusBarFont.setPixelSize( 18 );\r
\r
QFont buttonFont;\r
buttonFont.setStyleHint( QFont::Helvetica );\r
iStatusBar->setBackgroundColor( Qt::white );\r
iStatusBar->setBorderWidth( 4 );\r
iStatusBar->setFont(statusBarFont);\r
- iStatusBar->setFixedHeight( 28 );\r
- QPixmap pixmap(":ixonos_logo");\r
- iStatusBar->setPixmap( pixmap );\r
+ iStatusBar->setFixedHeight( 36 );\r
+ iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign );\r
+\r
+ connect( iStatusBar, SIGNAL( clicked() ), this, SIGNAL( refreshButtonClicked() ) );\r
\r
iSchedule = new ScheduleWidget( aCurrentDateTime, iConfiguration->displaySettings(), this );\r
connect( iSchedule, SIGNAL( shownWeekChanged( QDate ) ), this, SIGNAL( shownWeekChanged( QDate ) ) );\r
return iRoomsCombo->currentRoom();\r
}\r
\r
-void WeeklyViewWidget::setCurrentDateTime( QDateTime aCurrentDateTime )\r
+void WeeklyViewWidget::setConnectionStatus( QDateTime aCurrentTime, bool aConnected,\r
+ QTime aLastUpdated, QString aError )\r
{\r
- iCurrentDayLabel->setText( aCurrentDateTime.date().toString( iConfiguration->displaySettings()->dateFormat() ) );\r
+ iCurrentDayLabel->setText( aCurrentTime.date().toString( iConfiguration->displaySettings()->dateFormat() ) );\r
+ iCurrentWeekLabel->setText( tr( "Wk %1" ).arg( aCurrentTime.date().weekNumber() ) );\r
+ iSchedule->setCurrentDateTime( aCurrentTime );\r
\r
- iCurrentWeekLabel->setText( tr( "Wk %1" ).arg( aCurrentDateTime.date().weekNumber() ) );\r
-\r
- iTimeDisplay->setText( aCurrentDateTime.toString( iConfiguration->displaySettings()->timeFormat() ) );\r
+ iTimeDisplay->setText( aCurrentTime.toString( iConfiguration->displaySettings()->timeFormat() ) );\r
+ if ( aLastUpdated.isNull() )\r
+ iStatusBar->setText( tr("Disconnected") , BorderedBarWidget::LeftAlign );\r
+ else if ( !aConnected )\r
+ {\r
+ iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign );\r
+ }\r
+ else\r
+ {\r
+ iStatusBar->setText( tr("Connected - Last update %1")\r
+ .arg(aLastUpdated.toString(iConfiguration->displaySettings()->timeFormat())) ,\r
+ BorderedBarWidget::LeftAlign );\r
+ }\r
+ showError( aError );\r
+ }\r
\r
- iSchedule->setCurrentDateTime( aCurrentDateTime );\r
+void WeeklyViewWidget::showError( QString aError )\r
+{\r
+ iStatusBar->setText( aError );\r
}\r
\r
QDate WeeklyViewWidget::beginnigOfShownWeek()\r
void WeeklyViewWidget::connectionEstablished()\r
{\r
ViewBase::connectionEstablished();\r
- qDebug() << "WeeklyViewWidget::connectionEstablished";\r
- iStatusBar->setText( tr("Connected"), BorderedBarWidget::LeftAlign );\r
}\r
\r
void WeeklyViewWidget::connectionLost()\r
{\r
ViewBase::connectionLost();\r
- iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign );\r
}\r