summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/configwidget.h3
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/today.pro2
-rw-r--r--core/pim/today/todaybase.h17
4 files changed, 11 insertions, 15 deletions
diff --git a/core/pim/today/configwidget.h b/core/pim/today/configwidget.h
index f3a83f9..f449db4 100644
--- a/core/pim/today/configwidget.h
+++ b/core/pim/today/configwidget.h
@@ -1,18 +1,17 @@
1 1
2#ifndef CONFIG_WIDGET_H 2#ifndef CONFIG_WIDGET_H
3#define CONFIG_WIDGET_H 3#define CONFIG_WIDGET_H
4 4
5#include <qwidget.h>
6 5
7 6
8class ConfigWidget : public QWidget { 7class ConfigWidget : public QWidget {
9 Q_OBJECT 8
10public: 9public:
11 10
12 ConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {}; 11 ConfigWidget( QWidget *parent, const char *name ) : QWidget( parent, name ) {};
13 virtual ~ConfigWidget() {}; 12 virtual ~ConfigWidget() {};
14 13
15 virtual void writeConfig() = 0; 14 virtual void writeConfig() = 0;
16}; 15};
17 16
18#endif 17#endif
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 7decf8e..09540bd 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -109,31 +109,30 @@ void Today::init() {
109 // read config 109 // read config
110 Config cfg( "today" ); 110 Config cfg( "today" );
111 111
112 cfg.setGroup( "Applets" ); 112 cfg.setGroup( "Applets" );
113 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); 113 m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' );
114} 114}
115 115
116 116
117/** 117/**
118 * Load the plugins 118 * Load the plugins
119 */ 119 */
120void Today::loadPlugins() { 120void Today::loadPlugins() {
121 qWarning("pluginList count %d", pluginList.count() ); 121
122 QValueList<TodayPlugin>::Iterator tit; 122 QValueList<TodayPlugin>::Iterator tit;
123 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) { 123 for ( tit = pluginList.begin(); tit != pluginList.end(); ++tit ) {
124 (*tit).library->unload(); 124 (*tit).library->unload();
125 delete (*tit).library; 125 delete (*tit).library;
126 } 126 }
127 pluginList.clear();
128 127
129 QString path = QPEApplication::qpeDir() + "/plugins/today"; 128 QString path = QPEApplication::qpeDir() + "/plugins/today";
130 QDir dir( path, "lib*.so" ); 129 QDir dir( path, "lib*.so" );
131 130
132 QStringList list = dir.entryList(); 131 QStringList list = dir.entryList();
133 QStringList::Iterator it; 132 QStringList::Iterator it;
134 133
135 uint count = 0; 134 uint count = 0;
136 for ( it = list.begin(); it != list.end(); ++it ) { 135 for ( it = list.begin(); it != list.end(); ++it ) {
137 TodayPluginInterface *iface = 0; 136 TodayPluginInterface *iface = 0;
138 QLibrary *lib = new QLibrary( path + "/" + *it ); 137 QLibrary *lib = new QLibrary( path + "/" + *it );
139 138
@@ -150,25 +149,24 @@ void Today::loadPlugins() {
150 plugin.active = true; 149 plugin.active = true;
151 } else { 150 } else {
152 plugin.active = false; 151 plugin.active = false;
153 } 152 }
154 plugin.guiPart = plugin.iface->guiPart(); 153 plugin.guiPart = plugin.iface->guiPart();
155 pluginList.append( plugin ); 154 pluginList.append( plugin );
156 count++; 155 count++;
157 } else { 156 } else {
158 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() ); 157 qDebug( "could not recognize %s", QString( path + "/" + *it ).latin1() );
159 delete lib; 158 delete lib;
160 } 159 }
161 } 160 }
162 qWarning("pluginList count end %d", pluginList.count() );
163} 161}
164 162
165 163
166/** 164/**
167 * Repaint method. Reread all fields. 165 * Repaint method. Reread all fields.
168 */ 166 */
169void Today::draw() { 167void Today::draw() {
170 168
171 if ( pluginLayout ) { 169 if ( pluginLayout ) {
172 delete pluginLayout; 170 delete pluginLayout;
173 } 171 }
174 pluginLayout = new QVBoxLayout( layout ); 172 pluginLayout = new QVBoxLayout( layout );
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index 5328d9f..8596da3 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -1,16 +1,16 @@
1 TEMPLATE= app 1 TEMPLATE= app
2 CONFIG = qt warn_on debug 2 CONFIG = qt warn_on debug
3 #CONFIG = qt warn_on release 3 #CONFIG = qt warn_on release
4 HEADERS = today.h todaybase.h todayconfig.h configwidget.h 4 HEADERS = today.h todaybase.h todayconfig.h
5 SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp 5 SOURCES = main.cpp today.cpp todaybase.cpp todayconfig.cpp
6 INCLUDEPATH+= $(OPIEDIR)/include 6 INCLUDEPATH+= $(OPIEDIR)/include
7 DEPENDPATH+= $(OPIEDIR)/include 7 DEPENDPATH+= $(OPIEDIR)/include
8LIBS += -lqpe -lopie 8LIBS += -lqpe -lopie
9 INTERFACES= 9 INTERFACES=
10 TARGET = today 10 TARGET = today
11 DESTDIR = $(OPIEDIR)/bin 11 DESTDIR = $(OPIEDIR)/bin
12 12
13TRANSLATIONS = ../../../i18n/de/today.ts \ 13TRANSLATIONS = ../../../i18n/de/today.ts \
14 ../../../i18n/en/today.ts \ 14 ../../../i18n/en/today.ts \
15 ../../../i18n/es/today.ts \ 15 ../../../i18n/es/today.ts \
16 ../../../i18n/fr/today.ts \ 16 ../../../i18n/fr/today.ts \
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index 0e53510..7c50f32 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -9,46 +9,45 @@
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#ifndef TODAYBASE_H 17#ifndef TODAYBASE_H
18#define TODAYBASE_H 18#define TODAYBASE_H
19 19
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qguardedptr.h>
22#include <opie/oclickablelabel.h> 21#include <opie/oclickablelabel.h>
23 22
24class QVBox; 23class QVBox;
25class QGridLayout; 24class QGridLayout;
26class QFrame; 25class QFrame;
27class QLabel; 26class QLabel;
28class QPushButton; 27class QPushButton;
29class QBoxLayout; 28class QBoxLayout;
30 29
31 30
32class TodayBase : public QWidget 31class TodayBase : public QWidget
33{ 32{
34 Q_OBJECT 33 Q_OBJECT
35 34
36public: 35public:
37 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 36 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
38 ~TodayBase(); 37 ~TodayBase();
39 38
40 QGuardedPtr<QFrame> Frame4; 39 QFrame* Frame4;
41 QGuardedPtr<QPushButton> DatesButton; 40 QPushButton* DatesButton;
42 QGuardedPtr<QVBoxLayout> layout; 41 QVBoxLayout* layout;
43 QGuardedPtr<OClickableLabel> OwnerField; 42 OClickableLabel* OwnerField;
44 QGuardedPtr<QLabel> Frame; 43 QLabel* Frame;
45 QGuardedPtr<QLabel> DateLabel; 44 QLabel* DateLabel;
46 QGuardedPtr<QFrame> Frame15; 45 QFrame* Frame15;
47 QGuardedPtr<OClickableLabel> ConfigButton; 46 OClickableLabel* ConfigButton;
48 47
49protected: 48protected:
50 49
51 50
52}; 51};
53 52
54#endif 53#endif