-rw-r--r-- | core/pim/today/today.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 2497ee1..5e5d373 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -1,88 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | * today.cpp | 2 | * today.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003 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 | 18 | ||
19 | #define QTOPIA_INTERNAL_LANGLIST | 19 | #define QTOPIA_INTERNAL_LANGLIST |
20 | 20 | ||
21 | #include "today.h" | 21 | #include "today.h" |
22 | #include <opie/todayconfigwidget.h> | ||
23 | 22 | ||
24 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
25 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
26 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
27 | #include <qpe/global.h> | 26 | #include <qpe/global.h> |
28 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
29 | #include <qpe/contact.h> | 28 | #include <qpe/contact.h> |
30 | 29 | ||
31 | #include <qdir.h> | 30 | #include <qdir.h> |
32 | #include <qfile.h> | 31 | #include <qfile.h> |
33 | #include <qpushbutton.h> | ||
34 | #include <qlabel.h> | ||
35 | #include <qtimer.h> | 32 | #include <qtimer.h> |
36 | #include <qpixmap.h> | ||
37 | #include <qlayout.h> | ||
38 | #include <qhbox.h> | ||
39 | #include <opie/otabwidget.h> | ||
40 | #include <qdialog.h> | ||
41 | #include <qwhatsthis.h> | 33 | #include <qwhatsthis.h> |
42 | #include <qtranslator.h> | 34 | #include <qtranslator.h> |
43 | 35 | ||
44 | struct TodayPlugin { | 36 | struct TodayPlugin { |
45 | TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} | 37 | TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} |
46 | QLibrary *library; | 38 | QLibrary *library; |
47 | QInterfacePtr<TodayPluginInterface> iface; | 39 | QInterfacePtr<TodayPluginInterface> iface; |
48 | TodayPluginObject *guiPart; | 40 | TodayPluginObject *guiPart; |
49 | QWidget *guiBox; | 41 | QWidget *guiBox; |
50 | QString name; | 42 | QString name; |
51 | bool active; | 43 | bool active; |
52 | bool excludeRefresh; | 44 | bool excludeRefresh; |
53 | int pos; | 45 | int pos; |
54 | }; | 46 | }; |
55 | 47 | ||
56 | static QValueList<TodayPlugin> pluginList; | 48 | static QValueList<TodayPlugin> pluginList; |
57 | 49 | ||
58 | Today::Today( QWidget* parent, const char* name, WFlags fl ) | 50 | Today::Today( QWidget* parent, const char* name, WFlags fl ) |
59 | : TodayBase( parent, name, fl ) { | 51 | : TodayBase( parent, name, fl ) { |
60 | 52 | ||
61 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); | 53 | QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); |
62 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); | 54 | QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); |
63 | 55 | ||
64 | #if defined(Q_WS_QWS) | 56 | #if defined(Q_WS_QWS) |
65 | #if !defined(QT_NO_COP) | 57 | #if !defined(QT_NO_COP) |
66 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); | 58 | QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); |
67 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), | 59 | connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), |
68 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); | 60 | this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); |
69 | #endif | 61 | #endif |
70 | #endif | 62 | #endif |
71 | 63 | ||
72 | setOwnerField(); | 64 | setOwnerField(); |
73 | m_refreshTimer = new QTimer( this ); | 65 | m_refreshTimer = new QTimer( this ); |
74 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); | 66 | connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); |
75 | m_refreshTimer->start( 15000 ); | 67 | m_refreshTimer->start( 15000 ); |
76 | //init(); | 68 | //init(); |
77 | loadPlugins(); | 69 | loadPlugins(); |
78 | showMaximized(); | 70 | showMaximized(); |
79 | } | 71 | } |
80 | 72 | ||
81 | /** | 73 | /** |
82 | * Qcop receive method. | 74 | * Qcop receive method. |
83 | */ | 75 | */ |
84 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { | 76 | void Today::channelReceived( const QCString &msg, const QByteArray & data ) { |
85 | QDataStream stream( data, IO_ReadOnly ); | 77 | QDataStream stream( data, IO_ReadOnly ); |
86 | if ( msg == "message(QString)" ) { | 78 | if ( msg == "message(QString)" ) { |
87 | QString message; | 79 | QString message; |
88 | stream >> message; | 80 | stream >> message; |