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