-rw-r--r-- | korganizer/kofilterview.cpp | 48 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 4 |
2 files changed, 30 insertions, 22 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 3333ac2..52bc463 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp | |||
@@ -145,8 +145,11 @@ void KOFilterView::setSelectedFilter( int fil ) | |||
145 | KOCalEditView::KOCalEditView(QWidget* parent, | 145 | KOCalEditView::KOCalEditView(QWidget* parent, |
146 | const char* name ) | 146 | const char* name ) |
147 | : QWidget(parent,name) | 147 | : QScrollView(parent,name) |
148 | { | 148 | { |
149 | mw = 0; | 149 | mw = 0; |
150 | ml = new QVBoxLayout ( this ); | 150 | setResizePolicy( AutoOneFit ); |
151 | setFrameStyle ( QFrame::Panel | QFrame::Plain ); | ||
152 | setLineWidth ( 1 ); | ||
153 | setMidLineWidth ( 1 ); | ||
151 | } | 154 | } |
152 | 155 | ||
@@ -257,9 +260,10 @@ void KOCalEditView::readConfig() | |||
257 | 260 | ||
258 | if ( mw ) delete mw; | 261 | if ( mw ) delete mw; |
259 | mw = new QWidget ( this ); | 262 | mw = new QWidget ( viewport() ); |
260 | ml->addWidget ( mw ); | 263 | addChild(mw); |
261 | 264 | ||
262 | mainLayout = new QGridLayout ( mw , 2, 8 ); | 265 | mainLayout = new QGridLayout ( mw , 2, 8 ); |
263 | //mainLayout->setSpacing( 3 ); | 266 | mainLayout->setMargin( 3); |
267 | mainLayout->setSpacing( 2); | ||
264 | QPushButton * addBut = new QPushButton ( mw ); | 268 | QPushButton * addBut = new QPushButton ( mw ); |
265 | mainLayout->addWidget( addBut,0,0 ); | 269 | mainLayout->addWidget( addBut,0,0 ); |
@@ -274,9 +278,11 @@ void KOCalEditView::readConfig() | |||
274 | addBut->setMaximumWidth( addBut->sizeHint().height() ); | 278 | addBut->setMaximumWidth( addBut->sizeHint().height() ); |
275 | 279 | ||
276 | QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", mw ); | 280 | QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); |
277 | mainLayout->addWidget( lab,0,2 ); | 281 | mainLayout->addWidget( lab,0,2 ); |
278 | 282 | lab = new QLabel ( i18n(" "), mw ); | |
283 | mainLayout->addWidget( lab,0,3 ); | ||
284 | lab->setFixedWidth( 6 ); | ||
279 | addBut = new QPushButton ( mw ); | 285 | addBut = new QPushButton ( mw ); |
280 | mainLayout->addWidget( addBut,0,3 ); | 286 | mainLayout->addWidget( addBut,0,4 ); |
281 | addBut->setPixmap ( SmallIcon("bell")); | 287 | addBut->setPixmap ( SmallIcon("bell")); |
282 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); | 288 | connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); |
@@ -284,5 +290,5 @@ void KOCalEditView::readConfig() | |||
284 | 290 | ||
285 | addBut = new QPushButton ( mw ); | 291 | addBut = new QPushButton ( mw ); |
286 | mainLayout->addWidget( addBut,0,4 ); | 292 | mainLayout->addWidget( addBut,0,5 ); |
287 | addBut->setPixmap ( SmallIcon("pencil")); | 293 | addBut->setPixmap ( SmallIcon("pencil")); |
288 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); | 294 | connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); |
@@ -290,5 +296,5 @@ void KOCalEditView::readConfig() | |||
290 | 296 | ||
291 | lab = new QLabel ( i18n(" Color "), mw ); | 297 | lab = new QLabel ( i18n(" Color "), mw ); |
292 | mainLayout->addWidget( lab,0,5 ); | 298 | mainLayout->addWidget( lab,0,6 ); |
293 | #if 0 | 299 | #if 0 |
294 | addBut = new QPushButton ( mw ); | 300 | addBut = new QPushButton ( mw ); |
@@ -303,5 +309,5 @@ void KOCalEditView::readConfig() | |||
303 | int row = 1; | 309 | int row = 1; |
304 | while ( kkf ) { | 310 | while ( kkf ) { |
305 | 311 | int iii = 0; | |
306 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); | 312 | KOCalCheckButton* cb = new KOCalCheckButton( mw ); |
307 | mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); | 313 | mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); |
@@ -312,5 +318,5 @@ void KOCalEditView::readConfig() | |||
312 | cb->setEnabled( false ); | 318 | cb->setEnabled( false ); |
313 | cb = new KOCalCheckButton( mw ); | 319 | cb = new KOCalCheckButton( mw ); |
314 | mainLayout->addWidget( cb,row,1 );mEnabledB.append( cb ); | 320 | mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); |
315 | cb->setChecked( kkf->isEnabled ); | 321 | cb->setChecked( kkf->isEnabled ); |
316 | cb->setNum( kkf->mCalNumber ); | 322 | cb->setNum( kkf->mCalNumber ); |
@@ -321,8 +327,10 @@ void KOCalEditView::readConfig() | |||
321 | name->setNum( kkf->mCalNumber ); | 327 | name->setNum( kkf->mCalNumber ); |
322 | name->setText( kkf->mName ); | 328 | name->setText( kkf->mName ); |
323 | mainLayout->addWidget( name,row,2 ); | 329 | mainLayout->addWidget( name,row,++iii ); |
324 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); | 330 | connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); |
331 | lab = new QLabel ( i18n(" "), mw ); | ||
332 | mainLayout->addWidget( lab,row,++iii ); | ||
325 | cb = new KOCalCheckButton( mw ); | 333 | cb = new KOCalCheckButton( mw ); |
326 | mainLayout->addWidget( cb,row,3 );mAlarmB.append( cb ); | 334 | mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); |
327 | cb->setChecked( kkf->isAlarmEnabled ); | 335 | cb->setChecked( kkf->isAlarmEnabled ); |
328 | cb->setNum( kkf->mCalNumber ); | 336 | cb->setNum( kkf->mCalNumber ); |
@@ -331,5 +339,5 @@ void KOCalEditView::readConfig() | |||
331 | cb->setEnabled( false ); | 339 | cb->setEnabled( false ); |
332 | cb = new KOCalCheckButton( mw ); | 340 | cb = new KOCalCheckButton( mw ); |
333 | mainLayout->addWidget( cb,row,4 );mROB.append( cb ); | 341 | mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); |
334 | cb->setChecked( kkf->isReadOnly ); | 342 | cb->setChecked( kkf->isReadOnly ); |
335 | cb->setNum( kkf->mCalNumber ); | 343 | cb->setNum( kkf->mCalNumber ); |
@@ -338,5 +346,5 @@ void KOCalEditView::readConfig() | |||
338 | cb->setEnabled( false ); | 346 | cb->setEnabled( false ); |
339 | KColorButton *colb = new KColorButton( mw ); | 347 | KColorButton *colb = new KColorButton( mw ); |
340 | mainLayout->addWidget( colb,row,5 ); | 348 | mainLayout->addWidget( colb,row,++iii ); |
341 | colb->setID( kkf->mCalNumber ); | 349 | colb->setID( kkf->mCalNumber ); |
342 | colb->setColor( kkf->mDefaultColor ); | 350 | colb->setColor( kkf->mDefaultColor ); |
@@ -344,5 +352,5 @@ void KOCalEditView::readConfig() | |||
344 | if ( row > 1) { | 352 | if ( row > 1) { |
345 | KOCalButton* calb = new KOCalButton( mw ); | 353 | KOCalButton* calb = new KOCalButton( mw ); |
346 | mainLayout->addWidget( calb,row,6 ); | 354 | mainLayout->addWidget( calb,row,++iii ); |
347 | calb->setNum( kkf->mCalNumber ); | 355 | calb->setNum( kkf->mCalNumber ); |
348 | calb->setPixmap ( SmallIcon("minus")); | 356 | calb->setPixmap ( SmallIcon("minus")); |
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 1849e36..e2ebdd4 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h | |||
@@ -26,4 +26,5 @@ | |||
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | #include <qcheckbox.h> | 27 | #include <qcheckbox.h> |
28 | #include <qscrollview.h> | ||
28 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
29 | #include <kconfig.h> | 30 | #include <kconfig.h> |
@@ -111,5 +112,5 @@ class KOFilterView : public KOFilterView_base | |||
111 | }; | 112 | }; |
112 | 113 | ||
113 | class KOCalEditView : public QWidget | 114 | class KOCalEditView : public QScrollView |
114 | { | 115 | { |
115 | Q_OBJECT | 116 | Q_OBJECT |
@@ -142,5 +143,4 @@ class KOCalEditView : public QWidget | |||
142 | 143 | ||
143 | private: | 144 | private: |
144 | QVBoxLayout* ml; | ||
145 | QWidget *mw; | 145 | QWidget *mw; |
146 | void toggleList ( QPtrList<KOCalCheckButton> ); | 146 | void toggleList ( QPtrList<KOCalCheckButton> ); |