Diffstat (limited to 'core/pim/today/plugins/todolist/todopluginconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.cpp | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index 2d8f1b6..69ad727 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp @@ -21,2 +21,3 @@ #include <qlayout.h> +#include <qhbox.h> #include <qtoolbutton.h> @@ -25,2 +26,3 @@ + TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) @@ -29,20 +31,23 @@ TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) QVBoxLayout * layout = new QVBoxLayout( this ); + layout->setMargin( 20 ); - QFrame* Frame9 = new QFrame( this, "Frame9" ); - Frame9->setGeometry( QRect( -5, 0, 230, 310 ) ); - Frame9->setFrameShape( QFrame::StyledPanel ); - Frame9->setFrameShadow( QFrame::Raised ); + QHBox *box1 = new QHBox( this ); - QLabel* TextLabel6 = new QLabel( Frame9, "TextLabel6" ); - TextLabel6->setGeometry( QRect( 20, 10, 100, 60 ) ); - TextLabel6->setText( tr( "How many\n" - "tasks should \n" + QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); + TextLabel6->setText( tr( "How many\n tasks should \n" "be shown?" ) ); - SpinBox2 = new QSpinBox( Frame9, "SpinBox2" ); - SpinBox2->setGeometry( QRect( 115, 20, 58, 25 ) ); - SpinBox2->setMaxValue( 20 ); - SpinBox2->setValue( 5 ); + SpinBox2 = new QSpinBox( box1, "SpinBox2" ); + SpinBox2->setMaxValue( 40 ); + + QHBox *box2 = new QHBox( this ); + + QLabel* clipLabel = new QLabel( box2, "" ); + clipLabel->setText( tr( "Clip line after\n X chars" ) ); + + SpinBoxClip = new QSpinBox( box2, "SpinClip" ); + SpinBoxClip->setMaxValue( 200 ); - layout->addWidget( Frame9 ); + layout->addWidget( box1 ); + layout->addWidget( box2 ); @@ -56,2 +61,4 @@ void TodolistPluginConfig::readConfig() { SpinBox2->setValue( m_max_lines_task ); + m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); + SpinBoxClip->setValue( m_maxCharClip ); } @@ -64,2 +71,4 @@ void TodolistPluginConfig::writeConfig() { cfg.writeEntry( "maxlinestask", m_max_lines_task ); + m_maxCharClip = SpinBoxClip->value(); + cfg.writeEntry( "maxcharclip", m_maxCharClip ); cfg.write(); |