-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 ) KOCalEditView::KOCalEditView(QWidget* parent, const char* name ) - : QWidget(parent,name) + : QScrollView(parent,name) { - mw = 0; - ml = new QVBoxLayout ( this ); + mw = 0; + setResizePolicy( AutoOneFit ); + setFrameStyle ( QFrame::Panel | QFrame::Plain ); + setLineWidth ( 1 ); + setMidLineWidth ( 1 ); } @@ -257,9 +260,10 @@ void KOCalEditView::readConfig() if ( mw ) delete mw; - mw = new QWidget ( this ); - ml->addWidget ( mw ); + mw = new QWidget ( viewport() ); + addChild(mw); - mainLayout = new QGridLayout ( mw , 2, 8 ); - //mainLayout->setSpacing( 3 ); + mainLayout = new QGridLayout ( mw , 2, 8 ); + mainLayout->setMargin( 3); + mainLayout->setSpacing( 2); QPushButton * addBut = new QPushButton ( mw ); mainLayout->addWidget( addBut,0,0 ); @@ -274,9 +278,11 @@ void KOCalEditView::readConfig() addBut->setMaximumWidth( addBut->sizeHint().height() ); - QLabel* lab = new QLabel ( " "+i18n("Calendar")+" ", mw ); - mainLayout->addWidget( lab,0,2 ); - + QLabel* lab = new QLabel (i18n(" Calendar \n Resource "), mw ); + mainLayout->addWidget( lab,0,2 ); + lab = new QLabel ( i18n(" "), mw ); + mainLayout->addWidget( lab,0,3 ); + lab->setFixedWidth( 6 ); addBut = new QPushButton ( mw ); - mainLayout->addWidget( addBut,0,3 ); + mainLayout->addWidget( addBut,0,4 ); addBut->setPixmap ( SmallIcon("bell")); connect(addBut,SIGNAL(clicked()),SLOT(enableAlarm())); @@ -284,5 +290,5 @@ void KOCalEditView::readConfig() addBut = new QPushButton ( mw ); - mainLayout->addWidget( addBut,0,4 ); + mainLayout->addWidget( addBut,0,5 ); addBut->setPixmap ( SmallIcon("pencil")); connect(addBut,SIGNAL(clicked()),SLOT(disableRO())); @@ -290,5 +296,5 @@ void KOCalEditView::readConfig() lab = new QLabel ( i18n(" Color "), mw ); - mainLayout->addWidget( lab,0,5 ); + mainLayout->addWidget( lab,0,6 ); #if 0 addBut = new QPushButton ( mw ); @@ -303,5 +309,5 @@ void KOCalEditView::readConfig() int row = 1; while ( kkf ) { - + int iii = 0; KOCalCheckButton* cb = new KOCalCheckButton( mw ); mainLayout->addWidget( cb,row,0 );mStdandardB.append( cb ); @@ -312,5 +318,5 @@ void KOCalEditView::readConfig() cb->setEnabled( false ); cb = new KOCalCheckButton( mw ); - mainLayout->addWidget( cb,row,1 );mEnabledB.append( cb ); + mainLayout->addWidget( cb,row,++iii );mEnabledB.append( cb ); cb->setChecked( kkf->isEnabled ); cb->setNum( kkf->mCalNumber ); @@ -321,8 +327,10 @@ void KOCalEditView::readConfig() name->setNum( kkf->mCalNumber ); name->setText( kkf->mName ); - mainLayout->addWidget( name,row,2 ); + mainLayout->addWidget( name,row,++iii ); connect (name, SIGNAL (selectNum(int)), SLOT ( infoCal(int) ) ); + lab = new QLabel ( i18n(" "), mw ); + mainLayout->addWidget( lab,row,++iii ); cb = new KOCalCheckButton( mw ); - mainLayout->addWidget( cb,row,3 );mAlarmB.append( cb ); + mainLayout->addWidget( cb,row,++iii );mAlarmB.append( cb ); cb->setChecked( kkf->isAlarmEnabled ); cb->setNum( kkf->mCalNumber ); @@ -331,5 +339,5 @@ void KOCalEditView::readConfig() cb->setEnabled( false ); cb = new KOCalCheckButton( mw ); - mainLayout->addWidget( cb,row,4 );mROB.append( cb ); + mainLayout->addWidget( cb,row,++iii );mROB.append( cb ); cb->setChecked( kkf->isReadOnly ); cb->setNum( kkf->mCalNumber ); @@ -338,5 +346,5 @@ void KOCalEditView::readConfig() cb->setEnabled( false ); KColorButton *colb = new KColorButton( mw ); - mainLayout->addWidget( colb,row,5 ); + mainLayout->addWidget( colb,row,++iii ); colb->setID( kkf->mCalNumber ); colb->setColor( kkf->mDefaultColor ); @@ -344,5 +352,5 @@ void KOCalEditView::readConfig() if ( row > 1) { KOCalButton* calb = new KOCalButton( mw ); - mainLayout->addWidget( calb,row,6 ); + mainLayout->addWidget( calb,row,++iii ); calb->setNum( kkf->mCalNumber ); 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 @@ #include <qstring.h> #include <qcheckbox.h> +#include <qscrollview.h> #include <qpushbutton.h> #include <kconfig.h> @@ -111,5 +112,5 @@ class KOFilterView : public KOFilterView_base }; -class KOCalEditView : public QWidget +class KOCalEditView : public QScrollView { Q_OBJECT @@ -142,5 +143,4 @@ class KOCalEditView : public QWidget private: - QVBoxLayout* ml; QWidget *mw; void toggleList ( QPtrList<KOCalCheckButton> ); |