summaryrefslogtreecommitdiff
authordrw <drw>2004-03-25 23:00:40 (UTC)
committer drw <drw>2004-03-25 23:00:40 (UTC)
commit03091cd727701bdb2aa6ac623cd606131546d686 (patch) (unidiff)
tree76b818f6893fd0030071427d5a1efb0273921195
parentad160e97db39536ac42acdd3f2f98d1e49ae1f75 (diff)
downloadopie-03091cd727701bdb2aa6ac623cd606131546d686.zip
opie-03091cd727701bdb2aa6ac623cd606131546d686.tar.gz
opie-03091cd727701bdb2aa6ac623cd606131546d686.tar.bz2
libopie -> libopie2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addressbook.pro10
-rw-r--r--core/pim/today/plugins/addressbook/addressplugin.h12
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.cpp10
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginconfig.h12
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginimpl.h2
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp92
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.h16
-rw-r--r--core/pim/today/plugins/addressbook/config.in2
-rw-r--r--core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control2
9 files changed, 79 insertions, 79 deletions
diff --git a/core/pim/today/plugins/addressbook/addressbook.pro b/core/pim/today/plugins/addressbook/addressbook.pro
index cf0ff97..e65f31e 100644
--- a/core/pim/today/plugins/addressbook/addressbook.pro
+++ b/core/pim/today/plugins/addressbook/addressbook.pro
@@ -1,21 +1,21 @@
1TEMPLATE = lib 1TEMPLATE = lib
2CONFIG -= moc 2CONFIG -= moc
3CONFIG += qt plugin release 3CONFIG += qt plugin release
4 4
5# Input 5# Input
6HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ 6HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \
7 addresspluginwidget.h 7 addresspluginwidget.h
8SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ 8SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \
9 addresspluginwidget.cpp 9 addresspluginwidget.cpp
10 10
11INCLUDEPATH += $(OPIEDIR)/include \ 11INCLUDEPATH += $(OPIEDIR)/include \
12 ../ ../library 12 ../ ../library
13DEPENDPATH += $(OPIEDIR)/include \ 13DEPENDPATH += $(OPIEDIR)/include \
14 ../ ../library 14 ../ ../library
15 15
16LIBS+= -lqpe -lopie 16LIBS+= -lqpe -lopiecore2 -lopieui2 -lopiepim2 -lopiedb2 -lqtaux2
17 17
18DESTDIR = $(OPIEDIR)/plugins/today 18DESTDIR = $(OPIEDIR)/plugins/today
19TARGET = todayaddressbookplugin 19TARGET = todayaddressbookplugin
20 20
21include ( $(OPIEDIR)/include.pro ) 21include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/addressbook/addressplugin.h b/core/pim/today/plugins/addressbook/addressplugin.h
index 0b3b065..e664d5f 100644
--- a/core/pim/today/plugins/addressbook/addressplugin.h
+++ b/core/pim/today/plugins/addressbook/addressplugin.h
@@ -1,51 +1,51 @@
1/* 1/*
2 * addressplugin.h 2 * addressplugin.h
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#ifndef ADDRESSBOOK_PLUGIN_H 19#ifndef ADDRESSBOOK_PLUGIN_H
20#define ADDRESSBOOK_PLUGIN_H 20#define ADDRESSBOOK_PLUGIN_H
21 21
22#include <qstring.h> 22#include "addresspluginwidget.h"
23#include <qwidget.h>
24 23
25#include <opie/oclickablelabel.h> 24#include <opie2/oclickablelabel.h>
26#include <opie/todayplugininterface.h> 25#include <opie2/todayplugininterface.h>
27 26
28#include "addresspluginwidget.h" 27#include <qstring.h>
28#include <qwidget.h>
29 29
30class AddressBookPlugin : public TodayPluginObject { 30class AddressBookPlugin : public TodayPluginObject {
31 31
32public: 32public:
33 AddressBookPlugin(); 33 AddressBookPlugin();
34 ~AddressBookPlugin(); 34 ~AddressBookPlugin();
35 35
36 QString pluginName() const; 36 QString pluginName() const;
37 double versionNumber() const; 37 double versionNumber() const;
38 QString pixmapNameWidget() const; 38 QString pixmapNameWidget() const;
39 QWidget* widget(QWidget *); 39 QWidget* widget(QWidget *);
40 QString pixmapNameConfig() const; 40 QString pixmapNameConfig() const;
41 TodayConfigWidget* configWidget(QWidget *); 41 TodayConfigWidget* configWidget(QWidget *);
42 QString appName() const; 42 QString appName() const;
43 bool excludeFromRefresh() const; 43 bool excludeFromRefresh() const;
44 void refresh(); 44 void refresh();
45 void reinitialize(); 45 void reinitialize();
46 46
47 private: 47 private:
48 AddressBookPluginWidget* m_abWidget; 48 AddressBookPluginWidget* m_abWidget;
49}; 49};
50 50
51#endif 51#endif
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
index 8c55937..81bb8fd 100644
--- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp
@@ -1,178 +1,178 @@
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 <qlabel.h> 25#include <qlabel.h>
26#include <qwhatsthis.h> 26#include <qwhatsthis.h>
27#include <qvgroupbox.h> 27#include <qvgroupbox.h>
28 28
29 29
30AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name) 30AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name)
31 : TodayConfigWidget(parent, name ) { 31 : TodayConfigWidget(parent, name ) {
32 32
33 QVBoxLayout * layout = new QVBoxLayout( this ); 33 QVBoxLayout * layout = new QVBoxLayout( this );
34 layout->setMargin( 20 ); 34 layout->setMargin( 20 );
35 35
36#if 0 36#if 0
37 // Informational stuff 37 // Informational stuff
38 QHBox *box4 = new QHBox( this ); 38 QHBox *box4 = new QHBox( this );
39 QLabel* colorLabel = new QLabel( box4, "" ); 39 QLabel* colorLabel = new QLabel( box4, "" );
40 colorLabel->setText( tr( "To activate settings: Restart application !" ) ); 40 colorLabel->setText( tr( "To activate settings: Restart application !" ) );
41#endif 41#endif
42 42
43 // Buttongroup to enable/disable shown stuff 43 // Buttongroup to enable/disable shown stuff
44 QVGroupBox* b_group = new QVGroupBox( this, "name" ); 44 QVGroupBox* b_group = new QVGroupBox( this, "name" );
45 b_group -> setTitle( tr("Enable/Disable Views") ); 45 b_group -> setTitle( tr("Enable/Disable Views") );
46 m_showBirthdayButton = new QRadioButton( b_group ); 46 m_showBirthdayButton = new QRadioButton( b_group );
47 m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); 47 m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) );
48 m_showAnniversaryButton = new QRadioButton( b_group ); 48 m_showAnniversaryButton = new QRadioButton( b_group );
49 m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); 49 m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) );
50 50
51 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!" ) );
52 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 !" ) );
53 53
54 // Max lines settings 54 // Max lines settings
55 QHBox *box1 = new QHBox( this ); 55 QHBox *box1 = new QHBox( this );
56 QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); 56 QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" );
57 TextLabel6->setText( tr( "Max Lines: " ) ); 57 TextLabel6->setText( tr( "Max Lines: " ) );
58 SpinBox2 = new QSpinBox( box1, "SpinBox2" ); 58 SpinBox2 = new QSpinBox( box1, "SpinBox2" );
59 SpinBox2->setMaxValue( 40 ); 59 SpinBox2->setMaxValue( 40 );
60 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" ) );
61 61
62#if 0 62#if 0
63 // Clip settings (currently not used) 63 // Clip settings (currently not used)
64 QHBox *box2 = new QHBox( this ); 64 QHBox *box2 = new QHBox( this );
65 QLabel* clipLabel = new QLabel( box2, "" ); 65 QLabel* clipLabel = new QLabel( box2, "" );
66 clipLabel->setText( tr( "Clip line after X chars: " ) ); 66 clipLabel->setText( tr( "Clip line after X chars: " ) );
67 SpinBoxClip = new QSpinBox( box2, "SpinClip" ); 67 SpinBoxClip = new QSpinBox( box2, "SpinClip" );
68 SpinBoxClip->setMaxValue( 200 ); 68 SpinBoxClip->setMaxValue( 200 );
69 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" ) );
70#endif 70#endif
71 71
72 // Look ahead settings 72 // Look ahead settings
73 QHBox *box3 = new QHBox( this ); 73 QHBox *box3 = new QHBox( this );
74 QLabel* daysLabel = new QLabel( box3, "" ); 74 QLabel* daysLabel = new QLabel( box3, "" );
75 daysLabel->setText( tr( "Days look ahead: " ) ); 75 daysLabel->setText( tr( "Days look ahead: " ) );
76 SpinDaysClip = new QSpinBox( box3, "SpinDays" ); 76 SpinDaysClip = new QSpinBox( box3, "SpinDays" );
77 SpinDaysClip->setMaxValue( 200 ); 77 SpinDaysClip->setMaxValue( 200 );
78 QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); 78 QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) );
79 79
80// QHBox *box4 = new QHBox( this ); 80// QHBox *box4 = new QHBox( this );
81 81
82// QLabel* colorLabel = new QLabel( box4, "" ); 82// QLabel* colorLabel = new QLabel( box4, "" );
83// colorLabel->setText( tr( "To activate settings: Restart application !" ) ); 83// colorLabel->setText( tr( "To activate settings: Restart application !" ) );
84 84
85 85
86 QHBox *box5 = new QHBox( this ); 86 QHBox *box5 = new QHBox( this );
87 QLabel* colorLabel2 = new QLabel( box5, "" ); 87 QLabel* colorLabel2 = new QLabel( box5, "" );
88 colorLabel2->setText( tr( "Set Headline Color: " ) ); 88 colorLabel2->setText( tr( "Set Headline Color: " ) );
89 headlineColor = new OColorButton( box5, black , "headlineColor" ); 89 headlineColor = new Opie::OColorButton( box5, black , "headlineColor" );
90 QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); 90 QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) );
91 QHBox *box6 = new QHBox( this ); 91 QHBox *box6 = new QHBox( this );
92 92
93 // Entry color settings 93 // Entry color settings
94 QLabel* colorLabel3= new QLabel( box6, "" ); 94 QLabel* colorLabel3= new QLabel( box6, "" );
95 colorLabel3->setText( tr( "Set Entry Color: " ) ); 95 colorLabel3->setText( tr( "Set Entry Color: " ) );
96 entryColor = new OColorButton( box6, black , "entryColor" ); 96 entryColor = new Opie::OColorButton( box6, black , "entryColor" );
97 QWhatsThis::add( entryColor , tr( "This color will be used for shown birthdays/anniversaries !" ) ); 97 QWhatsThis::add( entryColor , tr( "This color will be used for shown birthdays/anniversaries !" ) );
98 98
99 // Urgent color settings 99 // Urgent color settings
100 QHBox *box7 = new QHBox( this ); 100 QHBox *box7 = new QHBox( this );
101 QLabel* colorLabel5 = new QLabel( box7, "" ); 101 QLabel* colorLabel5 = new QLabel( box7, "" );
102 colorLabel5->setText( tr( "Set Urgent\nColor if below " ) ); 102 colorLabel5->setText( tr( "Set Urgent\nColor if below " ) );
103 SpinUrgentClip = new QSpinBox( box7, "SpinDays" ); 103 SpinUrgentClip = new QSpinBox( box7, "SpinDays" );
104 SpinUrgentClip->setMaxValue( 200 ); 104 SpinUrgentClip->setMaxValue( 200 );
105 QLabel* colorLabel6 = new QLabel( box7, "" ); 105 QLabel* colorLabel6 = new QLabel( box7, "" );
106 colorLabel6->setText( tr( " days: " ) ); 106 colorLabel6->setText( tr( " days: " ) );
107 urgentColor = new OColorButton( box7, red , "urgentColor" ); 107 urgentColor = new Opie::OColorButton( box7, red , "urgentColor" );
108 QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) ); 108 QWhatsThis::add( urgentColor , tr( "This urgent color will be used if we are close to the event !" ) );
109 QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) ); 109 QWhatsThis::add( SpinUrgentClip , tr( "The urgent color will be used if the birthday/anniversary is closer than given days !" ) );
110 110
111 111
112 //layout->addWidget( box4 ); 112 //layout->addWidget( box4 );
113 layout->addWidget( box1 ); 113 layout->addWidget( box1 );
114 //layout->addWidget( box2 ); 114 //layout->addWidget( box2 );
115 layout->addWidget( box3 ); 115 layout->addWidget( box3 );
116 layout->addWidget( box5 ); 116 layout->addWidget( box5 );
117 layout->addWidget( box6 ); 117 layout->addWidget( box6 );
118 layout->addWidget( box7 ); 118 layout->addWidget( box7 );
119 119
120 readConfig(); 120 readConfig();
121 121
122} 122}
123 123
124void AddressBookPluginConfig::readConfig() { 124void AddressBookPluginConfig::readConfig() {
125 Config cfg( "todayaddressplugin" ); 125 Config cfg( "todayaddressplugin" );
126 cfg.setGroup( "config" ); 126 cfg.setGroup( "config" );
127 m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); 127 m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 );
128 SpinBox2->setValue( m_max_lines_task ); 128 SpinBox2->setValue( m_max_lines_task );
129// m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); 129// m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
130// SpinBoxClip->setValue( m_maxCharClip ); 130// SpinBoxClip->setValue( m_maxCharClip );
131 m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); 131 m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 );
132 SpinDaysClip->setValue( m_daysLookAhead ); 132 SpinDaysClip->setValue( m_daysLookAhead );
133 m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); 133 m_urgentDays = cfg.readNumEntry( "urgentdays", 7 );
134 SpinUrgentClip->setValue( m_urgentDays ); 134 SpinUrgentClip->setValue( m_urgentDays );
135 135
136 m_entryColor = cfg.readEntry( "entrycolor", Qt::black.name() ); 136 m_entryColor = cfg.readEntry( "entrycolor", Qt::black.name() );
137 entryColor->setColor( QColor( m_entryColor ) ); 137 entryColor->setColor( QColor( m_entryColor ) );
138 m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() ); 138 m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() );
139 headlineColor->setColor( QColor( m_headlineColor ) ); 139 headlineColor->setColor( QColor( m_headlineColor ) );
140 m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() ); 140 m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() );
141 urgentColor->setColor( QColor( m_urgentColor ) ); 141 urgentColor->setColor( QColor( m_urgentColor ) );
142 142
143 m_showBirthdayButton->setChecked( cfg.readBoolEntry( "showBirthdays", true ) ); 143 m_showBirthdayButton->setChecked( cfg.readBoolEntry( "showBirthdays", true ) );
144 m_showAnniversaryButton->setChecked( cfg.readBoolEntry( "showAnniversaries", true ) ); 144 m_showAnniversaryButton->setChecked( cfg.readBoolEntry( "showAnniversaries", true ) );
145 145
146} 146}
147 147
148 148
149void AddressBookPluginConfig::writeConfig() { 149void AddressBookPluginConfig::writeConfig() {
150 Config cfg( "todayaddressplugin" ); 150 Config cfg( "todayaddressplugin" );
151 cfg.setGroup( "config" ); 151 cfg.setGroup( "config" );
152 m_max_lines_task = SpinBox2->value(); 152 m_max_lines_task = SpinBox2->value();
153 cfg.writeEntry( "maxlinestask", m_max_lines_task ); 153 cfg.writeEntry( "maxlinestask", m_max_lines_task );
154// m_maxCharClip = SpinBoxClip->value(); 154// m_maxCharClip = SpinBoxClip->value();
155// cfg.writeEntry( "maxcharclip", m_maxCharClip ); 155// cfg.writeEntry( "maxcharclip", m_maxCharClip );
156 m_daysLookAhead = SpinDaysClip->value(); 156 m_daysLookAhead = SpinDaysClip->value();
157 cfg.writeEntry( "dayslookahead", m_daysLookAhead ); 157 cfg.writeEntry( "dayslookahead", m_daysLookAhead );
158 m_urgentDays = SpinUrgentClip->value(); 158 m_urgentDays = SpinUrgentClip->value();
159 if ( m_urgentDays > m_daysLookAhead ) 159 if ( m_urgentDays > m_daysLookAhead )
160 m_urgentDays = m_daysLookAhead; 160 m_urgentDays = m_daysLookAhead;
161 cfg.writeEntry( "urgentdays", m_urgentDays ); 161 cfg.writeEntry( "urgentdays", m_urgentDays );
162 162
163 m_entryColor = entryColor->color().name(); 163 m_entryColor = entryColor->color().name();
164 cfg.writeEntry( "entrycolor", m_entryColor ); 164 cfg.writeEntry( "entrycolor", m_entryColor );
165 m_headlineColor = headlineColor->color().name(); 165 m_headlineColor = headlineColor->color().name();
166 cfg.writeEntry( "headlinecolor", m_headlineColor ); 166 cfg.writeEntry( "headlinecolor", m_headlineColor );
167 m_urgentColor = urgentColor->color().name(); 167 m_urgentColor = urgentColor->color().name();
168 cfg.writeEntry( "urgentcolor", m_urgentColor ); 168 cfg.writeEntry( "urgentcolor", m_urgentColor );
169 169
170 cfg.writeEntry( "showBirthdays", m_showBirthdayButton->isChecked() ); 170 cfg.writeEntry( "showBirthdays", m_showBirthdayButton->isChecked() );
171 cfg.writeEntry( "showAnniversaries", m_showAnniversaryButton->isChecked() ); 171 cfg.writeEntry( "showAnniversaries", m_showAnniversaryButton->isChecked() );
172 172
173 cfg.write(); 173 cfg.write();
174} 174}
175 175
176 176
177AddressBookPluginConfig::~AddressBookPluginConfig() { 177AddressBookPluginConfig::~AddressBookPluginConfig() {
178} 178}
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.h b/core/pim/today/plugins/addressbook/addresspluginconfig.h
index 5626e5d..e065ca2 100644
--- a/core/pim/today/plugins/addressbook/addresspluginconfig.h
+++ b/core/pim/today/plugins/addressbook/addresspluginconfig.h
@@ -1,75 +1,75 @@
1/* 1/*
2 * addresspluginconfig.h 2 * addresspluginconfig.h
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#ifndef ADDRESSBOOK_PLUGIN_CONFIG_H 19#ifndef ADDRESSBOOK_PLUGIN_CONFIG_H
20#define ADDRESSBOOK_PLUGIN_CONFIG_H 20#define ADDRESSBOOK_PLUGIN_CONFIG_H
21 21
22#include <opie2/todayconfigwidget.h>
23#include <opie2/ocolorbutton.h>
24
22#include <qwidget.h> 25#include <qwidget.h>
23#include <qspinbox.h> 26#include <qspinbox.h>
24#include <qradiobutton.h> 27#include <qradiobutton.h>
25 28
26#include <opie/todayconfigwidget.h>
27#include <opie/ocolorbutton.h>
28
29class AddressBookPluginConfig : public TodayConfigWidget { 29class AddressBookPluginConfig : public TodayConfigWidget {
30 Q_OBJECT 30 Q_OBJECT
31 31
32public: 32public:
33 33
34 AddressBookPluginConfig( QWidget *parent, const char *name ); 34 AddressBookPluginConfig( QWidget *parent, const char *name );
35 ~AddressBookPluginConfig(); 35 ~AddressBookPluginConfig();
36 36
37private: 37private:
38 /** 38 /**
39 * if changed then save 39 * if changed then save
40 */ 40 */
41 bool changed(); 41 bool changed();
42 void readConfig(); 42 void readConfig();
43 void writeConfig(); 43 void writeConfig();
44 44
45 QSpinBox* SpinBox2; 45 QSpinBox* SpinBox2;
46 QSpinBox* SpinBoxClip; 46 QSpinBox* SpinBoxClip;
47 QSpinBox* SpinDaysClip; 47 QSpinBox* SpinDaysClip;
48 QSpinBox* SpinUrgentClip; 48 QSpinBox* SpinUrgentClip;
49 OColorButton* entryColor; 49 Opie::OColorButton* entryColor;
50 OColorButton* headlineColor; 50 Opie::OColorButton* headlineColor;
51 OColorButton* urgentColor; 51 Opie::OColorButton* urgentColor;
52 QRadioButton* m_showBirthdayButton; 52 QRadioButton* m_showBirthdayButton;
53 QRadioButton* m_showAnniversaryButton; 53 QRadioButton* m_showAnniversaryButton;
54 54
55 // how many lines should be showed in the AddressBook section 55 // how many lines should be showed in the AddressBook section
56 int m_max_lines_task; 56 int m_max_lines_task;
57 // clip the lines after X chars 57 // clip the lines after X chars
58 int m_maxCharClip; 58 int m_maxCharClip;
59 // How many days look ahead 59 // How many days look ahead
60 int m_daysLookAhead; 60 int m_daysLookAhead;
61 // Days until urgent color is used 61 // Days until urgent color is used
62 int m_urgentDays; 62 int m_urgentDays;
63 // Entry Color 63 // Entry Color
64 QString m_entryColor; 64 QString m_entryColor;
65 // Headline Color 65 // Headline Color
66 QString m_headlineColor; 66 QString m_headlineColor;
67 // Urgent Color 67 // Urgent Color
68 QString m_urgentColor; 68 QString m_urgentColor;
69}; 69};
70 70
71 71
72 72
73 73
74 74
75#endif 75#endif
diff --git a/core/pim/today/plugins/addressbook/addresspluginimpl.h b/core/pim/today/plugins/addressbook/addresspluginimpl.h
index bf321da..9716787 100644
--- a/core/pim/today/plugins/addressbook/addresspluginimpl.h
+++ b/core/pim/today/plugins/addressbook/addresspluginimpl.h
@@ -1,41 +1,41 @@
1/* 1/*
2 * addresspluginimpl.h 2 * addresspluginimpl.h
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#ifndef ADDRESSBOOK_PLUGIN_IMPL_H 19#ifndef ADDRESSBOOK_PLUGIN_IMPL_H
20#define ADDRESSBOOK_PLUGIN_IMPL_H 20#define ADDRESSBOOK_PLUGIN_IMPL_H
21 21
22#include <opie/todayplugininterface.h> 22#include <opie2/todayplugininterface.h>
23 23
24class AddressBookPlugin; 24class AddressBookPlugin;
25 25
26class AddressBookPluginImpl : public TodayPluginInterface{ 26class AddressBookPluginImpl : public TodayPluginInterface{
27 27
28public: 28public:
29 AddressBookPluginImpl(); 29 AddressBookPluginImpl();
30 virtual ~AddressBookPluginImpl(); 30 virtual ~AddressBookPluginImpl();
31 31
32 QRESULT queryInterface( const QUuid &, QUnknownInterface** ); 32 QRESULT queryInterface( const QUuid &, QUnknownInterface** );
33 Q_REFCOUNT 33 Q_REFCOUNT
34 34
35 virtual TodayPluginObject *guiPart(); 35 virtual TodayPluginObject *guiPart();
36 36
37private: 37private:
38 AddressBookPlugin *addressbookPlugin; 38 AddressBookPlugin *addressbookPlugin;
39}; 39};
40 40
41#endif 41#endif
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index b0d456d..ea387d6 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -1,221 +1,221 @@
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 21
22#include <qpe/config.h> 22#include <opie2/opimcontact.h>
23 23
24#include <opie/ocontact.h> 24#include <qpe/config.h>
25 25
26AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name ) 26AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name )
27 : QWidget( parent, name ) { 27 : QWidget( parent, name ) {
28 28
29 addressLabel = 0l; 29 addressLabel = 0l;
30 m_contactdb = 0l; 30 m_contactdb = 0l;
31 layoutTodo = 0l; 31 layoutTodo = 0l;
32 32
33 // Hä ? Nonsense ! (se) 33 // Hä ? Nonsense ! (se)
34 if ( m_contactdb ) { 34 if ( m_contactdb ) {
35 delete m_contactdb; 35 delete m_contactdb;
36 } 36 }
37 37
38 m_contactdb = new OContactAccess("addressplugin"); 38 m_contactdb = new Opie::OPimContactAccess("addressplugin");
39 39
40 connect( m_contactdb, SIGNAL( signalChanged(const OContactAccess*) ), 40 connect( m_contactdb, SIGNAL( signalChanged(const Opie::OPimContactAccess*) ),
41 this, SLOT( refresh(const OContactAccess*) ) ); 41 this, SLOT( refresh(const Opie::OPimContactAccess*) ) );
42 42
43 43
44 readConfig(); 44 readConfig();
45 getAddress(); 45 getAddress();
46} 46}
47 47
48AddressBookPluginWidget::~AddressBookPluginWidget() { 48AddressBookPluginWidget::~AddressBookPluginWidget() {
49 delete m_contactdb; 49 delete m_contactdb;
50} 50}
51 51
52void AddressBookPluginWidget::refresh( const OContactAccess* ) 52void AddressBookPluginWidget::refresh( const Opie::OPimContactAccess* )
53{ 53{
54 qWarning(" AddressBookPluginWidget::Database was changed externally ! "); 54 qWarning(" AddressBookPluginWidget::Database was changed externally ! ");
55 m_contactdb->reload(); 55 m_contactdb->reload();
56 getAddress(); 56 getAddress();
57} 57}
58 58
59void AddressBookPluginWidget::reinitialize() { 59void AddressBookPluginWidget::reinitialize() {
60 readConfig(); 60 readConfig();
61 getAddress(); 61 getAddress();
62} 62}
63 63
64void AddressBookPluginWidget::readConfig() { 64void AddressBookPluginWidget::readConfig() {
65 Config cfg( "todayaddressplugin" ); 65 Config cfg( "todayaddressplugin" );
66 cfg.setGroup( "config" ); 66 cfg.setGroup( "config" );
67 m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); 67 m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 );
68 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); 68 m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 );
69 m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); 69 m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 );
70 m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); 70 m_urgentDays = cfg.readNumEntry( "urgentdays", 7 );
71 m_entryColor = cfg.readEntry("entrycolor", Qt::black.name() ); 71 m_entryColor = cfg.readEntry("entrycolor", Qt::black.name() );
72 m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() ); 72 m_headlineColor = cfg.readEntry( "headlinecolor", Qt::black.name() );
73 m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() ); 73 m_urgentColor = cfg.readEntry( "urgentcolor", Qt::red.name() );
74 m_showBirthdays = cfg.readBoolEntry( "showBirthdays", true ); 74 m_showBirthdays = cfg.readBoolEntry( "showBirthdays", true );
75 m_showAnniversaries = cfg.readBoolEntry( "showAnniversaries", true ); 75 m_showAnniversaries = cfg.readBoolEntry( "showAnniversaries", true );
76} 76}
77 77
78 78
79/** 79/**
80 * Get the addresss 80 * Get the addresss
81 */ 81 */
82void AddressBookPluginWidget::getAddress() { 82void AddressBookPluginWidget::getAddress() {
83 83
84 if ( ! layoutTodo ){ 84 if ( ! layoutTodo ){
85 layoutTodo = new QVBoxLayout( this ); 85 layoutTodo = new QVBoxLayout( this );
86 } 86 }
87 87
88 if ( ! addressLabel ) { 88 if ( ! addressLabel ) {
89 addressLabel = new OClickableLabel( this ); 89 addressLabel = new Opie::Ui::OClickableLabel( this );
90 connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) ); 90 connect( addressLabel, SIGNAL( clicked() ), this, SLOT( startAddressBook() ) );
91 layoutTodo->addWidget( addressLabel ); 91 layoutTodo->addWidget( addressLabel );
92 } 92 }
93 93
94 QString output; 94 QString output;
95 95
96 // Check whether the database provide the search option.. 96 // Check whether the database provide the search option..
97 if ( !m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ 97 if ( !m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){
98 // Libopie seems to be old.. 98 // Libopie seems to be old..
99 output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" ); 99 output = QObject::tr( "Database does not provide this search query ! Please upgrade libOpie !<br>" );
100 addressLabel->setText( output ); 100 addressLabel->setText( output );
101 return; 101 return;
102 } 102 }
103 103
104 // Define the query for birthdays and start search.. 104 // Define the query for birthdays and start search..
105 QDate lookAheadDate = QDate::currentDate().addDays( m_daysLookAhead ); 105 QDate lookAheadDate = QDate::currentDate().addDays( m_daysLookAhead );
106 int ammount = 0; 106 int ammount = 0;
107 if ( m_showBirthdays ){ 107 if ( m_showBirthdays ){
108 qWarning("Searching from now (%s) until %s ! ", 108 qWarning("Searching from now (%s) until %s ! ",
109 QDate::currentDate().toString().latin1(), 109 QDate::currentDate().toString().latin1(),
110 lookAheadDate.toString().latin1() ); 110 lookAheadDate.toString().latin1() );
111 } 111 }
112 112
113 if ( m_contactdb->hasQuerySettings( OContactAccess::DateDiff ) ){ 113 if ( m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){
114 114
115 115
116 OContact querybirthdays; 116 Opie::OPimContact querybirthdays;
117 querybirthdays.setBirthday( lookAheadDate ); 117 querybirthdays.setBirthday( lookAheadDate );
118 118
119 m_list = m_contactdb->queryByExample( querybirthdays, 119 m_list = m_contactdb->queryByExample( querybirthdays,
120 OContactAccess::DateDiff ); 120 Opie::OPimContactAccess::DateDiff );
121 if ( m_list.count() > 0 ){ 121 if ( m_list.count() > 0 ){
122 output = "<font color=" + m_headlineColor + ">" 122 output = "<font color=" + m_headlineColor + ">"
123 + QObject::tr( "Next birthdays in <b> %1 </b> days:" ) 123 + QObject::tr( "Next birthdays in <b> %1 </b> days:" )
124 .arg( m_daysLookAhead ) 124 .arg( m_daysLookAhead )
125 + "</font> <br>"; 125 + "</font> <br>";
126 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 126 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
127 if ( ammount++ < m_maxLinesTask ){ 127 if ( ammount++ < m_maxLinesTask ){
128 // Now we want to calculate how many days 128 // Now we want to calculate how many days
129 //until birthday. We have to set 129 //until birthday. We have to set
130 // the correct year to calculate the day diff... 130 // the correct year to calculate the day diff...
131 QDate destdate = (*m_it).birthday(); 131 QDate destdate = (*m_it).birthday();
132 destdate.setYMD( QDate::currentDate().year(), 132 destdate.setYMD( QDate::currentDate().year(),
133 destdate.month(), destdate.day() ); 133 destdate.month(), destdate.day() );
134 if ( QDate::currentDate().daysTo(destdate) < 0 ) 134 if ( QDate::currentDate().daysTo(destdate) < 0 )
135 destdate.setYMD( QDate::currentDate().year()+1, 135 destdate.setYMD( QDate::currentDate().year()+1,
136 destdate.month(), destdate.day() ); 136 destdate.month(), destdate.day() );
137 137
138 138
139 if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) 139 if ( QDate::currentDate().daysTo(destdate) < m_urgentDays )
140 output += "<font color=" + m_urgentColor + "><b>-" 140 output += "<font color=" + m_urgentColor + "><b>-"
141 + (*m_it).fullName() 141 + (*m_it).fullName()
142 + " (" 142 + " ("
143 + QString::number(QDate::currentDate() 143 + QString::number(QDate::currentDate()
144 .daysTo(destdate)) 144 .daysTo(destdate))
145 + " Days) </b></font><br>"; 145 + " Days) </b></font><br>";
146 146
147 else 147 else
148 output += "<font color=" + m_entryColor + "><b>-" 148 output += "<font color=" + m_entryColor + "><b>-"
149 + (*m_it).fullName() 149 + (*m_it).fullName()
150 + " (" 150 + " ("
151 + QString::number(QDate::currentDate() 151 + QString::number(QDate::currentDate()
152 .daysTo(destdate)) 152 .daysTo(destdate))
153 + " Days) </b></font><br>"; 153 + " Days) </b></font><br>";
154 } 154 }
155 } 155 }
156 } else { 156 } else {
157 output = "<font color=" + m_headlineColor + ">" 157 output = "<font color=" + m_headlineColor + ">"
158 + QObject::tr( "No birthdays in <b> %1 </b> days!" ) 158 + QObject::tr( "No birthdays in <b> %1 </b> days!" )
159 .arg( m_daysLookAhead ) 159 .arg( m_daysLookAhead )
160 + "</font> <br>"; 160 + "</font> <br>";
161 } 161 }
162 } 162 }
163 163
164 if ( m_showAnniversaries ){ 164 if ( m_showAnniversaries ){
165 // Define the query for anniversaries and start search.. 165 // Define the query for anniversaries and start search..
166 OContact queryanniversaries; 166 Opie::OPimContact queryanniversaries;
167 queryanniversaries.setAnniversary( lookAheadDate ); 167 queryanniversaries.setAnniversary( lookAheadDate );
168 168
169 m_list = m_contactdb->queryByExample( queryanniversaries, OContactAccess::DateDiff ); 169 m_list = m_contactdb->queryByExample( queryanniversaries, Opie::OPimContactAccess::DateDiff );
170 170
171 ammount = 0; 171 ammount = 0;
172 if ( m_list.count() > 0 ){ 172 if ( m_list.count() > 0 ){
173 output += "<font color=" + m_headlineColor + ">" 173 output += "<font color=" + m_headlineColor + ">"
174 + QObject::tr( "Next anniversaries in <b> %1 </b> days:" ) 174 + QObject::tr( "Next anniversaries in <b> %1 </b> days:" )
175 .arg( m_daysLookAhead ) 175 .arg( m_daysLookAhead )
176 + "</font> <br>"; 176 + "</font> <br>";
177 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { 177 for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) {
178 if ( ammount++ < m_maxLinesTask ){ 178 if ( ammount++ < m_maxLinesTask ){
179 // Now we want to calculate how many days until anniversary. 179 // Now we want to calculate how many days until anniversary.
180 // We have to set the correct year to calculate the day diff... 180 // We have to set the correct year to calculate the day diff...
181 QDate destdate = (*m_it).anniversary(); 181 QDate destdate = (*m_it).anniversary();
182 destdate.setYMD( QDate::currentDate().year(), destdate.month(), 182 destdate.setYMD( QDate::currentDate().year(), destdate.month(),
183 destdate.day() ); 183 destdate.day() );
184 if ( QDate::currentDate().daysTo(destdate) < 0 ) 184 if ( QDate::currentDate().daysTo(destdate) < 0 )
185 destdate.setYMD( QDate::currentDate().year()+1, 185 destdate.setYMD( QDate::currentDate().year()+1,
186 destdate.month(), destdate.day() ); 186 destdate.month(), destdate.day() );
187 187
188 if ( QDate::currentDate().daysTo(destdate) < m_urgentDays ) 188 if ( QDate::currentDate().daysTo(destdate) < m_urgentDays )
189 output += "<font color=" + m_urgentColor + "><b>-" 189 output += "<font color=" + m_urgentColor + "><b>-"
190 + (*m_it).fullName() 190 + (*m_it).fullName()
191 + " (" 191 + " ("
192 + QString::number(QDate::currentDate() 192 + QString::number(QDate::currentDate()
193 .daysTo( destdate ) ) 193 .daysTo( destdate ) )
194 + " Days) </b></font><br>"; 194 + " Days) </b></font><br>";
195 else 195 else
196 output += "<font color=" + m_entryColor + "><b>-" 196 output += "<font color=" + m_entryColor + "><b>-"
197 + (*m_it).fullName() 197 + (*m_it).fullName()
198 + " (" 198 + " ("
199 + QString::number(QDate::currentDate() 199 + QString::number(QDate::currentDate()
200 .daysTo( destdate ) ) 200 .daysTo( destdate ) )
201 + " Days) </b></font><br>"; 201 + " Days) </b></font><br>";
202 } 202 }
203 } 203 }
204 } else { 204 } else {
205 output += "<font color=" + m_headlineColor + ">" 205 output += "<font color=" + m_headlineColor + ">"
206 + QObject::tr( "No anniversaries in <b> %1 </b> days!" ) 206 + QObject::tr( "No anniversaries in <b> %1 </b> days!" )
207 .arg( m_daysLookAhead ) 207 .arg( m_daysLookAhead )
208 + "</font> <br>"; 208 + "</font> <br>";
209 } 209 }
210 } 210 }
211 211
212 addressLabel->setText( output ); 212 addressLabel->setText( output );
213} 213}
214 214
215/** 215/**
216 * start the todolist 216 * start the todolist
217 */ 217 */
218void AddressBookPluginWidget::startAddressBook() { 218void AddressBookPluginWidget::startAddressBook() {
219 QCopEnvelope e( "QPE/System", "execute(QString)" ); 219 QCopEnvelope e( "QPE/System", "execute(QString)" );
220 e << QString( "addressbook" ); 220 e << QString( "addressbook" );
221} 221}
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h
index b0e3811..b1c690d 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.h
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h
@@ -1,66 +1,66 @@
1/* 1/*
2 * addresspluginwidget.h 2 * addresspluginwidget.h
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#ifndef ADDRESSBOOK_PLUGIN_WIDGET_H 19#ifndef ADDRESSBOOK_PLUGIN_WIDGET_H
20#define ADDRESSBOOK_PLUGIN_WIDGET_H 20#define ADDRESSBOOK_PLUGIN_WIDGET_H
21 21
22#include <opie2/ocontactaccess.h>
23#include <opie2/oclickablelabel.h>
24
22#include <qstring.h> 25#include <qstring.h>
23#include <qwidget.h> 26#include <qwidget.h>
24#include <qlayout.h> 27#include <qlayout.h>
25 28
26#include <opie/ocontactaccess.h>
27#include <opie/oclickablelabel.h>
28
29 29
30class AddressBookPluginWidget : public QWidget { 30class AddressBookPluginWidget : public QWidget {
31 31
32 Q_OBJECT 32 Q_OBJECT
33 33
34public: 34public:
35 AddressBookPluginWidget( QWidget *parent, const char *name ); 35 AddressBookPluginWidget( QWidget *parent, const char *name );
36 ~AddressBookPluginWidget(); 36 ~AddressBookPluginWidget();
37 37
38 void reinitialize(); 38 void reinitialize();
39public slots: 39public slots:
40 void refresh( const OContactAccess* db ); 40 void refresh( const Opie::OPimContactAccess* db );
41 41
42protected slots: 42protected slots:
43 void startAddressBook(); 43 void startAddressBook();
44 44
45private: 45private:
46 OClickableLabel* addressLabel; 46 Opie::Ui::OClickableLabel* addressLabel;
47 QVBoxLayout* layoutTodo; 47 QVBoxLayout* layoutTodo;
48 OContactAccess * m_contactdb; 48 Opie::OPimContactAccess * m_contactdb;
49 49
50 OContactAccess::List m_list; 50 Opie::OPimContactAccess::List m_list;
51 OContactAccess::List::Iterator m_it; 51 Opie::OPimContactAccess::List::Iterator m_it;
52 52
53 void readConfig(); 53 void readConfig();
54 void getAddress(); 54 void getAddress();
55 int m_maxLinesTask; 55 int m_maxLinesTask;
56 int m_maxCharClip; 56 int m_maxCharClip;
57 int m_daysLookAhead; 57 int m_daysLookAhead;
58 int m_urgentDays; 58 int m_urgentDays;
59 QString m_entryColor; 59 QString m_entryColor;
60 QString m_headlineColor; 60 QString m_headlineColor;
61 QString m_urgentColor; 61 QString m_urgentColor;
62 bool m_showBirthdays; 62 bool m_showBirthdays;
63 bool m_showAnniversaries; 63 bool m_showAnniversaries;
64}; 64};
65 65
66#endif 66#endif
diff --git a/core/pim/today/plugins/addressbook/config.in b/core/pim/today/plugins/addressbook/config.in
index aad6fc7..cf61a0e 100644
--- a/core/pim/today/plugins/addressbook/config.in
+++ b/core/pim/today/plugins/addressbook/config.in
@@ -1,4 +1,4 @@
1 config TODAY_ADDRESSBOOK 1 config TODAY_ADDRESSBOOK
2 boolean "opie-today-addressbookplugin (shows Birthdays and Anniversaries)" 2 boolean "opie-today-addressbookplugin (shows Birthdays and Anniversaries)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && LIBOPIE2DB && LIBQTAUX
diff --git a/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control b/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control
index d40691a..2fd1435 100644
--- a/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control
+++ b/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control
@@ -1,10 +1,10 @@
1Package: opie-today-addressbookplugin 1Package: opie-today-addressbookplugin
2Files: plugins/today/libtodayaddressbookplugin.so* 2Files: plugins/today/libtodayaddressbookplugin.so*
3Priority: optional 3Priority: optional
4Section: opie/plugins 4Section: opie/plugins
5Maintainer: Stefan Eilers <eilers.stefan@epost.de> 5Maintainer: Stefan Eilers <eilers.stefan@epost.de>
6Architecture: arm 6Architecture: arm
7Depends: libqte2, opie-today 7Depends: libqte2, opie-today, libopiecore2, libopieui2, libopiepim2, libopiedb2, libqtaux2
8Description: Addressbook plugin for Today 8Description: Addressbook plugin for Today
9 Displays upcoming Birthdays and Anniversaries 9 Displays upcoming Birthdays and Anniversaries
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION