summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.cpp
Unidiff
Diffstat (limited to 'korganizer/kofilterview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index d79b28e..2dd4567 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -218,49 +218,49 @@ void KOCalEditView::deleteCal( int id )
218 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 218 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
219 emit removeCalendar ( id ); 219 emit removeCalendar ( id );
220 KOPrefs::instance()->mCalendars.remove ( kkf ); 220 KOPrefs::instance()->mCalendars.remove ( kkf );
221 readConfig(); 221 readConfig();
222} 222}
223void KOCalEditView::infoCal( int id ) 223void KOCalEditView::infoCal( int id )
224{ 224{
225 QString name = KOPrefs::instance()->getCalendar( id )->mName; 225 QString name = KOPrefs::instance()->getCalendar( id )->mName;
226 QString file = KOPrefs::instance()->getCalendar( id )->mFileName; 226 QString file = KOPrefs::instance()->getCalendar( id )->mFileName;
227 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 227 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
228} 228}
229void KOCalEditView::readConfig() 229void KOCalEditView::readConfig()
230{ 230{
231 231
232 mStdandardB.clear(); 232 mStdandardB.clear();
233 mEnabledB.clear(); 233 mEnabledB.clear();
234 mAlarmB.clear(); 234 mAlarmB.clear();
235 mROB.clear(); 235 mROB.clear();
236 236
237 if ( mw ) delete mw; 237 if ( mw ) delete mw;
238 mw = new QWidget ( this ); 238 mw = new QWidget ( this );
239 ml->addWidget ( mw ); 239 ml->addWidget ( mw );
240 240
241 mainLayout = new QGridLayout ( mw , 2, 8 ); 241 mainLayout = new QGridLayout ( mw , 2, 8 );
242 mainLayout->setSpacing( 3 ); 242 //mainLayout->setSpacing( 3 );
243 QPushButton * addBut = new QPushButton ( mw ); 243 QPushButton * addBut = new QPushButton ( mw );
244 mainLayout->addWidget( addBut,0,0 ); 244 mainLayout->addWidget( addBut,0,0 );
245 addBut->setPixmap ( SmallIcon("plus")); 245 addBut->setPixmap ( SmallIcon("plus"));
246 connect(addBut,SIGNAL(clicked()),SLOT(addCal())); 246 connect(addBut,SIGNAL(clicked()),SLOT(addCal()));
247 addBut->setMaximumWidth( addBut->sizeHint().height() ); 247 addBut->setMaximumWidth( addBut->sizeHint().height() );
248 248
249 addBut = new QPushButton ( mw ); 249 addBut = new QPushButton ( mw );
250 mainLayout->addWidget( addBut,0,1 ); 250 mainLayout->addWidget( addBut,0,1 );
251 addBut->setPixmap ( SmallIcon("eye")); 251 addBut->setPixmap ( SmallIcon("eye"));
252 connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); 252 connect(addBut,SIGNAL(clicked()),SLOT(enableAll()));
253 addBut->setMaximumWidth( addBut->sizeHint().height() ); 253 addBut->setMaximumWidth( addBut->sizeHint().height() );
254 254
255 QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", mw ); 255 QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", mw );
256 mainLayout->addWidget( lab,0,2 ); 256 mainLayout->addWidget( lab,0,2 );
257 257
258 addBut = new QPushButton ( mw ); 258 addBut = new QPushButton ( mw );
259 mainLayout->addWidget( addBut,0,3 ); 259 mainLayout->addWidget( addBut,0,3 );
260 addBut->setPixmap ( SmallIcon("bell")); 260 addBut->setPixmap ( SmallIcon("bell"));
261 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); 261 connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm()));
262 addBut->setMaximumWidth( addBut->sizeHint().height() ); 262 addBut->setMaximumWidth( addBut->sizeHint().height() );
263 263
264 addBut = new QPushButton ( mw ); 264 addBut = new QPushButton ( mw );
265 mainLayout->addWidget( addBut,0,4 ); 265 mainLayout->addWidget( addBut,0,4 );
266 addBut->setPixmap ( SmallIcon("pencil")); 266 addBut->setPixmap ( SmallIcon("pencil"));
@@ -298,49 +298,49 @@ void KOCalEditView::readConfig()
298 mainLayout->addWidget( name,row,2 ); 298 mainLayout->addWidget( name,row,2 );
299 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); 299 connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) );
300 cb = new KOCalCheckButton( mw ); 300 cb = new KOCalCheckButton( mw );
301 mainLayout->addWidget( cb,row,3 );mAlarmB.append( cb ); 301 mainLayout->addWidget( cb,row,3 );mAlarmB.append( cb );
302 cb->setChecked( kkf->isAlarmEnabled ); 302 cb->setChecked( kkf->isAlarmEnabled );
303 cb->setNum( kkf->mCalNumber ); 303 cb->setNum( kkf->mCalNumber );
304 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); 304 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) );
305 cb = new KOCalCheckButton( mw ); 305 cb = new KOCalCheckButton( mw );
306 mainLayout->addWidget( cb,row,4 );mROB.append( cb ); 306 mainLayout->addWidget( cb,row,4 );mROB.append( cb );
307 cb->setChecked( kkf->isReadOnly ); 307 cb->setChecked( kkf->isReadOnly );
308 cb->setNum( kkf->mCalNumber ); 308 cb->setNum( kkf->mCalNumber );
309 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); 309 connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) );
310 KColorButton *colb = new KColorButton( mw ); 310 KColorButton *colb = new KColorButton( mw );
311 mainLayout->addWidget( colb,row,5 ); 311 mainLayout->addWidget( colb,row,5 );
312 colb->setID( kkf->mCalNumber ); 312 colb->setID( kkf->mCalNumber );
313 colb->setColor( kkf->mDefaultColor ); 313 colb->setColor( kkf->mDefaultColor );
314 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) ); 314 connect (colb, SIGNAL (changedID(const QColor&, int )), SLOT ( setColor(const QColor&,int) ) );
315 if ( row > 1) { 315 if ( row > 1) {
316 KOCalButton* calb = new KOCalButton( mw ); 316 KOCalButton* calb = new KOCalButton( mw );
317 mainLayout->addWidget( calb,row,6 ); 317 mainLayout->addWidget( calb,row,6 );
318 calb->setNum( kkf->mCalNumber ); 318 calb->setNum( kkf->mCalNumber );
319 calb->setPixmap ( SmallIcon("minus")); 319 calb->setPixmap ( SmallIcon("minus"));
320 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) ); 320 connect (calb, SIGNAL (selectNum(int)), SLOT ( deleteCal(int) ) );
321 int hei = calb->sizeHint().height(); 321 int hei = calb->sizeHint().height();
322 calb->setMaximumSize( hei*9/10, hei*9/10 ); 322 //calb->setMaximumSize( hei*9/10, hei*9/10 );
323 } 323 }
324 ++row; 324 ++row;
325 kkf = KOPrefs::instance()->mCalendars.next(); 325 kkf = KOPrefs::instance()->mCalendars.next();
326 } 326 }
327 lab = new QLabel ( "", mw ); 327 lab = new QLabel ( "", mw );
328 mainLayout->addWidget( lab,row,0 ); 328 mainLayout->addWidget( lab,row,0 );
329 mw->show(); 329 mw->show();
330 330
331} 331}
332void KOCalEditView::addCal() 332void KOCalEditView::addCal()
333{ 333{
334 qDebug("addcal "); 334 qDebug("addcal ");
335 KONewCalPrefs prefs ( this ); 335 KONewCalPrefs prefs ( this );
336 if ( ! prefs.exec() ) 336 if ( ! prefs.exec() )
337 return; 337 return;
338 QString name = prefs.calName(); 338 QString name = prefs.calName();
339 QString file = prefs.calFileName(); 339 QString file = prefs.calFileName();
340 QFileInfo fi ( file ); 340 QFileInfo fi ( file );
341 if (!fi.exists() ) { 341 if (!fi.exists() ) {
342 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!")); 342 KMessageBox::information( this, i18n("File does not exist!\nNo calendar added!"));
343 return; 343 return;
344 } 344 }
345 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar(); 345 KopiCalendarFile * kkf = KOPrefs::instance()->getNewCalendar();
346 kkf->mName = name; 346 kkf->mName = name;