summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2004-08-09 16:39:16 (UTC)
committer zautrix <zautrix>2004-08-09 16:39:16 (UTC)
commite1909ade2188e53feee65089d5f2882563876c58 (patch) (side-by-side diff)
treef812864838ff03b2758a27dd3fd77504a8295474 /libkcal
parentecdcad49975976ff877ff506fae3b14934c01898 (diff)
downloadkdepimpi-e1909ade2188e53feee65089d5f2882563876c58.zip
kdepimpi-e1909ade2188e53feee65089d5f2882563876c58.tar.gz
kdepimpi-e1909ade2188e53feee65089d5f2882563876c58.tar.bz2
added status info
Diffstat (limited to 'libkcal') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp25
1 files changed, 22 insertions, 3 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index e43a507..11c68c5 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -771,4 +771,15 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
s.msg = NULL;
s.ConfigNum = 0;
+ QLabel status ( i18n("Reading data. Opening device ..."), 0 );
+ int w = status.sizeHint().width()+20 ;
+ if ( w < 200 ) w = 200;
+ int h = status.sizeHint().height()+20 ;
+ int dw = QApplication::desktop()->width();
+ int dh = QApplication::desktop()->height();
+ status.setCaption(i18n("Reading Phone Data") );
+ status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
+ status.show();
+ status.raise();
+ qApp->processEvents();
#if 0
static char *cp;
@@ -825,7 +836,10 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
PhoneParser handler( calendar, mProfileName );
int ccc = 0;
+ QString message = i18n("Processing event # ");
+ int procCount = 0;
qDebug("Debug: only 10 calender items are downloaded ");
while (!gshutdown && ccc++ < 10) {
-
+ status.setText ( message + QString::number ( ++procCount ) );
+ qApp->processEvents();
qDebug("readEvent %d ", ccc);
error=Phone->GetNextCalendar(&s,&note,start);
@@ -838,5 +852,9 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
GSM_ToDoEntry ToDo;
ccc = 0;
+ message = i18n("Processing todo # ");
+ procCount = 0;
while (!gshutdown) {
+ status.setText ( message + QString::number ( ++procCount ) );
+ qApp->processEvents();
error = Phone->GetNextToDo(&s, &ToDo, start);
if (error == ERR_EMPTY) break;
@@ -931,5 +949,5 @@ bool PhoneFormat::save( Calendar *calendar)
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
- status.setCaption(i18n("Writing DTM Data") );
+ status.setCaption(i18n("Writing Phone Data") );
status.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
status.show();
@@ -983,4 +1001,5 @@ bool PhoneFormat::save( Calendar *calendar)
error = Phone->AddCalendar(&s, &Note);
ev->setID( mProfileName, QString::number( Note.Location ) );
+ qDebug("New Calendar. Location %d ",Note.Location );
afterSave( ev );
} else {
@@ -1008,5 +1027,5 @@ bool PhoneFormat::save( Calendar *calendar)
}
else { // change existing
- error=Phone->AddToDo(&s,&ToDoEntry);
+ error=Phone->SetToDo(&s,&ToDoEntry);
}
}