{
if ( iProgressBar != 0 )
{
- iProgressBar->update( tr("Changing current operation mode.") );
+ iProgressBar->update( aText );
iWindowManager->showDialog( iProgressBar );
}
}
void UIManager::createProgressBar()
{
- iProgressBar = new ProgressBar( tr("CHANGE THIS") );
+ iProgressBar = new ProgressBar( tr("CHANGE THIS"), true );
// Connect to UIManager
connect( iProgressBar, SIGNAL( cancel() ), this, SLOT( progressBarCancelled() ) );
this, SLOT( changeModeOrdered( DeviceManager::OperationMode ) ) );
connect( aDeviceManager, SIGNAL( changingMode( const QString & ) ), this, SLOT( updateProgressBarText( const QString & ) ) );
+ connect( aDeviceManager, SIGNAL( changeModeFailed() ), this, SLOT( hideProgressBar() ) );
}
void UIManager::connectCommunicationManager( CommunicationManager *aCommunicationManager )
{
connect( aCommunicationManager, SIGNAL( meetingDetailsFetched( Meeting & ) ), this, SLOT( meetingDetailsFetched( Meeting & ) ) );
+ connect( aCommunicationManager, SIGNAL( meetingsFetched( const QList<Meeting *> & ) ), this, SLOT( meetingsFetched( const QList<Meeting *> & ) ) );
}
// ============================================
void UIManager::meetingsFetched( const QList<Meeting*> &aMeetings )
{
-
+ qDebug() << "[UIManager::meetingsFetched] <SHOULD NOT SIMPLY INSERT MEETINGS TO WEEKLYVIEW !!!>";
+ for ( int i = 0; i < aMeetings.count(); i++ )
+ {
+ Meeting *m = new Meeting( *( aMeetings.at(i) ) );
+ iWeeklyView->insertMeeting( m );
+ }
}
void UIManager::showMeetingProgressBar( Meeting *aMeeting )
if ( iProgressBar != 0 )
{
iProgressBar->update( tr("Fetching meeting info...") );
- iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ) );
+ iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
}
}
void UIManager::meetingDetailsFetched(Meeting &aDetailedMeeting)
{
+ qDebug() << "[UIManager::meetingDetailsFetched] <Invoked>";
if ( iMeetingInfo != 0 )
{
- if ( iProgressBar != 0 )
+ if ( iProgressBar != 0 && iProgressBar->isVisible() )
{
iProgressBar->close(); // Close it in case it's visible
}
- iMeetingInfo->setMeeting( &aDetailedMeeting );
- iWindowManager->showDialog( static_cast<QDialog *>( iMeetingInfo ) );
+ // iMeetingInfo->setMeeting( &aDetailedMeeting );
+ MeetingInfoDialog *tmp = new MeetingInfoDialog( &aDetailedMeeting );
+ iWindowManager->showDialog( static_cast<QDialog *>( tmp/*iMeetingInfo*/ ) );
}
}
// Show the progress bar..
if ( iProgressBar != 0 )
{
- iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ) );
+ iWindowManager->showDialog( static_cast<QDialog *>( iProgressBar ), false );
}
// ... and initiate the mode changing
iEngine->changeDeviceMode( true );
iProgressBar->update( aText );
}
}
+
+void UIManager::hideProgressBar()
+{
+ qDebug() << "[UIManager::hideProgressBar] <Invoked>";
+ if ( iProgressBar != 0 && iProgressBar->isVisible() )
+ {
+ iProgressBar->close();
+ }
+}