summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-02-23 14:35:52 (UTC)
committer harlekin <harlekin>2003-02-23 14:35:52 (UTC)
commit93d5fdc889cd724c1f2938497b6c6460a13be2ba (patch) (unidiff)
tree3062d44ef92a47e81cebe07286691f0d2119edce
parent135c6fb1d73d322b43c8a487d40675278f3bf5f5 (diff)
downloadopie-93d5fdc889cd724c1f2938497b6c6460a13be2ba.zip
opie-93d5fdc889cd724c1f2938497b6c6460a13be2ba.tar.gz
opie-93d5fdc889cd724c1f2938497b6c6460a13be2ba.tar.bz2
got rid of not needed includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/mail/mailplugin.cpp2
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h4
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp10
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.h7
4 files changed, 3 insertions, 20 deletions
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp
index 2a2efd2..9430c30 100644
--- a/core/pim/today/plugins/mail/mailplugin.cpp
+++ b/core/pim/today/plugins/mail/mailplugin.cpp
@@ -1,69 +1,69 @@
1/* 1/*
2 * mailplugin.cpp 2 * mailplugin.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002,2003 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 16
17 17
18#include "mailplugin.h" 18#include "mailplugin.h"
19 19
20MailPlugin::MailPlugin() { 20MailPlugin::MailPlugin() {
21 m_widget = 0l; 21 m_widget = 0l;
22} 22}
23 23
24MailPlugin::~MailPlugin() { 24MailPlugin::~MailPlugin() {
25 delete (MailPluginWidget*)m_widget; 25 delete (MailPluginWidget*)m_widget;
26} 26}
27 27
28QString MailPlugin::pluginName() const { 28QString MailPlugin::pluginName() const {
29 return QObject::tr( "Mail plugin" ); 29 return QObject::tr( "Mail plugin" );
30} 30}
31 31
32double MailPlugin::versionNumber() const { 32double MailPlugin::versionNumber() const {
33 return 0.6; 33 return 0.6;
34} 34}
35 35
36QString MailPlugin::pixmapNameWidget() const { 36QString MailPlugin::pixmapNameWidget() const {
37 return "mail/desktopicon"; 37 return "mail/desktopicon";
38} 38}
39 39
40QWidget* MailPlugin::widget( QWidget * wid ) { 40QWidget* MailPlugin::widget( QWidget * wid ) {
41 if(!m_widget) { 41 if(!m_widget) {
42 m_widget = new MailPluginWidget( wid, "Datebook" ); 42 m_widget = new MailPluginWidget( wid, "Datebook" );
43 } 43 }
44 return m_widget; 44 return m_widget;
45} 45}
46 46
47 47
48QString MailPlugin::pixmapNameConfig() const { 48QString MailPlugin::pixmapNameConfig() const {
49 return 0l; 49 return 0l;
50} 50}
51 51
52TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { 52TodayConfigWidget* MailPlugin::configWidget( QWidget* ) {
53 return 0l; 53 return 0l;
54} 54}
55 55
56QString MailPlugin::appName() const { 56QString MailPlugin::appName() const {
57 return "mail"; 57 return "mail";
58} 58}
59 59
60 60
61bool MailPlugin::excludeFromRefresh() const { 61bool MailPlugin::excludeFromRefresh() const {
62 return false; 62 return false;
63} 63}
64 64
65void MailPlugin::refresh() { 65void MailPlugin::refresh() {
66 if ( m_widget ) { 66 if ( m_widget ) {
67 m_widget->refresh(); 67 m_widget->refresh();
68 } 68 }
69} 69}
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h
index a0f009b..295a88c 100644
--- a/core/pim/today/plugins/mail/mailplugin.h
+++ b/core/pim/today/plugins/mail/mailplugin.h
@@ -1,53 +1,49 @@
1/* 1/*
2 * mailplugin.h 2 * mailplugin.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002 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 16
17 17
18#ifndef MAIL_PLUGIN_H 18#ifndef MAIL_PLUGIN_H
19#define MAIL_PLUGIN_H 19#define MAIL_PLUGIN_H
20 20
21#include <qstring.h>
22#include <qwidget.h> 21#include <qwidget.h>
23#include <qguardedptr.h> 22#include <qguardedptr.h>
24 23
25#include <opie/tododb.h>
26#include <opie/oclickablelabel.h>
27
28#include <opie/todayplugininterface.h> 24#include <opie/todayplugininterface.h>
29#include <opie/todayconfigwidget.h> 25#include <opie/todayconfigwidget.h>
30 26
31#include "mailpluginwidget.h" 27#include "mailpluginwidget.h"
32 28
33class MailPlugin : public TodayPluginObject { 29class MailPlugin : public TodayPluginObject {
34 30
35public: 31public:
36 MailPlugin(); 32 MailPlugin();
37 ~MailPlugin(); 33 ~MailPlugin();
38 34
39 QString pluginName() const; 35 QString pluginName() const;
40 double versionNumber() const; 36 double versionNumber() const;
41 QString pixmapNameWidget() const; 37 QString pixmapNameWidget() const;
42 QWidget* widget(QWidget *); 38 QWidget* widget(QWidget *);
43 QString pixmapNameConfig() const; 39 QString pixmapNameConfig() const;
44 TodayConfigWidget* configWidget(QWidget *); 40 TodayConfigWidget* configWidget(QWidget *);
45 QString appName() const; 41 QString appName() const;
46 bool excludeFromRefresh() const; 42 bool excludeFromRefresh() const;
47 void refresh(); 43 void refresh();
48 44
49 private: 45 private:
50 QGuardedPtr<MailPluginWidget> m_widget; 46 QGuardedPtr<MailPluginWidget> m_widget;
51}; 47};
52 48
53#endif 49#endif
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index aad1d07..3c1d908 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -1,88 +1,80 @@
1/* 1/*
2 * mailpluginwidget.cpp 2 * mailpluginwidget.cpp
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002,2003 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 16
17
18#include <qvaluelist.h>
19#include <qtl.h>
20#include <qstring.h>
21#include <qobject.h>
22#include <qlayout.h>
23
24#include <qpe/config.h> 17#include <qpe/config.h>
25#include <qpe/timestring.h>
26#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
27 19
28#include "mailpluginwidget.h" 20#include "mailpluginwidget.h"
29 21
30MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) 22MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
31 : QWidget(parent, name ) { 23 : QWidget(parent, name ) {
32 24
33 m_mailLabel = 0l; 25 m_mailLabel = 0l;
34 m_layout = 0l; 26 m_layout = 0l;
35 27
36 if ( m_mailLabel ) { 28 if ( m_mailLabel ) {
37 delete m_mailLabel; 29 delete m_mailLabel;
38 } 30 }
39 m_mailLabel = new OClickableLabel( this ); 31 m_mailLabel = new OClickableLabel( this );
40 m_mailLabel->setMaximumHeight( 15 ); 32 m_mailLabel->setMaximumHeight( 15 );
41 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); 33 connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
42 34
43 if ( m_layout ) { 35 if ( m_layout ) {
44 delete m_layout; 36 delete m_layout;
45 } 37 }
46 m_layout = new QHBoxLayout( this ); 38 m_layout = new QHBoxLayout( this );
47 m_layout->setAutoAdd( true ); 39 m_layout->setAutoAdd( true );
48 40
49 readConfig(); 41 readConfig();
50 getInfo(); 42 getInfo();
51} 43}
52 44
53MailPluginWidget::~MailPluginWidget() { 45MailPluginWidget::~MailPluginWidget() {
54 delete m_mailLabel; 46 delete m_mailLabel;
55 delete m_layout; 47 delete m_layout;
56} 48}
57 49
58 50
59void MailPluginWidget::readConfig() { 51void MailPluginWidget::readConfig() {
60 Config cfg( "todaymailplugin" ); 52 Config cfg( "todaymailplugin" );
61 cfg.setGroup( "config" ); 53 cfg.setGroup( "config" );
62} 54}
63 55
64 56
65void MailPluginWidget::refresh() { 57void MailPluginWidget::refresh() {
66 getInfo(); 58 getInfo();
67} 59}
68 60
69void MailPluginWidget::getInfo() { 61void MailPluginWidget::getInfo() {
70 62
71 Config cfg( "opiemail" ); 63 Config cfg( "opiemail" );
72 cfg.setGroup( "today" ); 64 cfg.setGroup( "today" );
73 65
74 int NEW_MAILS = cfg.readNumEntry( "newmails", 0 ); 66 int NEW_MAILS = cfg.readNumEntry( "newmails", 0 );
75 int OUTGOING = cfg.readNumEntry( "outgoing", 0 ); 67 int OUTGOING = cfg.readNumEntry( "outgoing", 0 );
76 68
77 //QString output = QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ); 69 //QString output = QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING );
78 70
79 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ) ); 71 m_mailLabel->setText( QObject::tr( "<b>%1</b> new mail(s), <b>%2</b> outgoing" ).arg( NEW_MAILS ).arg( OUTGOING ) );
80} 72}
81 73
82/** 74/**
83 * launches datebook 75 * launches datebook
84 */ 76 */
85void MailPluginWidget::startMail() { 77void MailPluginWidget::startMail() {
86 QCopEnvelope e("QPE/System", "execute(QString)"); 78 QCopEnvelope e("QPE/System", "execute(QString)");
87 e << QString( "mail" ); 79 e << QString( "mail" );
88} 80}
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.h b/core/pim/today/plugins/mail/mailpluginwidget.h
index c678833..a3b1388 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.h
+++ b/core/pim/today/plugins/mail/mailpluginwidget.h
@@ -1,49 +1,44 @@
1/* 1/*
2 * mailpluginwidget.h 2 * mailpluginwidget.h
3 * 3 *
4 * copyright : (c) 2002 by Maximilian Reiß 4 * copyright : (c) 2002,2003 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 16
17
18#ifndef MAIL_PLUGIN_WIDGET_H 17#ifndef MAIL_PLUGIN_WIDGET_H
19#define MAIL_PLUGIN_WIDGET_H 18#define MAIL_PLUGIN_WIDGET_H
20 19
21#include <qstring.h>
22#include <qwidget.h>
23#include <qlayout.h> 20#include <qlayout.h>
24 21
25#include <opie/tododb.h>
26#include <opie/oclickablelabel.h> 22#include <opie/oclickablelabel.h>
27 23
28class MailPluginWidget : public QWidget { 24class MailPluginWidget : public QWidget {
29 25
30 Q_OBJECT 26 Q_OBJECT
31 27
32
33public: 28public:
34 MailPluginWidget( QWidget *parent, const char *name ); 29 MailPluginWidget( QWidget *parent, const char *name );
35 ~MailPluginWidget(); 30 ~MailPluginWidget();
36 31
37 void refresh(); 32 void refresh();
38 33
39protected slots: 34protected slots:
40 void startMail(); 35 void startMail();
41 36
42private: 37private:
43 OClickableLabel* m_mailLabel; 38 OClickableLabel* m_mailLabel;
44 QHBoxLayout* m_layout; 39 QHBoxLayout* m_layout;
45 void readConfig(); 40 void readConfig();
46 void getInfo(); 41 void getInfo();
47}; 42};
48 43
49#endif 44#endif