summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
Unidiff
Diffstat (limited to 'core/pim/today/plugins/addressbook/addresspluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index c8652f3..b0d456d 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -1,89 +1,89 @@
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 <qpe/config.h>
23 23
24#include <opie/ocontact.h> 24#include <opie/ocontact.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 OContactAccess("addressplugin");
39 39
40 connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ), 40 connect( m_contactdb, SIGNAL( signalChanged(const OContactAccess*) ),
41 this, SLOT( refresh( const OContactAccess * ) ) ); 41 this, SLOT( refresh(const OContactAccess*) ) );
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 OContactAccess* )
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 OClickableLabel( this );