Diffstat (limited to 'core/pim/today/plugins/addressbook') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginconfig.cpp | 1 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginwidget.cpp | 8 |
2 files changed, 0 insertions, 9 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 8863192..8c55937 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp | |||
@@ -1,73 +1,72 @@ | |||
1 | /* | 1 | /* |
2 | * addresspluginconfig.cpp | 2 | * addresspluginconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2003 by Stefan Eilers | 4 | * copyright : (c) 2003 by Stefan Eilers |
5 | * email : eilers.stefan@epost.de | 5 | * email : eilers.stefan@epost.de |
6 | * | 6 | * |
7 | * This implementation was derived from the todolist plugin implementation | 7 | * This implementation was derived from the todolist plugin implementation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #include "addresspluginconfig.h" | 19 | #include "addresspluginconfig.h" |
20 | 20 | ||
21 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | 22 | ||
23 | #include <qlayout.h> | 23 | #include <qlayout.h> |
24 | #include <qhbox.h> | 24 | #include <qhbox.h> |
25 | #include <qtoolbutton.h> | ||
26 | #include <qlabel.h> | 25 | #include <qlabel.h> |
27 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
28 | #include <qvgroupbox.h> | 27 | #include <qvgroupbox.h> |
29 | 28 | ||
30 | 29 | ||
31 | AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name) | 30 | AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name) |
32 | : TodayConfigWidget(parent, name ) { | 31 | : TodayConfigWidget(parent, name ) { |
33 | 32 | ||
34 | QVBoxLayout * layout = new QVBoxLayout( this ); | 33 | QVBoxLayout * layout = new QVBoxLayout( this ); |
35 | layout->setMargin( 20 ); | 34 | layout->setMargin( 20 ); |
36 | 35 | ||
37 | #if 0 | 36 | #if 0 |
38 | // Informational stuff | 37 | // Informational stuff |
39 | QHBox *box4 = new QHBox( this ); | 38 | QHBox *box4 = new QHBox( this ); |
40 | QLabel* colorLabel = new QLabel( box4, "" ); | 39 | QLabel* colorLabel = new QLabel( box4, "" ); |
41 | colorLabel->setText( tr( "To activate settings: Restart application !" ) ); | 40 | colorLabel->setText( tr( "To activate settings: Restart application !" ) ); |
42 | #endif | 41 | #endif |
43 | 42 | ||
44 | // Buttongroup to enable/disable shown stuff | 43 | // Buttongroup to enable/disable shown stuff |
45 | QVGroupBox* b_group = new QVGroupBox( this, "name" ); | 44 | QVGroupBox* b_group = new QVGroupBox( this, "name" ); |
46 | b_group -> setTitle( tr("Enable/Disable Views") ); | 45 | b_group -> setTitle( tr("Enable/Disable Views") ); |
47 | m_showBirthdayButton = new QRadioButton( b_group ); | 46 | m_showBirthdayButton = new QRadioButton( b_group ); |
48 | m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); | 47 | m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); |
49 | m_showAnniversaryButton = new QRadioButton( b_group ); | 48 | m_showAnniversaryButton = new QRadioButton( b_group ); |
50 | m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); | 49 | m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); |
51 | 50 | ||
52 | QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) ); | 51 | QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) ); |
53 | QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) ); | 52 | QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) ); |
54 | 53 | ||
55 | // Max lines settings | 54 | // Max lines settings |
56 | QHBox *box1 = new QHBox( this ); | 55 | QHBox *box1 = new QHBox( this ); |
57 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | 56 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); |
58 | TextLabel6->setText( tr( "Max Lines: " ) ); | 57 | TextLabel6->setText( tr( "Max Lines: " ) ); |
59 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | 58 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); |
60 | SpinBox2->setMaxValue( 40 ); | 59 | SpinBox2->setMaxValue( 40 ); |
61 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) ); | 60 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) ); |
62 | 61 | ||
63 | #if 0 | 62 | #if 0 |
64 | // Clip settings (currently not used) | 63 | // Clip settings (currently not used) |
65 | QHBox *box2 = new QHBox( this ); | 64 | QHBox *box2 = new QHBox( this ); |
66 | QLabel* clipLabel = new QLabel( box2, "" ); | 65 | QLabel* clipLabel = new QLabel( box2, "" ); |
67 | clipLabel->setText( tr( "Clip line after X chars: " ) ); | 66 | clipLabel->setText( tr( "Clip line after X chars: " ) ); |
68 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 67 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); |
69 | SpinBoxClip->setMaxValue( 200 ); | 68 | SpinBoxClip->setMaxValue( 200 ); |
70 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | 69 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); |
71 | #endif | 70 | #endif |
72 | 71 | ||
73 | // Look ahead settings | 72 | // Look ahead settings |
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index d47bc0b..c8652f3 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp | |||
@@ -1,78 +1,70 @@ | |||
1 | /* | 1 | /* |
2 | * addresspluginwidget.cpp | 2 | * addresspluginwidget.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2003 by Stefan Eilers | 4 | * copyright : (c) 2003 by Stefan Eilers |
5 | * email : eilers.stefan@epost.de | 5 | * email : eilers.stefan@epost.de |
6 | * | 6 | * |
7 | * This implementation was derived from the todolist plugin implementation | 7 | * This implementation was derived from the todolist plugin implementation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*************************************************************************** | 10 | /*************************************************************************** |
11 | * * | 11 | * * |
12 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 14 | * the Free Software Foundation; either version 2 of the License, or * |
15 | * (at your option) any later version. * | 15 | * (at your option) any later version. * |
16 | * * | 16 | * * |
17 | ***************************************************************************/ | 17 | ***************************************************************************/ |
18 | 18 | ||
19 | #include "addresspluginwidget.h" | 19 | #include "addresspluginwidget.h" |
20 | 20 | ||
21 | #include <qvaluelist.h> | ||
22 | #include <qtl.h> | ||
23 | #include <qstring.h> | ||
24 | #include <qscrollview.h> | ||
25 | #include <qobject.h> | ||
26 | #include <qdatetime.h> | ||
27 | 21 | ||
28 | #include <qpe/config.h> | 22 | #include <qpe/config.h> |
29 | #include <qpe/timestring.h> | ||
30 | #include <qpe/qcopenvelope_qws.h> | ||
31 | 23 | ||
32 | #include <opie/ocontact.h> | 24 | #include <opie/ocontact.h> |
33 | 25 | ||
34 | AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name ) | 26 | AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name ) |
35 | : QWidget( parent, name ) { | 27 | : QWidget( parent, name ) { |
36 | 28 | ||
37 | addressLabel = 0l; | 29 | addressLabel = 0l; |
38 | m_contactdb = 0l; | 30 | m_contactdb = 0l; |
39 | layoutTodo = 0l; | 31 | layoutTodo = 0l; |
40 | 32 | ||
41 | // Hä ? Nonsense ! (se) | 33 | // Hä ? Nonsense ! (se) |
42 | if ( m_contactdb ) { | 34 | if ( m_contactdb ) { |
43 | delete m_contactdb; | 35 | delete m_contactdb; |
44 | } | 36 | } |
45 | 37 | ||
46 | m_contactdb = new OContactAccess("addressplugin"); | 38 | m_contactdb = new OContactAccess("addressplugin"); |
47 | 39 | ||
48 | connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ), | 40 | connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ), |
49 | this, SLOT( refresh( const OContactAccess * ) ) ); | 41 | this, SLOT( refresh( const OContactAccess * ) ) ); |
50 | 42 | ||
51 | 43 | ||
52 | readConfig(); | 44 | readConfig(); |
53 | getAddress(); | 45 | getAddress(); |
54 | } | 46 | } |
55 | 47 | ||
56 | AddressBookPluginWidget::~AddressBookPluginWidget() { | 48 | AddressBookPluginWidget::~AddressBookPluginWidget() { |
57 | delete m_contactdb; | 49 | delete m_contactdb; |
58 | } | 50 | } |
59 | 51 | ||
60 | void AddressBookPluginWidget::refresh( const OContactAccess* ) | 52 | void AddressBookPluginWidget::refresh( const OContactAccess* ) |
61 | { | 53 | { |
62 | qWarning(" AddressBookPluginWidget::Database was changed externally ! "); | 54 | qWarning(" AddressBookPluginWidget::Database was changed externally ! "); |
63 | m_contactdb->reload(); | 55 | m_contactdb->reload(); |
64 | getAddress(); | 56 | getAddress(); |
65 | } | 57 | } |
66 | 58 | ||
67 | void AddressBookPluginWidget::reinitialize() { | 59 | void AddressBookPluginWidget::reinitialize() { |
68 | readConfig(); | 60 | readConfig(); |
69 | getAddress(); | 61 | getAddress(); |
70 | } | 62 | } |
71 | 63 | ||
72 | void AddressBookPluginWidget::readConfig() { | 64 | void AddressBookPluginWidget::readConfig() { |
73 | Config cfg( "todayaddressplugin" ); | 65 | Config cfg( "todayaddressplugin" ); |
74 | cfg.setGroup( "config" ); | 66 | cfg.setGroup( "config" ); |
75 | m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); | 67 | m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); |
76 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 68 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
77 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); | 69 | m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); |
78 | m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); | 70 | m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); |