// Create auto refresh timer
iAutoRefresh = new QTimer;
- iAutoRefresh->setInterval(iConfiguration->connectionSettings()->refreshInterval() * 1000);
+
+ iAutoRefresh->setInterval(Configuration::instance()->getRefreshinterval() * 1000);
+
iAutoRefresh->start();
connect( iAutoRefresh, SIGNAL( timeout() ), iAutoRefresh, SLOT( start() ) );
+ connect( iAutoRefresh, SIGNAL( timeout() ), this, SLOT( updateRoomInfo() ) );
// connect( iAutoRefresh, SIGNAL( timeout() ), this, SLOT( fetchMeetings() ) );
if( iDevice->currentOperationMode() == DeviceManager::KioskMode )
}
connectSignals();
-
+ connect( Configuration::instance(), SIGNAL( configurationChanged() ), this, SLOT( configurationChanged() ) );
// QTimer::singleShot( 0, this, SLOT( fetchMeetings() ) );
// TODO: continue implementation
void Engine::checkStatusOfAllRooms()
{
// TODO: Check if date has changed
- // qDebug() << "Engine::checkStatusOfAllRooms()";
// iterate trough on the rooms
for (int i = 0; i < iConfiguration->rooms().count(); i++)
{
if( aCode >= 100 && aCode < 150 )
{
iCommunicationFailed = true;
- if ( iUIManager != 0 ) iUIManager->connectionLost();
+
+ if ( iUIManager != 0 )
+ {
+ iUIManager->connectionLost();
+ }
}
if ( iWindowManager != 0 )
{
void Engine::initCommunication()
{
// initialize communication
- iCommunication = new CommunicationManager( *(iConfiguration->connectionSettings()) );
+ iCommunication = new CommunicationManager(/* *(iConfiguration->connectionSettings()) */);
connect( iCommunication, SIGNAL( error( int, CommunicationManager::CommunicationType ) ),
this, SLOT( errorHandler( int ) ) );
connect( iCommunication, SIGNAL( meetingsFetched( const QList<Meeting*>& ) ),
}
}
iCurrentDate = aCurrentDateTime.date();
-}
\ No newline at end of file
+}
+
+
+void Engine::updateRoomInfo()
+{
+ qDebug() << "ENGINE::: updateMeetings";
+ roomStatusInfoNeeded(iCurrentRoom);
+}
+
+void Engine::configurationChanged()
+{
+ iAutoRefresh->setInterval(Configuration::instance()->getRefreshinterval() * 1000);
+}