author | llornkcor <llornkcor> | 2003-11-05 10:50:43 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-11-05 10:50:43 (UTC) |
commit | 7f271d89922254226280f039ae53c5fee63ef94d (patch) (unidiff) | |
tree | 796b3b98bc7978bf460181d31032c78c0ea5bc51 /core/pim/today/plugins/todolist/todopluginconfig.cpp | |
parent | 8ae3f2f96308505b3a02f5acfedfd45a01fefe1c (diff) | |
download | opie-7f271d89922254226280f039ae53c5fee63ef94d.zip opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.gz opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.bz2 |
fix compile. probably wont work. who knows.
Diffstat (limited to 'core/pim/today/plugins/todolist/todopluginconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.cpp | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index c83f83b..4821776 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp | |||
@@ -19,39 +19,17 @@ | |||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | ||
23 | #include <qlabel.h> | ||
24 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
25 | 23 | ||
26 | 24 | ||
27 | |||
28 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | 25 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) |
29 | : TodayConfigWidget(parent, name ) { | 26 | : TodayConfigWidget(parent, name ) { |
30 | 27 | ||
31 | QVBoxLayout * layout = new QVBoxLayout( this ); | 28 | QVBoxLayout * layout = new QVBoxLayout( this ); |
32 | layout->setMargin( 20 ); | ||
33 | |||
34 | QHBox *box1 = new QHBox( this ); | ||
35 | |||
36 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | ||
37 | TextLabel6->setText( tr( "tasks shown " ) ); | ||
38 | |||
39 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | ||
40 | SpinBox2->setMaxValue( 40 ); | ||
41 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); | ||
42 | |||
43 | |||
44 | |||
45 | QHBox *box2 = new QHBox( this ); | ||
46 | 29 | ||
47 | QLabel* clipLabel = new QLabel( box2, "" ); | 30 | m_gui = new TodoPluginConfigBase( this ); |
48 | clipLabel->setText( tr( "Clip line after X chars" ) ); | ||
49 | 31 | ||
50 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 32 | layout->addWidget( m_gui ); |
51 | SpinBoxClip->setMaxValue( 200 ); | ||
52 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | ||
53 | layout->addWidget( box1 ); | ||
54 | layout->addWidget( box2 ); | ||
55 | 33 | ||
56 | readConfig(); | 34 | readConfig(); |
57 | } | 35 | } |
@@ -60,18 +38,18 @@ void TodolistPluginConfig::readConfig() { | |||
60 | Config cfg( "todaytodoplugin" ); | 38 | Config cfg( "todaytodoplugin" ); |
61 | cfg.setGroup( "config" ); | 39 | cfg.setGroup( "config" ); |
62 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); | 40 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); |
63 | SpinBox2->setValue( m_max_lines_task ); | 41 | m_gui->SpinBox2->setValue( m_max_lines_task ); |
64 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 42 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
65 | SpinBoxClip->setValue( m_maxCharClip ); | 43 | m_gui->SpinBoxClip->setValue( m_maxCharClip ); |
66 | } | 44 | } |
67 | 45 | ||
68 | 46 | ||
69 | void TodolistPluginConfig::writeConfig() { | 47 | void TodolistPluginConfig::writeConfig() { |
70 | Config cfg( "todaytodoplugin" ); | 48 | Config cfg( "todaytodoplugin" ); |
71 | cfg.setGroup( "config" ); | 49 | cfg.setGroup( "config" ); |
72 | m_max_lines_task = SpinBox2->value(); | 50 | m_max_lines_task = m_gui->SpinBox2->value(); |
73 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 51 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
74 | m_maxCharClip = SpinBoxClip->value(); | 52 | m_maxCharClip = m_gui->SpinBoxClip->value(); |
75 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); | 53 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); |
76 | cfg.write(); | 54 | cfg.write(); |
77 | } | 55 | } |