summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins
authordrw <drw>2004-04-02 21:31:18 (UTC)
committer drw <drw>2004-04-02 21:31:18 (UTC)
commit67cf56e3907fba139e2d1ce612f9df29747b8201 (patch) (unidiff)
tree6ac96d3dda59f675f0c60c336a80e82d0ea67ed6 /core/pim/today/plugins
parentebe03c3cd5d2bc1e1ae94f123da7ab27b2188f6a (diff)
downloadopie-67cf56e3907fba139e2d1ce612f9df29747b8201.zip
opie-67cf56e3907fba139e2d1ce612f9df29747b8201.tar.gz
opie-67cf56e3907fba139e2d1ce612f9df29747b8201.tar.bz2
Use ODebug (another 2 down...)
Diffstat (limited to 'core/pim/today/plugins') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp9
-rw-r--r--core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control2
2 files changed, 5 insertions, 6 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
index ea387d6..b48d4a7 100644
--- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
+++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp
@@ -9,25 +9,25 @@
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#include <opie2/odebug.h>
22#include <opie2/opimcontact.h> 22#include <opie2/opimcontact.h>
23 23
24#include <qpe/config.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)
@@ -42,25 +42,25 @@ AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char*
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 Opie::OPimContactAccess* ) 52void AddressBookPluginWidget::refresh( const Opie::OPimContactAccess* )
53{ 53{
54 qWarning(" AddressBookPluginWidget::Database was changed externally ! "); 54 Opie::Core::owarn << " AddressBookPluginWidget::Database was changed externally ! " << oendl;
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" );
@@ -96,27 +96,26 @@ void AddressBookPluginWidget::getAddress() {
96 // Check whether the database provide the search option.. 96 // Check whether the database provide the search option..
97 if ( !m_contactdb->hasQuerySettings( Opie::OPimContactAccess::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 Opie::Core::owarn << "Searching from now (" << QDate::currentDate().toString() << ") until "
109 QDate::currentDate().toString().latin1(), 109 << lookAheadDate.toString() << " ! " << oendl;
110 lookAheadDate.toString().latin1() );
111 } 110 }
112 111
113 if ( m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){ 112 if ( m_contactdb->hasQuerySettings( Opie::OPimContactAccess::DateDiff ) ){
114 113
115 114
116 Opie::OPimContact querybirthdays; 115 Opie::OPimContact querybirthdays;
117 querybirthdays.setBirthday( lookAheadDate ); 116 querybirthdays.setBirthday( lookAheadDate );
118 117
119 m_list = m_contactdb->queryByExample( querybirthdays, 118 m_list = m_contactdb->queryByExample( querybirthdays,
120 Opie::OPimContactAccess::DateDiff ); 119 Opie::OPimContactAccess::DateDiff );
121 if ( m_list.count() > 0 ){ 120 if ( m_list.count() > 0 ){
122 output = "<font color=" + m_headlineColor + ">" 121 output = "<font color=" + m_headlineColor + ">"
diff --git a/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control b/core/pim/today/plugins/addressbook/opie-today-addressbookplugin.control
index 2fd1435..030d04b 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, libopiecore2, libopieui2, libopiepim2, libopiedb2, libqtaux2 7Depends: libqte2, opie-today, libopiecore2, libopieui2, libopiepim2, 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