summaryrefslogtreecommitdiff
path: root/core/pim/today
Unidiff
Diffstat (limited to 'core/pim/today') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/addressbook/addresspluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp4
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp4
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/todayconfig.cpp2
5 files changed, 9 insertions, 9 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 );
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index b6707df..0820802 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -54,87 +54,87 @@ void DatebookPluginWidget::readConfig() {
54 m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 54 m_onlyLater = cfg.readNumEntry( "onlylater", 1 );
55 m_moreDays = cfg.readNumEntry( "moredays", 0 ); 55 m_moreDays = cfg.readNumEntry( "moredays", 0 );
56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 ); 56 m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
57} 57}
58 58
59void DatebookPluginWidget::reinitialize() { 59void DatebookPluginWidget::reinitialize() {
60 readConfig(); 60 readConfig();
61 refresh(); 61 refresh();
62} 62}
63 63
64void DatebookPluginWidget::refresh() { 64void DatebookPluginWidget::refresh() {
65 m_eventsList.clear(); 65 m_eventsList.clear();
66 66
67 if ( m_layoutDates ) { 67 if ( m_layoutDates ) {
68 delete m_layoutDates; 68 delete m_layoutDates;
69 } 69 }
70 m_layoutDates = new QVBoxLayout( this ); 70 m_layoutDates = new QVBoxLayout( this );
71 m_layoutDates->setAutoAdd( true ); 71 m_layoutDates->setAutoAdd( true );
72 72
73 getDates(); 73 getDates();
74} 74}
75 75
76/** 76/**
77 * Get all events that are in the datebook xml file for today 77 * Get all events that are in the datebook xml file for today
78 */ 78 */
79void DatebookPluginWidget::getDates() { 79void DatebookPluginWidget::getDates() {
80 80
81 81
82 if ( db ) { 82 if ( db ) {
83 delete db; 83 delete db;
84 } 84 }
85 db = new DateBookDB; 85 db = new DateBookDB;
86 86
87 QDate date = QDate::currentDate(); 87 QDate date = QDate::currentDate();
88 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); 88 QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
89 qBubbleSort( list ); 89 qBubbleSort( list );
90 int count = 0; 90 int count = 0;
91 91
92 if ( list.count() > 0 ) { 92 if ( list.count() > 0 ) {
93 93
94 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) { 94 for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
95 95
96 if ( count < m_max_lines_meet ) { 96 if ( count < m_max_lines_meet ) {
97 if ( !m_onlyLater ) { 97 if ( !m_onlyLater ) {
98 count++; 98 count++;
99 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); 99 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
100 m_eventsList.append( l ); 100 m_eventsList.append( l );
101 l->show(); 101 l->show();
102 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 102 QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
103 } else { 103 } else {
104 if ( ( QDateTime::currentDateTime() <= (*it).event().end() ) 104 if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
105 // Show events which span over many days and are not elapsed. 105 // Show events which span over many days and are not elapsed.
106 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) ) 106 || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
107 // Show repeated event for today that is not elapsed. 107 // Show repeated event for today that is not elapsed.
108 || ( ( (*it).event().repeatType() != Event::NoRepeat ) 108 || ( ( (*it).event().repeatType() != Event::NoRepeat )
109 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() ) 109 && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
110 && ( QTime::currentTime() < (*it).event().start().time() ) ) ) 110 && ( QTime::currentTime() < (*it).event().start().time() ) ) )
111 // Show repeated event for next days. 111 // Show repeated event for next days.
112 || ( ( (*it).event().repeatType() != Event::NoRepeat ) 112 || ( ( (*it).event().repeatType() != Event::NoRepeat )
113 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) ) 113 && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
114 ) 114 )
115 { 115 {
116 count++; 116 count++;
117 // show only later appointments 117 // show only later appointments
118 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); 118 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
119 m_eventsList.append( l ); 119 m_eventsList.append( l );
120 l->show(); 120 l->show();
121 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 121 QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
122 } 122 }
123 } 123 }
124 } 124 }
125 } 125 }
126 if ( m_onlyLater && count == 0 ) { 126 if ( m_onlyLater && count == 0 ) {
127 QLabel* noMoreEvents = new QLabel( this ); 127 QLabel* noMoreEvents = new QLabel( this );
128 m_eventsList.append( noMoreEvents ); 128 m_eventsList.append( noMoreEvents );
129 noMoreEvents->show(); 129 noMoreEvents->show();
130 noMoreEvents->setText( QObject::tr( "No more appointments today" ) ); 130 noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
131 } 131 }
132 } else { 132 } else {
133 QLabel* noEvents = new QLabel( this ); 133 QLabel* noEvents = new QLabel( this );
134 m_eventsList.append( noEvents ); 134 m_eventsList.append( noEvents );
135 noEvents->show(); 135 noEvents->show();
136 noEvents->setText( QObject::tr( "No appointments today" ) ); 136 noEvents->setText( QObject::tr( "No appointments today" ) );
137 } 137 }
138} 138}
139 139
140 140
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index 4194270..a8e4c41 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -1,92 +1,92 @@
1/* 1/*
2 * mailpluginwidget.cpp 2 * mailpluginwidget.cpp
3 * 3 *
4 * copyright : (c) 2002,2003,2004 by Maximilian Reiß 4 * copyright : (c) 2002,2003,2004 by Maximilian Reiß
5 * email : harlekin@handhelds.org 5 * email : harlekin@handhelds.org
6 * 6 *
7 */ 7 */
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16#include "mailpluginwidget.h" 16#include "mailpluginwidget.h"
17 17
18#include <qpe/config.h> 18#include <qpe/config.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20 20
21MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) 21MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
22 : QWidget(parent, name ) { 22 : QWidget(parent, name ) {
23 23
24 m_mailLabel = 0l; 24 m_mailLabel = 0l;
25 m_layout = 0l; 25 m_layout = 0l;
26 26
27 if ( m_mailLabel ) { 27 if ( m_mailLabel ) {
28 delete m_mailLabel; 28 delete m_mailLabel;
29 } 29 }
30 m_mailLabel = new OClickableLabel( this ); 30 m_mailLabel = new OClickableLabel( this );
31 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); 31 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
32 32
33 if ( m_layout ) { 33 if ( m_layout ) {
34 delete m_layout; 34 delete m_layout;
35 } 35 }
36 m_layout = new QHBoxLayout( this ); 36 m_layout = new QHBoxLayout( this );
37 m_layout->setAutoAdd( true ); 37 m_layout->setAutoAdd( true );
38 38
39 39
40#if defined(Q_WS_QWS) 40#if defined(Q_WS_QWS)
41#if !defined(QT_NO_COP) 41#if !defined(QT_NO_COP)
42 QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); 42 QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this );
43 connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 43 connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
44 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 44 this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) );
45#endif 45#endif
46#endif 46#endif
47 47
48 readConfig(); 48 readConfig();
49 getInfo(); 49 getInfo();
50} 50}
51 51
52 52
53void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { 53void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) {
54 QDataStream stream( data, IO_ReadOnly ); 54 QDataStream stream( data, IO_ReadOnly );
55 if ( msg == "outgoingMails(int)" ) { 55 if ( msg == "outgoingMails(int)" ) {
56 stream >> m_outgoing; 56 stream >> m_outgoing;
57 } else if ( msg == "newMails(int)" ) { 57 } else if ( msg == "newMails(int)" ) {
58 stream >> m_newMails; 58 stream >> m_newMails;
59 } 59 }
60 getInfo(); 60 getInfo();
61} 61}
62MailPluginWidget::~MailPluginWidget() { 62MailPluginWidget::~MailPluginWidget() {
63 delete m_mailLabel; 63 delete m_mailLabel;
64 delete m_layout; 64 delete m_layout;
65} 65}
66 66
67 67
68void MailPluginWidget::readConfig() { 68void MailPluginWidget::readConfig() {
69 Config cfg( "todaymailplugin" ); 69 Config cfg( "todaymailplugin" );
70 cfg.setGroup( "config" ); 70 cfg.setGroup( "config" );
71 71
72 Config cfg2( "mail" ); 72 Config cfg2( "mail" );
73 cfg2.setGroup( "Status" ); 73 cfg2.setGroup( "Status" );
74 74
75 m_newMails = cfg2.readNumEntry( "newMails", 0 ); 75 m_newMails = cfg2.readNumEntry( "newMails", 0 );
76 m_outgoing = cfg2.readNumEntry( "outgoing", 0 ); 76 m_outgoing = cfg2.readNumEntry( "outgoing", 0 );
77} 77}
78 78
79 79
80void MailPluginWidget::refresh() { 80void MailPluginWidget::refresh() {
81 getInfo(); 81 getInfo();
82} 82}
83 83
84void MailPluginWidget::getInfo() { 84void MailPluginWidget::getInfo() {
85 85
86 86
87 87
88 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( m_newMails ).arg( m_outgoing ) ); 88 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( m_newMails ).arg( m_outgoing ) );
89} 89}
90 90
91/** 91/**
92 * launches datebook 92 * launches datebook
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 72cdfd6..812f8b5 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -8,98 +8,98 @@
8/*************************************************************************** 8/***************************************************************************
9 * * 9 * *
10 * This program is free software; you can redistribute it and/or modify * 10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by * 11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or * 12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. * 13 * (at your option) any later version. *
14 * * 14 * *
15 ***************************************************************************/ 15 ***************************************************************************/
16 16
17#define QTOPIA_INTERNAL_LANGLIST 17#define QTOPIA_INTERNAL_LANGLIST
18 18
19#include "today.h" 19#include "today.h"
20 20
21#include <qpe/config.h> 21#include <qpe/config.h>
22#include <qpe/qcopenvelope_qws.h> 22#include <qpe/qcopenvelope_qws.h>
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/contact.h> 25#include <qpe/contact.h>
26 26
27#include <qdir.h> 27#include <qdir.h>
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qwhatsthis.h> 29#include <qwhatsthis.h>
30 30
31struct TodayPlugin { 31struct TodayPlugin {
32 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} 32 TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
33 QLibrary *library; 33 QLibrary *library;
34 QInterfacePtr<TodayPluginInterface> iface; 34 QInterfacePtr<TodayPluginInterface> iface;
35 TodayPluginObject *guiPart; 35 TodayPluginObject *guiPart;
36 QWidget *guiBox; 36 QWidget *guiBox;
37 QString name; 37 QString name;
38 bool active; 38 bool active;
39 bool excludeRefresh; 39 bool excludeRefresh;
40 int pos; 40 int pos;
41}; 41};
42 42
43static QValueList<TodayPlugin> pluginList; 43static QValueList<TodayPlugin> pluginList;
44 44
45static QMap<QString, TodayPlugin> tempList; 45static QMap<QString, TodayPlugin> tempList;
46 46
47Today::Today( QWidget* parent, const char* name, WFlags fl ) 47Today::Today( QWidget* parent, const char* name, WFlags fl )
48 : TodayBase( parent, name, fl ) { 48 : TodayBase( parent, name, fl ) {
49 49
50 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); 50 QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
51 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); 51 QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
52 52
53#if defined(Q_WS_QWS) 53#if defined(Q_WS_QWS)
54#if !defined(QT_NO_COP) 54#if !defined(QT_NO_COP)
55 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); 55 QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
56 connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 56 connect ( todayChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
57 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 57 this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) );
58#endif 58#endif
59#endif 59#endif
60 60
61 setOwnerField(); 61 setOwnerField();
62 m_refreshTimer = new QTimer( this ); 62 m_refreshTimer = new QTimer( this );
63 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 63 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
64 m_refreshTimer->start( 15000 ); 64 m_refreshTimer->start( 15000 );
65 m_big_box = 0L; 65 m_big_box = 0L;
66 66
67 67
68 layout = new QVBoxLayout( this ); 68 layout = new QVBoxLayout( this );
69 layout->addWidget( Frame ); 69 layout->addWidget( Frame );
70 layout->addWidget( OwnerField ); 70 layout->addWidget( OwnerField );
71 71
72 m_sv = new QScrollView( this ); 72 m_sv = new QScrollView( this );
73 m_sv->setResizePolicy( QScrollView::AutoOneFit ); 73 m_sv->setResizePolicy( QScrollView::AutoOneFit );
74 m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); 74 m_sv->setHScrollBarMode( QScrollView::AlwaysOff );
75 m_sv->setFrameShape( QFrame::NoFrame ); 75 m_sv->setFrameShape( QFrame::NoFrame );
76 76
77 layout->addWidget( m_sv ); 77 layout->addWidget( m_sv );
78 layout->setStretchFactor( m_sv,4 ); 78 layout->setStretchFactor( m_sv,4 );
79 79
80 qApp->processEvents(); 80 qApp->processEvents();
81 loadPlugins(); 81 loadPlugins();
82 QPEApplication::showWidget( this ); 82 QPEApplication::showWidget( this );
83} 83}
84 84
85/** 85/**
86 * Qcop receive method. 86 * Qcop receive method.
87 */ 87 */
88void Today::channelReceived( const QCString &msg, const QByteArray & data ) { 88void Today::channelReceived( const QCString &msg, const QByteArray & data ) {
89 QDataStream stream( data, IO_ReadOnly ); 89 QDataStream stream( data, IO_ReadOnly );
90 if ( msg == "message(QString)" ) { 90 if ( msg == "message(QString)" ) {
91 QString message; 91 QString message;
92 stream >> message; 92 stream >> message;
93 setOwnerField( message ); 93 setOwnerField( message );
94 } 94 }
95} 95}
96 96
97void Today::setRefreshTimer( int interval ) { 97void Today::setRefreshTimer( int interval ) {
98 98
99 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 99 disconnect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
100 100
101 // 0 is "never" case 101 // 0 is "never" case
102 if ( !interval == 0 ) { 102 if ( !interval == 0 ) {
103 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); 103 connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
104 m_refreshTimer->changeInterval( interval ); 104 m_refreshTimer->changeInterval( interval );
105 } 105 }
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 5c51515..a6f53e1 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -40,97 +40,97 @@ public:
40 setFocusPolicy( QWidget::NoFocus ); 40 setFocusPolicy( QWidget::NoFocus );
41 setToggleButton( t ); 41 setToggleButton( t );
42 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot ); 42 connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
43 } 43 }
44}; 44};
45 45
46 46
47/** 47/**
48 * The class has currently quite some duplicate code. 48 * The class has currently quite some duplicate code.
49 * By that way it would be real easy to have it as seperate app in settings tab 49 * By that way it would be real easy to have it as seperate app in settings tab
50 * 50 *
51 */ 51 */
52TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) 52TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
53 : QDialog( parent, name, modal, WStyle_ContextHelp ) { 53 : QDialog( parent, name, modal, WStyle_ContextHelp ) {
54 54
55 setCaption( tr( "Today Config" ) ); 55 setCaption( tr( "Today Config" ) );
56 56
57 QVBoxLayout *layout = new QVBoxLayout( this ); 57 QVBoxLayout *layout = new QVBoxLayout( this );
58 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); 58 TabWidget3 = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom );
59 layout->addWidget( TabWidget3 ); 59 layout->addWidget( TabWidget3 );
60 60
61 tab_2 = new QWidget( TabWidget3, "tab_2" ); 61 tab_2 = new QWidget( TabWidget3, "tab_2" );
62 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 ); 62 QVBoxLayout *tab2Layout = new QVBoxLayout( tab_2, 4 ,4 );
63 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 ); 63 QLabel *l = new QLabel( tr( "Load which plugins in what order:" ), tab_2 );
64 tab2Layout->addWidget( l ); 64 tab2Layout->addWidget( l );
65 QHBox *hbox1 = new QHBox( tab_2 ); 65 QHBox *hbox1 = new QHBox( tab_2 );
66 m_appletListView = new QListView( hbox1 ); 66 m_appletListView = new QListView( hbox1 );
67 m_appletListView->addColumn( "PluginList" ); 67 m_appletListView->addColumn( "PluginList" );
68 m_appletListView->header()->hide(); 68 m_appletListView->header()->hide();
69 m_appletListView->setSorting( -1 ); 69 m_appletListView->setSorting( -1 );
70 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); 70 QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) );
71 QVBox *vbox1 = new QVBox( hbox1 ); 71 QVBox *vbox1 = new QVBox( hbox1 );
72 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); 72 new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) );
73 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); 73 new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) );
74 tab2Layout->addWidget( hbox1 ); 74 tab2Layout->addWidget( hbox1 );
75 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); 75 TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) );
76 76
77 // Misc tab 77 // Misc tab
78 tab_3 = new QWidget( TabWidget3, "tab_3" ); 78 tab_3 = new QWidget( TabWidget3, "tab_3" );
79 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); 79 QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 );
80 80
81 m_guiMisc = new TodayConfigMiscBase( tab_3 ); 81 m_guiMisc = new TodayConfigMiscBase( tab_3 );
82 82
83 tab3Layout->addWidget( m_guiMisc ); 83 tab3Layout->addWidget( m_guiMisc );
84 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); 84 TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) );
85 85
86 m_applets_changed = false; 86 m_applets_changed = false;
87 87
88 connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); 88 connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) );
89 89
90 readConfig(); 90 readConfig();
91 QPEApplication::showDialog( this ); 91 QPEApplication::showDialog( this );
92} 92}
93 93
94 94
95/** 95/**
96 * Autostart, uses the new (opie only) autostart method in the launcher code. 96 * Autostart, uses the new (opie only) autostart method in the launcher code.
97 * If registered against that today ist started on each resume. 97 * If registered against that today ist started on each resume.
98 */ 98 */
99void TodayConfig::setAutoStart() { 99void TodayConfig::setAutoStart() {
100 Config cfg( "today" ); 100 Config cfg( "today" );
101 cfg.setGroup( "Autostart" ); 101 cfg.setGroup( "Autostart" );
102 if ( m_autoStart ) { 102 if ( m_autoStart ) {
103 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); 103 QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" );
104 e << QString( "add" ); 104 e << QString( "add" );
105 e << QString( "today" ); 105 e << QString( "today" );
106 e << QString( "%1" ).arg( m_autoStartTimer ); 106 e << QString( "%1" ).arg( m_autoStartTimer );
107 } else { 107 } else {
108 QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); 108 QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" );
109 e << QString( "remove" ); 109 e << QString( "remove" );
110 e << QString( "today" ); 110 e << QString( "today" );
111 } 111 }
112} 112}
113 113
114/** 114/**
115 * Read the config part 115 * Read the config part
116 */ 116 */
117void TodayConfig::readConfig() { 117void TodayConfig::readConfig() {
118 Config cfg( "today" ); 118 Config cfg( "today" );
119 cfg.setGroup( "Autostart" ); 119 cfg.setGroup( "Autostart" );
120 m_autoStart = cfg.readNumEntry( "autostart", 1 ); 120 m_autoStart = cfg.readNumEntry( "autostart", 1 );
121 m_guiMisc->CheckBoxAuto->setChecked( m_autoStart ); 121 m_guiMisc->CheckBoxAuto->setChecked( m_autoStart );
122 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 ); 122 m_autoStartTimer = cfg.readNumEntry( "autostartdelay", 0 );
123 m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer ); 123 m_guiMisc->SpinBoxTime->setValue( m_autoStartTimer );
124 124
125 cfg.setGroup( "General" ); 125 cfg.setGroup( "General" );
126 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 126 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
127 m_guiMisc->SpinBoxIconSize->setValue( m_iconSize ); 127 m_guiMisc->SpinBoxIconSize->setValue( m_iconSize );
128 m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); 128 m_guiMisc->SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 );
129 m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); 129 m_guiMisc->CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) );
130 130
131 131
132 cfg.setGroup( "Plugins" ); 132 cfg.setGroup( "Plugins" );
133 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 133 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
134} 134}
135 135
136/** 136/**