summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-13 23:07:29 (UTC)
committer zautrix <zautrix>2005-06-13 23:07:29 (UTC)
commitb3743f5abe0a95c9ffeadf6701c9943f604febd6 (patch) (unidiff)
treeca7b4fa180795d5d6fb7b212eea74e0ddf2e73ad
parent35d40d945aed8c9e7c3389182014a2d99edb5254 (diff)
downloadkdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.zip
kdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.tar.gz
kdepimpi-b3743f5abe0a95c9ffeadf6701c9943f604febd6.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp1
-rw-r--r--libkcal/todo.cpp4
-rw-r--r--libkcal/todo.h3
3 files changed, 6 insertions, 2 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 19d731f..9633b2c 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -345,25 +345,24 @@ void KOCalEditView::readConfig()
345 //calb->setMaximumSize( hei*9/10, hei*9/10 ); 345 //calb->setMaximumSize( hei*9/10, hei*9/10 );
346 } 346 }
347 ++row; 347 ++row;
348 kkf = KOPrefs::instance()->mCalendars.next(); 348 kkf = KOPrefs::instance()->mCalendars.next();
349 } 349 }
350 lab = new QLabel ( "", mw ); 350 lab = new QLabel ( "", mw );
351 mainLayout->addWidget( lab,row,0 ); 351 mainLayout->addWidget( lab,row,0 );
352 mw->show(); 352 mw->show();
353 353
354} 354}
355void KOCalEditView::addCal() 355void KOCalEditView::addCal()
356{ 356{
357 qDebug("addcal ");
358 KONewCalPrefs prefs ( this ); 357 KONewCalPrefs prefs ( this );
359 if ( ! prefs.exec() ) 358 if ( ! prefs.exec() )
360 return; 359 return;
361 QString name = prefs.calName(); 360 QString name = prefs.calName();
362 QString file = prefs.calFileName(); 361 QString file = prefs.calFileName();
363 QFileInfo fi ( file ); 362 QFileInfo fi ( file );
364 if (!fi.exists() ) { 363 if (!fi.exists() ) {
365 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); 364 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!"));
366 return; 365 return;
367 } 366 }
368 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); 367 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
369 kkf->mName = name; 368 kkf->mName = name;
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp
index 42274ff..e98af3c 100644
--- a/libkcal/todo.cpp
+++ b/libkcal/todo.cpp
@@ -79,24 +79,28 @@ void Todo::setRunning( bool run )
79 connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); 79 connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) );
80 } 80 }
81 mRunning = run; 81 mRunning = run;
82 if ( mRunning ) { 82 if ( mRunning ) {
83 mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min 83 mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min
84 mRunStart = QDateTime::currentDateTime(); 84 mRunStart = QDateTime::currentDateTime();
85 } else { 85 } else {
86 mRunSaveTimer->stop(); 86 mRunSaveTimer->stop();
87 saveRunningInfoToFile(); 87 saveRunningInfoToFile();
88 } 88 }
89} 89}
90 90
91void Todo::saveRunningInfoToFile()
92{
93 saveRunningInfoToFile( QString::null );
94}
91void Todo::saveRunningInfoToFile( QString comment ) 95void Todo::saveRunningInfoToFile( QString comment )
92{ 96{
93 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); 97 //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1());
94 if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { 98 if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) {
95 qDebug("Running time < 30 seconds. Skipped. "); 99 qDebug("Running time < 30 seconds. Skipped. ");
96 return; 100 return;
97 } 101 }
98 QString dir = KGlobalSettings::timeTrackerDir(); 102 QString dir = KGlobalSettings::timeTrackerDir();
99 //qDebug("%s ", dir.latin1()); 103 //qDebug("%s ", dir.latin1());
100 QString file = "%1%2%3-%4%5%6-"; 104 QString file = "%1%2%3-%4%5%6-";
101 file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); 105 file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 );
102 file.replace ( QRegExp (" "), "0" ); 106 file.replace ( QRegExp (" "), "0" );
diff --git a/libkcal/todo.h b/libkcal/todo.h
index 501c2ba..6fc4d4b 100644
--- a/libkcal/todo.h
+++ b/libkcal/todo.h
@@ -116,25 +116,26 @@ namespace KCal {
116 /** Return true, if todo has a date associated with completion */ 116 /** Return true, if todo has a date associated with completion */
117 bool hasCompletedDate() const; 117 bool hasCompletedDate() const;
118 bool contains ( Todo*); 118 bool contains ( Todo*);
119 void checkSetCompletedFalse(); 119 void checkSetCompletedFalse();
120 bool setRecurDates(); 120 bool setRecurDates();
121 bool isRunning() {return mRunning;} 121 bool isRunning() {return mRunning;}
122 bool hasRunningSub(); 122 bool hasRunningSub();
123 void setRunning( bool ); 123 void setRunning( bool );
124 void setRunningFalse( QString ); 124 void setRunningFalse( QString );
125 int runTime(); 125 int runTime();
126 QDateTime runStart () const { return mRunStart;} 126 QDateTime runStart () const { return mRunStart;}
127 public slots: 127 public slots:
128 void saveRunningInfoToFile( QString st = QString::null ); 128 void saveRunningInfoToFile( QString st );
129 void saveRunningInfoToFile( );
129 void saveParents(); 130 void saveParents();
130 private: 131 private:
131 bool mRunning; 132 bool mRunning;
132 QTimer * mRunSaveTimer; 133 QTimer * mRunSaveTimer;
133 QDateTime mRunStart; 134 QDateTime mRunStart;
134 bool accept(Visitor &v) { return v.visit(this); } 135 bool accept(Visitor &v) { return v.visit(this); }
135 136
136 QDateTime mDtDue; // due date of todo 137 QDateTime mDtDue; // due date of todo
137 138
138 bool mHasDueDate; // if todo has associated due date 139 bool mHasDueDate; // if todo has associated due date
139 140
140// int mStatus; // confirmed/delegated/tentative/etc 141// int mStatus; // confirmed/delegated/tentative/etc