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) (side-by-side diff)
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 ) :
- QTime neededSaveTime = QDateTime::currentDateTime().time();
- mView->loadCalendars();
- int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
- qDebug("KO: Calendar loading time: %d ms",msNeeded );
+ //QTime neededSaveTime = QDateTime::currentDateTime().time();
+ //mView->loadCalendars();
+ //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
+ //qDebug("KO: Calendar loading time: %d ms",msNeeded );
@@ -356,7 +356,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
}
- processIncidenceSelection( 0 );
- connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
- SLOT( processIncidenceSelection( Incidence * ) ) );
- connect( mView, SIGNAL( modifiedChanged( bool ) ),
- SLOT( slotModifiedChanged( bool ) ) );
@@ -366,5 +361,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
- mView->setModified( false );
- mBlockAtStartup = false;
- mView->setModified( false );
setCentralWidget( mView );
@@ -381,3 +373,2 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
- connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
@@ -400,5 +391,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
//US listen for result adressed from Ka/Pi
-#ifndef DESKTOP_VERSION
- connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
-#endif
+
#ifndef DESKTOP_VERSION
@@ -413,3 +402,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
- QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
+ setCaption(i18n("Loading calendar files ... please wait" ));
+ QTimer::singleShot( 10, this, SLOT ( loadDataAfterStart() ));
}
@@ -428,2 +418,34 @@ MainWindow::~MainWindow()
}
+
+void MainWindow::loadDataAfterStart()
+{
+
+ qDebug("KO: Start loading files..." );
+ QTime neededSaveTime = QDateTime::currentDateTime().time();
+ mView->loadCalendars();
+ int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
+ qDebug("KO: Calendar loading time: %d ms",msNeeded );
+ //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
+ mView->setModified( false );
+ mBlockAtStartup = false;
+ mView->setModified( false );
+ connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
+ processIncidenceSelection( 0 );
+ connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
+ SLOT( processIncidenceSelection( Incidence * ) ) );
+ connect( mView, SIGNAL( modifiedChanged( bool ) ),
+ SLOT( slotModifiedChanged( bool ) ) );
+
+#ifndef DESKTOP_VERSION
+ connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
+ connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& )));
+ disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& )));
+ if ( !mCStringMess.isEmpty() )
+ recieve( mCStringMess, mByteData );
+#endif
+
+
+ QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
+}
+
void MainWindow::slotResetFocus()
@@ -542,3 +564,8 @@ void MainWindow::closeEvent( QCloseEvent* ce )
}
-
+void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data )
+{
+ qDebug("KO: QCOP start message received: %s ", cmsg.data() );
+ mCStringMess = cmsg;
+ mByteData = data;
+}
void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
@@ -2518,2 +2545,3 @@ void MainWindow::importFile( QString fn, bool quick )
}
+ mView->updateView();
}