-rw-r--r-- | korganizer/kofilterview.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 52bc463..a653c18 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -299,102 +299,102 @@ void KOCalEditView::readConfig() | |||
299 | #if 0 | 299 | #if 0 |
300 | addBut = new QPushButton ( mw ); | 300 | addBut = new QPushButton ( mw ); |
301 | mainLayout->addWidget( addBut,0,6 ); | 301 | mainLayout->addWidget( addBut,0,6 ); |
302 | addBut->setPixmap ( SmallIcon("minus")); | 302 | addBut->setPixmap ( SmallIcon("minus")); |
303 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); | 303 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); |
304 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 304 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
305 | #endif | 305 | #endif |
306 | 306 | ||
307 | 307 | ||
308 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 308 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
309 | int row = 1; | 309 | int row = 1; |
310 | while ( kkf ) { | 310 | while ( kkf ) { |
311 | int iii = 0; | 311 | int iii = 0; |
312 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); | 312 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); |
313 | mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); | 313 | mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); |
314 | cb->setChecked( kkf->isStandard ); | 314 | cb->setChecked( kkf->isStandard ); |
315 | cb->setNum( kkf->mCalNumber ); | 315 | cb->setNum( kkf->mCalNumber ); |
316 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); | 316 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectStdCal(int,bool) ) ); |
317 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) | 317 | if ( kkf->mErrorOnLoad || kkf->isReadOnly ) |
318 | cb->setEnabled( false ); | 318 | cb->setEnabled( false ); |
319 | cb = new KOCalCheckButton( mw ); | 319 | cb = new KOCalCheckButton( mw ); |
320 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); | 320 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); |
321 | cb->setChecked( kkf->isEnabled ); | 321 | cb->setChecked( kkf->isEnabled ); |
322 | cb->setNum( kkf->mCalNumber ); | 322 | cb->setNum( kkf->mCalNumber ); |
323 | if ( kkf->mErrorOnLoad ) | 323 | if ( kkf->mErrorOnLoad ) |
324 | cb->setEnabled( false ); | 324 | cb->setEnabled( false ); |
325 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); | 325 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); |
326 | KOCalButton* name = new KOCalButton( mw ); | 326 | KOCalButton* name = new KOCalButton( mw ); |
327 | name->setNum( kkf->mCalNumber ); | 327 | name->setNum( kkf->mCalNumber ); |
328 | name->setText( kkf->mName ); | 328 | name->setText( kkf->mName ); |
329 | mainLayout->addWidget( name,row,++iii ); | 329 | mainLayout->addWidget( name,row,++iii ); |
330 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); | 330 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); |
331 | lab = new QLabel ( i18n(" "), mw ); | 331 | lab = new QLabel ( i18n(" "), mw ); |
332 | mainLayout->addWidget( lab,row,++iii ); | 332 | mainLayout->addWidget( lab,row,++iii ); |
333 | cb = new KOCalCheckButton( mw ); | 333 | cb = new KOCalCheckButton( mw ); |
334 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); | 334 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); |
335 | cb->setChecked( kkf->isAlarmEnabled ); | 335 | cb->setChecked( kkf->isAlarmEnabled ); |
336 | cb->setNum( kkf->mCalNumber ); | 336 | cb->setNum( kkf->mCalNumber ); |
337 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); | 337 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); |
338 | if ( kkf->mErrorOnLoad ) | 338 | if ( kkf->mErrorOnLoad ) |
339 | cb->setEnabled( false ); | 339 | cb->setEnabled( false ); |
340 | cb = new KOCalCheckButton( mw ); | 340 | cb = new KOCalCheckButton( mw ); |
341 | mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); | 341 | mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); |
342 | cb->setChecked( kkf->isReadOnly ); | 342 | cb->setChecked( kkf->isReadOnly ); |
343 | cb->setNum( kkf->mCalNumber ); | 343 | cb->setNum( kkf->mCalNumber ); |
344 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); | 344 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); |
345 | if ( kkf->mErrorOnLoad ) | 345 | if ( kkf->mErrorOnLoad ) |
346 | cb->setEnabled( false ); | 346 | cb->setEnabled( false ); |
347 | KColorButton *colb = new KColorButton( mw ); | ||
348 | mainLayout->addWidget( colb,row,++iii ); | ||
349 | colb->setID( kkf->mCalNumber ); | ||
350 | colb->setColor( kkf->mDefaultColor ); | ||
351 | connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); | ||
352 | if ( row > 1) { | 347 | if ( row > 1) { |
348 | KColorButton *colb = new KColorButton( mw ); | ||
349 | mainLayout->addWidget( colb,row,++iii ); | ||
350 | colb->setID( kkf->mCalNumber ); | ||
351 | colb->setColor( kkf->mDefaultColor ); | ||
352 | connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); | ||
353 | KOCalButton* calb = new KOCalButton( mw ); | 353 | KOCalButton* calb = new KOCalButton( mw ); |
354 | mainLayout->addWidget( calb,row,++iii ); | 354 | mainLayout->addWidget( calb,row,++iii ); |
355 | calb->setNum( kkf->mCalNumber ); | 355 | calb->setNum( kkf->mCalNumber ); |
356 | calb->setPixmap ( SmallIcon("minus")); | 356 | calb->setPixmap ( SmallIcon("minus")); |
357 | connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); | 357 | connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); |
358 | int hei = calb->sizeHint().height(); | 358 | int hei = calb->sizeHint().height(); |
359 | //calb->setMaximumSize( hei*9/10, hei*9/10 ); | 359 | //calb->setMaximumSize( hei*9/10, hei*9/10 ); |
360 | } | 360 | } |
361 | ++row; | 361 | ++row; |
362 | kkf = KOPrefs::instance()->mCalendars.next(); | 362 | kkf = KOPrefs::instance()->mCalendars.next(); |
363 | } | 363 | } |
364 | lab = new QLabel ( "", mw ); | 364 | lab = new QLabel ( "", mw ); |
365 | mainLayout->addWidget( lab,row,0 ); | 365 | mainLayout->addWidget( lab,row,0 ); |
366 | mw->show(); | 366 | mw->show(); |
367 | 367 | ||
368 | } | 368 | } |
369 | void KOCalEditView::addCal() | 369 | void KOCalEditView::addCal() |
370 | { | 370 | { |
371 | KONewCalPrefs prefs ( this ); | 371 | KONewCalPrefs prefs ( this ); |
372 | if ( ! prefs.exec() ) | 372 | if ( ! prefs.exec() ) |
373 | return; | 373 | return; |
374 | QString name = prefs.calName(); | 374 | QString name = prefs.calName(); |
375 | QString file = prefs.calFileName(); | 375 | QString file = prefs.calFileName(); |
376 | QFileInfo fi ( file ); | 376 | QFileInfo fi ( file ); |
377 | if (!fi.exists() ) { | 377 | if (!fi.exists() ) { |
378 | KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); | 378 | KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); |
379 | return; | 379 | return; |
380 | } | 380 | } |
381 | KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); | 381 | KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); |
382 | kkf->mName = name; | 382 | kkf->mName = name; |
383 | kkf->mFileName = file; | 383 | kkf->mFileName = file; |
384 | emit calendarAdded( kkf->mCalNumber ); | 384 | emit calendarAdded( kkf->mCalNumber ); |
385 | emit needsUpdate(); | 385 | emit needsUpdate(); |
386 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); | 386 | QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); |
387 | } | 387 | } |
388 | void KOCalEditView::enableAll() | 388 | void KOCalEditView::enableAll() |
389 | { | 389 | { |
390 | toggleList( mEnabledB ); | 390 | toggleList( mEnabledB ); |
391 | } | 391 | } |
392 | void KOCalEditView::enableAlarm() | 392 | void KOCalEditView::enableAlarm() |
393 | { | 393 | { |
394 | toggleList( mAlarmB ); | 394 | toggleList( mAlarmB ); |
395 | } | 395 | } |
396 | void KOCalEditView::disableRO() | 396 | void KOCalEditView::disableRO() |
397 | { | 397 | { |
398 | toggleList( mROB ); | 398 | toggleList( mROB ); |
399 | } | 399 | } |
400 | void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list ) | 400 | void KOCalEditView::toggleList ( QPtrList<KOCalCheckButton> list ) |