if ( iEngine == 0 ) return;
if ( iWindowManager == 0 ) return;
+ connect(iWindowManager, SIGNAL(showSettingsClicked()), this, SLOT(settingsViewRequest()));
+
createWeeklyView();
- createSettingsView();
createRoomStatusIndicator();
createPasswordDialog();
createProgressBar();
connect( iWeeklyView, SIGNAL( currentRoomChanged( Room * ) ), this, SLOT( currentRoomChanged( Room * ) ) );
connect( iWeeklyView, SIGNAL( meetingActivated( Meeting * ) ), this, SLOT( showMeetingProgressBar( Meeting * ) ) );
// Connect signals to engine
+ connect( iWeeklyView, SIGNAL( refreshButtonClicked() ), iEngine, SLOT( updateRoomInfo() ) );
connect( iWeeklyView, SIGNAL( meetingActivated( Meeting * ) ), iEngine, SLOT( fetchMeetingDetails( Meeting * ) ) );
connect( iWeeklyView, SIGNAL( shownWeekChanged( QDate ) ), iEngine, SLOT( shownWeekChanged( QDate ) ) );
connect( iWeeklyView, SIGNAL( currentRoomChanged( Room * ) ), iEngine, SLOT( currentRoomChanged( Room * ) ) );
// UIMANAGER SLOTS
void UIManager::settingsViewRequest()
{
+ createSettingsView();
+
// Show the settings view and stop the idle timer
- if ( iSettingsView != 0 )
- {
- iWindowManager->showView( static_cast<ViewBase *>( iSettingsView ) );
- iEngine->stopIdleTimeCounter();
- }
+ iWindowManager->showView( static_cast<ViewBase *>( iSettingsView ) );
+ iEngine->stopIdleTimeCounter();
}
void UIManager::settingsOkClicked()
if ( iWeeklyView != 0 )
{
iWindowManager->showView( static_cast<ViewBase *>( iWeeklyView ) );
+ QT_DELETE(iSettingsView);
iEngine->startIdleTimeCounter();
+ currentRoomChanged(iWeeklyView->currentRoom());
}
}
}
}
-void UIManager::showMeetingProgressBar( Meeting *aMeeting )
+void UIManager::showMeetingProgressBar( Meeting */*aMeeting*/ )
{
if ( iProgressBar != 0 )
{
{
qDebug() << "UIManager::connectionLost()";
iWeeklyView->connectionLost();
- iSettingsView->connectionLost();
iRoomStatusIndicator->connectionLost();
}
{
qDebug() << "UIManager::connectionEstablished()";
iWeeklyView->connectionEstablished();
- iSettingsView->connectionEstablished();
iRoomStatusIndicator->connectionEstablished();
}
{
if ( iWeeklyView != 0 )
{
- iWeeklyView->setCurrentDateTime( aDateTime );
+ iWeeklyView->setConnectionStatus( aDateTime, iEngine->connected(), iEngine->lastUpdated(), iEngine->errorMessage() );
}
if ( iRoomStatusIndicator != 0 )
{
- iRoomStatusIndicator->setCurrentTime( aDateTime.time() );
+ iRoomStatusIndicator->setConnectionStatus( aDateTime, iEngine->connected(), iEngine->lastUpdated(), iEngine->errorMessage() );
}
}
if ( iWeeklyView != 0 )
{
iWindowManager->showView( static_cast<ViewBase *>( iWeeklyView ) );
+ QT_DELETE(iSettingsView);
iEngine->startIdleTimeCounter();
}
-}
\ No newline at end of file
+}