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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index da81600..2d8f1b6 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp | |||
@@ -5,65 +5,66 @@ | |||
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todopluginconfig.h" | 17 | #include "todopluginconfig.h" |
18 | 18 | ||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qtoolbutton.h> | 22 | #include <qtoolbutton.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | 24 | ||
25 | 25 | ||
26 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | 26 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) |
27 | : ConfigWidget(parent, name ) { | 27 | : ConfigWidget(parent, name ) { |
28 | 28 | ||
29 | QVBoxLayout * layout = new QVBoxLayout( this ); | 29 | QVBoxLayout * layout = new QVBoxLayout( this ); |
30 | 30 | ||
31 | QFrame* Frame9 = new QFrame( this, "Frame9" ); | 31 | QFrame* Frame9 = new QFrame( this, "Frame9" ); |
32 | Frame9->setGeometry( QRect( -5, 0, 230, 310 ) ); | 32 | Frame9->setGeometry( QRect( -5, 0, 230, 310 ) ); |
33 | Frame9->setFrameShape( QFrame::StyledPanel ); | 33 | Frame9->setFrameShape( QFrame::StyledPanel ); |
34 | Frame9->setFrameShadow( QFrame::Raised ); | 34 | Frame9->setFrameShadow( QFrame::Raised ); |
35 | 35 | ||
36 | QLabel* TextLabel6 = new QLabel( Frame9, "TextLabel6" ); | 36 | QLabel* TextLabel6 = new QLabel( Frame9, "TextLabel6" ); |
37 | TextLabel6->setGeometry( QRect( 20, 10, 100, 60 ) ); | 37 | TextLabel6->setGeometry( QRect( 20, 10, 100, 60 ) ); |
38 | TextLabel6->setText( tr( "How many\n" | 38 | TextLabel6->setText( tr( "How many\n" |
39 | "tasks should \n" | 39 | "tasks should \n" |
40 | "be shown?" ) ); | 40 | "be shown?" ) ); |
41 | 41 | ||
42 | SpinBox2 = new QSpinBox( Frame9, "SpinBox2" ); | 42 | SpinBox2 = new QSpinBox( Frame9, "SpinBox2" ); |
43 | SpinBox2->setGeometry( QRect( 115, 20, 58, 25 ) ); | 43 | SpinBox2->setGeometry( QRect( 115, 20, 58, 25 ) ); |
44 | SpinBox2->setMaxValue( 20 ); | 44 | SpinBox2->setMaxValue( 20 ); |
45 | SpinBox2->setValue( 5 ); | 45 | SpinBox2->setValue( 5 ); |
46 | 46 | ||
47 | layout->addWidget( Frame9 ); | 47 | layout->addWidget( Frame9 ); |
48 | 48 | ||
49 | readConfig(); | 49 | readConfig(); |
50 | } | 50 | } |
51 | 51 | ||
52 | void TodolistPluginConfig::readConfig() { | 52 | void TodolistPluginConfig::readConfig() { |
53 | Config cfg( "todaydatebookplugin" ); | 53 | Config cfg( "todaytodoplugin" ); |
54 | cfg.setGroup( "config" ); | 54 | cfg.setGroup( "config" ); |
55 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); | 55 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); |
56 | SpinBox2->setValue( m_max_lines_task ); | 56 | SpinBox2->setValue( m_max_lines_task ); |
57 | } | 57 | } |
58 | 58 | ||
59 | 59 | ||
60 | void TodolistPluginConfig::writeConfig() { | 60 | void TodolistPluginConfig::writeConfig() { |
61 | Config cfg( "todaydatebookplugin" ); | 61 | Config cfg( "todaytodoplugin" ); |
62 | cfg.setGroup( "config" ); | 62 | cfg.setGroup( "config" ); |
63 | m_max_lines_task = SpinBox2->value(); | ||
63 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 64 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
64 | cfg.write(); | 65 | cfg.write(); |
65 | } | 66 | } |
66 | 67 | ||
67 | 68 | ||
68 | TodolistPluginConfig::~TodolistPluginConfig() { | 69 | TodolistPluginConfig::~TodolistPluginConfig() { |
69 | } | 70 | } |