summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-08-23 12:55:50 (UTC)
committer zautrix <zautrix>2005-08-23 12:55:50 (UTC)
commit72d600e2c3b3405e5f37615a56560811c0cf9a78 (patch) (unidiff)
tree0f3eeb3ae34822149ba8b6d62990725e59a29187 /korganizer/mainwindow.cpp
parente34e096c0e1b799904643c753591833f3ff2ab95 (diff)
downloadkdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.zip
kdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.tar.gz
kdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.tar.bz2
kopi load change
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp64
1 files changed, 46 insertions, 18 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 9ae393d..8c72d89 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -348,6 +348,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
348 348
349 QTime neededSaveTime = QDateTime::currentDateTime().time(); 349 //QTime neededSaveTime = QDateTime::currentDateTime().time();
350 mView->loadCalendars(); 350 //mView->loadCalendars();
351 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 351 //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
352 qDebug("KO: Calendar loading time: %d ms",msNeeded ); 352 //qDebug("KO: Calendar loading time: %d ms",msNeeded );
353 353
@@ -356,7 +356,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
356 } 356 }
357 processIncidenceSelection( 0 );
358 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
359 SLOT( processIncidenceSelection( Incidence * ) ) );
360 connect( mView, SIGNAL( modifiedChanged( bool ) ),
361 SLOT( slotModifiedChanged( bool ) ) );
362 357
@@ -366,5 +361,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
366 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); 361 connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
367 mView->setModified( false );
368 mBlockAtStartup = false;
369 mView->setModified( false );
370 setCentralWidget( mView ); 362 setCentralWidget( mView );
@@ -381,3 +373,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
381 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); 373 connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
382 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
383 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); 374 connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
@@ -400,5 +391,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
400 //US listen for result adressed from Ka/Pi 391 //US listen for result adressed from Ka/Pi
401#ifndef DESKTOP_VERSION 392
402 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
403#endif
404#ifndef DESKTOP_VERSION 393#ifndef DESKTOP_VERSION
@@ -413,3 +402,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
413 402
414 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); 403 setCaption(i18n("Loading calendar files ... please wait" ));
404 QTimer::singleShot( 10, this, SLOT ( loadDataAfterStart() ));
415} 405}
@@ -428,2 +418,34 @@ MainWindow::~MainWindow()
428} 418}
419
420void MainWindow::loadDataAfterStart()
421{
422
423 qDebug("KO: Start loading files..." );
424 QTime neededSaveTime = QDateTime::currentDateTime().time();
425 mView->loadCalendars();
426 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
427 qDebug("KO: Calendar loading time: %d ms",msNeeded );
428 //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
429 mView->setModified( false );
430 mBlockAtStartup = false;
431 mView->setModified( false );
432 connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
433 processIncidenceSelection( 0 );
434 connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
435 SLOT( processIncidenceSelection( Incidence * ) ) );
436 connect( mView, SIGNAL( modifiedChanged( bool ) ),
437 SLOT( slotModifiedChanged( bool ) ) );
438
439#ifndef DESKTOP_VERSION
440 connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
441 connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& )));
442 disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& )));
443 if ( !mCStringMess.isEmpty() )
444 recieve( mCStringMess, mByteData );
445#endif
446
447
448 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
449}
450
429void MainWindow::slotResetFocus() 451void MainWindow::slotResetFocus()
@@ -542,3 +564,8 @@ void MainWindow::closeEvent( QCloseEvent* ce )
542} 564}
543 565void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data )
566{
567 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
568 mCStringMess = cmsg;
569 mByteData = data;
570}
544void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 571void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
@@ -2518,2 +2545,3 @@ void MainWindow::importFile( QString fn, bool quick )
2518 } 2545 }
2546 mView->updateView();
2519 } 2547 }