summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
authoreilers <eilers>2003-01-03 13:15:30 (UTC)
committer eilers <eilers>2003-01-03 13:15:30 (UTC)
commit19ee7f3b3e06fcf434dcd6a104e912b12220af3b (patch) (unidiff)
treebf813eecb39d52da95591b561e9bd1c3cc329432 /core/pim/today/plugins/addressbook/addresspluginconfig.cpp
parent54ebecbfd86a9ce6782dc55dad7ae15c73adef21 (diff)
downloadopie-19ee7f3b3e06fcf434dcd6a104e912b12220af3b.zip
opie-19ee7f3b3e06fcf434dcd6a104e912b12220af3b.tar.gz
opie-19ee7f3b3e06fcf434dcd6a104e912b12220af3b.tar.bz2
NEW: This plugin shows the next birthdays and anniversaries for the next
n days !
Diffstat (limited to 'core/pim/today/plugins/addressbook/addresspluginconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.cpp97
1 files changed, 97 insertions, 0 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
new file mode 100644
index 0000000..686d72c
--- a/dev/null
+++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
@@ -0,0 +1,97 @@
1/*
2 * addresspluginconfig.cpp
3 *
4 * copyright : (c) 2003 by Stefan Eilers
5 * email : eilers.stefan@epost.de
6 *
7 * This implementation was derived from the todolist plugin implementation
8 *
9 */
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#include "addresspluginconfig.h"
20
21#include <qpe/config.h>
22
23#include <qlayout.h>
24#include <qhbox.h>
25#include <qtoolbutton.h>
26#include <qlabel.h>
27#include <qwhatsthis.h>
28
29
30
31AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name)
32 : TodayConfigWidget(parent, name ) {
33
34 QVBoxLayout * layout = new QVBoxLayout( this );
35 layout->setMargin( 20 );
36
37 QHBox *box1 = new QHBox( this );
38
39 QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" );
40 TextLabel6->setText( tr( "Max Lines " ) );
41
42 SpinBox2 = new QSpinBox( box1, "SpinBox2" );
43 SpinBox2->setMaxValue( 40 );
44 QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each" ) );
45
46 QHBox *box2 = new QHBox( this );
47
48 QLabel* clipLabel = new QLabel( box2, "" );
49 clipLabel->setText( tr( "Clip line after X chars" ) );
50
51 SpinBoxClip = new QSpinBox( box2, "SpinClip" );
52 SpinBoxClip->setMaxValue( 200 );
53 QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) );
54
55 QHBox *box3 = new QHBox( this );
56
57 QLabel* daysLabel = new QLabel( box3, "" );
58 daysLabel->setText( tr( "Days look ahead" ) );
59
60 SpinDaysClip = new QSpinBox( box3, "SpinDays" );
61 SpinDaysClip->setMaxValue( 200 );
62 QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) );
63
64 layout->addWidget( box1 );
65 layout->addWidget( box2 );
66 layout->addWidget( box3 );
67
68 readConfig();
69}
70
71void AddressBookPluginConfig::readConfig() {
72 Config cfg( "todayaddressplugin" );
73 cfg.setGroup( "config" );
74 m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 );
75 SpinBox2->setValue( m_max_lines_task );
76 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
77 SpinBoxClip->setValue( m_maxCharClip );
78 m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 );
79 SpinDaysClip->setValue( m_daysLookAhead );
80}
81
82
83void AddressBookPluginConfig::writeConfig() {
84 Config cfg( "todayaddressplugin" );
85 cfg.setGroup( "config" );
86 m_max_lines_task = SpinBox2->value();
87 cfg.writeEntry( "maxlinestask", m_max_lines_task );
88 m_maxCharClip = SpinBoxClip->value();
89 cfg.writeEntry( "maxcharclip", m_maxCharClip );
90 m_daysLookAhead = SpinDaysClip->value();
91 cfg.writeEntry( "dayslookahead", m_daysLookAhead );
92 cfg.write();
93}
94
95
96AddressBookPluginConfig::~AddressBookPluginConfig() {
97}