-rw-r--r-- | korganizer/kofilterview.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index bb88386..ea53043 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -220,63 +220,70 @@ void KOCalEditView::infoCal( int id ) | |||
220 | } | 220 | } |
221 | void KOCalEditView::readConfig() | 221 | void KOCalEditView::readConfig() |
222 | { | 222 | { |
223 | 223 | ||
224 | mStdandardB.clear(); | 224 | mStdandardB.clear(); |
225 | mEnabledB.clear(); | 225 | mEnabledB.clear(); |
226 | mAlarmB.clear(); | 226 | mAlarmB.clear(); |
227 | mROB.clear(); | 227 | mROB.clear(); |
228 | 228 | ||
229 | if ( mw ) delete mw; | 229 | if ( mw ) delete mw; |
230 | mw = new QWidget ( viewport() ); | 230 | mw = new QWidget ( viewport() ); |
231 | addChild(mw); | 231 | addChild(mw); |
232 | 232 | int ii = 0; | |
233 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 233 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
234 | mainLayout->setMargin( 3); | 234 | mainLayout->setMargin( 2 ); |
235 | mainLayout->setSpacing( 2); | 235 | mainLayout->setSpacing( 2 ); |
236 | QPushButton * addBut = new QPushButton ( mw ); | 236 | QPushButton * addBut = new QPushButton ( mw ); |
237 | addBut->setFocusPolicy(NoFocus); | 237 | addBut->setFocusPolicy(NoFocus); |
238 | mainLayout->addWidget( addBut,0,0 ); | 238 | mainLayout->addWidget( addBut,0,0 ); |
239 | addBut->setPixmap ( SmallIcon("plus")); | 239 | addBut->setPixmap ( SmallIcon("plus")); |
240 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); | 240 | connect(addBut,SIGNAL(clicked()),SLOT(addCal())); |
241 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 241 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
242 | 242 | int max = addBut->sizeHint().height(); | |
243 | addBut = new QPushButton ( mw ); | 243 | addBut = new QPushButton ( mw ); |
244 | addBut->setFocusPolicy(NoFocus); | 244 | addBut->setFocusPolicy(NoFocus); |
245 | mainLayout->addWidget( addBut,0,1 ); | 245 | mainLayout->addWidget( addBut,0,++ii ); |
246 | addBut->setPixmap ( SmallIcon("eye")); | 246 | addBut->setPixmap ( SmallIcon("eye")); |
247 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); | 247 | connect(addBut,SIGNAL(clicked()),SLOT(enableAll())); |
248 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 248 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
249 | 249 | ||
250 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); | 250 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |
251 | mainLayout->addWidget( lab,0,2 ); | 251 | mainLayout->addWidget( lab,0,++ii ); |
252 | lab = new QLabel ( i18n(" "), mw ); | 252 | //lab = new QLabel ( i18n(" "), mw ); |
253 | mainLayout->addWidget( lab,0,3 ); | 253 | //mainLayout->addWidget( lab,0,++ii ); |
254 | lab->setFixedWidth( 6 ); | 254 | //lab->setFixedWidth( 1 ); |
255 | addBut = new QPushButton ( mw ); | 255 | addBut = new QPushButton ( mw ); |
256 | addBut->setFocusPolicy(NoFocus); | 256 | addBut->setFocusPolicy(NoFocus); |
257 | mainLayout->addWidget( addBut,0,4 ); | 257 | mainLayout->addWidget( addBut,0,++ii ); |
258 | addBut->setPixmap ( SmallIcon("bell")); | 258 | addBut->setPixmap ( SmallIcon("bell")); |
259 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 259 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
260 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 260 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
261 | 261 | ||
262 | addBut = new QPushButton ( mw ); | 262 | addBut = new QPushButton ( mw ); |
263 | addBut->setFocusPolicy(NoFocus); | 263 | addBut->setFocusPolicy(NoFocus); |
264 | mainLayout->addWidget( addBut,0,5 ); | 264 | mainLayout->addWidget( addBut,0,++ii ); |
265 | addBut->setPixmap ( SmallIcon("pencil")); | 265 | addBut->setPixmap ( SmallIcon("pencil")); |
266 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 266 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
267 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 267 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
268 | 268 | ||
269 | lab = new QLabel ( i18n(" Color "), mw ); | 269 | lab = new QLabel ( i18n(" Color "), mw ); |
270 | mainLayout->addWidget( lab,0,6 ); | 270 | mainLayout->addWidget( lab,0,++ii ); |
271 | lab = new QLabel ( "", mw ); | ||
272 | mainLayout->addWidget( lab,0,++ii ); | ||
273 | lab->setMaximumWidth( max+4 ); | ||
274 | lab = new QLabel ( "", mw ); | ||
275 | mainLayout->addWidget( lab,0,++ii ); | ||
276 | |||
277 | |||
271 | #if 0 | 278 | #if 0 |
272 | addBut = new QPushButton ( mw ); | 279 | addBut = new QPushButton ( mw ); |
273 | mainLayout->addWidget( addBut,0,6 ); | 280 | mainLayout->addWidget( addBut,0,6 ); |
274 | addBut->setPixmap ( SmallIcon("minus")); | 281 | addBut->setPixmap ( SmallIcon("minus")); |
275 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); | 282 | connect(addBut,SIGNAL(clicked()),SLOT(deleteAll())); |
276 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 283 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
277 | #endif | 284 | #endif |
278 | 285 | ||
279 | 286 | ||
280 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | 287 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); |
281 | int row = 1; | 288 | int row = 1; |
282 | while ( kkf ) { | 289 | while ( kkf ) { |
@@ -291,26 +298,26 @@ void KOCalEditView::readConfig() | |||
291 | cb = new KOCalCheckButton( mw ); | 298 | cb = new KOCalCheckButton( mw ); |
292 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); | 299 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); |
293 | cb->setChecked( kkf->isEnabled ); | 300 | cb->setChecked( kkf->isEnabled ); |
294 | cb->setNum( kkf->mCalNumber ); | 301 | cb->setNum( kkf->mCalNumber ); |
295 | if ( kkf->mErrorOnLoad ) | 302 | if ( kkf->mErrorOnLoad ) |
296 | cb->setEnabled( false ); | 303 | cb->setEnabled( false ); |
297 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); | 304 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCal(int,bool) ) ); |
298 | KOCalButton* name = new KOCalButton( mw ); | 305 | KOCalButton* name = new KOCalButton( mw ); |
299 | name->setNum( kkf->mCalNumber ); | 306 | name->setNum( kkf->mCalNumber ); |
300 | name->setText( kkf->mName ); | 307 | name->setText( kkf->mName ); |
301 | mainLayout->addWidget( name,row,++iii ); | 308 | mainLayout->addWidget( name,row,++iii ); |
302 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); | 309 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); |
303 | lab = new QLabel ( i18n(" "), mw ); | 310 | //lab = new QLabel (" ", mw ); |
304 | mainLayout->addWidget( lab,row,++iii ); | 311 | //mainLayout->addWidget( lab,row,++iii ); |
305 | cb = new KOCalCheckButton( mw ); | 312 | cb = new KOCalCheckButton( mw ); |
306 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); | 313 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); |
307 | cb->setChecked( kkf->isAlarmEnabled ); | 314 | cb->setChecked( kkf->isAlarmEnabled ); |
308 | cb->setNum( kkf->mCalNumber ); | 315 | cb->setNum( kkf->mCalNumber ); |
309 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); | 316 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectCalAlarm(int,bool) ) ); |
310 | if ( kkf->mErrorOnLoad ) | 317 | if ( kkf->mErrorOnLoad ) |
311 | cb->setEnabled( false ); | 318 | cb->setEnabled( false ); |
312 | cb = new KOCalCheckButton( mw ); | 319 | cb = new KOCalCheckButton( mw ); |
313 | mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); | 320 | mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); |
314 | cb->setChecked( kkf->isReadOnly ); | 321 | cb->setChecked( kkf->isReadOnly ); |
315 | cb->setNum( kkf->mCalNumber ); | 322 | cb->setNum( kkf->mCalNumber ); |
316 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); | 323 | connect (cb, SIGNAL (selectNum(int,bool)), SLOT ( selectReadOnly(int,bool) ) ); |