summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/changelog8
-rw-r--r--core/pim/today/opie-today.control4
-rw-r--r--core/pim/today/today.cpp46
-rw-r--r--core/pim/today/today.h4
-rw-r--r--core/pim/today/todaybase.cpp40
-rw-r--r--core/pim/today/todaybase.h4
6 files changed, 87 insertions, 19 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog
index 96a4163..dd4cfc1 100644
--- a/core/pim/today/changelog
+++ b/core/pim/today/changelog
@@ -1,22 +1,30 @@
10.2.4
2
3* added support for email
4* autoupdates after 1 min
5* QCopEnvelope instead of system()
6* starting to use qvbox in gui
7
8
10.2.3 90.2.3
2 10
3* the 4 am release 11* the 4 am release
4* several bugfixes 12* several bugfixes
5 13
6 14
70.2.2 150.2.2
8 16
9* started working on calling other apps 17* started working on calling other apps
10* and finished it 18* and finished it
11 19
120.2.1 200.2.1
13 21
14* images no more inline 22* images no more inline
15* config dialog 23* config dialog
16 24
170.1.1 250.1.1
18 26
19* started changelog. 27* started changelog.
20* fixed segfault on empty/nonexistant todolist.xml 28* fixed segfault on empty/nonexistant todolist.xml
21* better handling for file location 29* better handling for file location
22 30
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control
index 515632b..3362a54 100644
--- a/core/pim/today/opie-today.control
+++ b/core/pim/today/opie-today.control
@@ -1,10 +1,10 @@
1Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png 1Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png pics/today/mail.png
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Maximilian Reiß <max.reiss@gmx.de> 4Maintainer: Maximilian Reiß <max.reiss@gmx.de>
5Architecture: arm 5Architecture: arm
6Version: 0.2.3 6Version: 0.2.4
7Depends: opie-base ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION)
8License: GPL 8License: GPL
9Description: today screen 9Description: today screen
10 A short overview over current appointments and tasks. 10 A short overview over current appointments and tasks.
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 00a8842..eb8b50c 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -14,81 +14,91 @@
14 * it under the terms of the GNU General Public License as published by * 14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include "today.h" 20#include "today.h"
21#include "minidom.h" 21#include "minidom.h"
22#include "TodoItem.h" 22#include "TodoItem.h"
23 23
24#include <qpe/datebookdb.h> 24#include <qpe/datebookdb.h>
25#include <qpe/timestring.h> 25#include <qpe/timestring.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27#include <qpe/qcopenvelope_qws.h> 27#include <qpe/qcopenvelope_qws.h>
28#include <qpe/qprocess.h> 28#include <qpe/qprocess.h>
29 29
30#include <qdir.h> 30#include <qdir.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qtextstream.h> 33#include <qtextstream.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qspinbox.h> 35#include <qspinbox.h>
36#include <qpushbutton.h> 36#include <qpushbutton.h>
37#include <qlabel.h> 37#include <qlabel.h>
38#include <qtimer.h>
38 39
39//#include <iostream.h> 40//#include <iostream.h>
40//#include <unistd.h> 41//#include <unistd.h>
41#include <stdlib.h> 42#include <stdlib.h>
42 43
43int MAX_LINES_TASK; 44int MAX_LINES_TASK;
44int MAX_CHAR_CLIP; 45int MAX_CHAR_CLIP;
45int MAX_LINES_MEET; 46int MAX_LINES_MEET;
46int SHOW_LOCATION; 47int SHOW_LOCATION;
47int SHOW_NOTES; 48int SHOW_NOTES;
48// show only later dates 49// show only later dates
49int ONLY_LATER = 1; 50int ONLY_LATER = 1;
50/* 51/*
51 * Constructs a Example which is a child of 'parent', with the 52 * Constructs a Example which is a child of 'parent', with the
52 * name 'name' and widget flags set to 'f' 53 * name 'name' and widget flags set to 'f'
53 */ 54 */
54Today::Today( QWidget* parent, const char* name, WFlags fl ) 55Today::Today( QWidget* parent, const char* name, WFlags fl )
55 : TodayBase( parent, name, fl ) 56 : TodayBase( parent, name, fl )
56{ 57{
57 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); 58 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) );
58 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); 59 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) );
59 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); 60 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) );
61 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
60 62
61 QDate date = QDate::currentDate(); 63 QDate date = QDate::currentDate();
62 QString time = (date.toString()); 64 QString time = (date.toString());
63 TextLabel1->setText(time); 65 TextLabel1->setText(time);
64 db = new DateBookDB; 66 db = new DateBookDB;
65 67
68 draw();
69}
70
71
72void Today::draw()
73{
66 init(); 74 init();
67 getDates(); 75 getDates();
76 getMail();
68 getTodo(); 77 getTodo();
69} 78 QTimer::singleShot( 60*1000, this, SLOT(draw()) );
70 79
80}
71 81
72void Today::init() 82void Today::init()
73{ 83{
74 // read config 84 // read config
75 Config cfg("today"); 85 Config cfg("today");
76 cfg.setGroup("BaseConfig"); 86 cfg.setGroup("BaseConfig");
77 87
78 // how many lines should be showed in the task section 88 // how many lines should be showed in the task section
79 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5); 89 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5);
80 // after how many chars should the be cut off on tasks and notes 90 // after how many chars should the be cut off on tasks and notes
81 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30); 91 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",30);
82 // how many lines should be showed in the datebook section 92 // how many lines should be showed in the datebook section
83 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5); 93 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5);
84 // If location is to be showed too, 1 to activate it. 94 // If location is to be showed too, 1 to activate it.
85 SHOW_LOCATION = cfg.readNumEntry("showlocation",1); 95 SHOW_LOCATION = cfg.readNumEntry("showlocation",1);
86 // if notes should be shown 96 // if notes should be shown
87 SHOW_NOTES = cfg.readNumEntry("shownotes",0); 97 SHOW_NOTES = cfg.readNumEntry("shownotes",0);
88} 98}
89 99
90void Today::startConfig() 100void Today::startConfig()
91{ 101{
92 conf = new todayconfig ( this, "", true ); 102 conf = new todayconfig ( this, "", true );
93 103
94 104
@@ -105,52 +115,49 @@ void Today::startConfig()
105 conf->CheckBox1->setChecked(SHOW_LOCATION); 115 conf->CheckBox1->setChecked(SHOW_LOCATION);
106 // notes show box 116 // notes show box
107 conf->CheckBox2->setChecked(SHOW_NOTES); 117 conf->CheckBox2->setChecked(SHOW_NOTES);
108 // task lines 118 // task lines
109 conf->SpinBox2->setValue(MAX_LINES_TASK); 119 conf->SpinBox2->setValue(MAX_LINES_TASK);
110 // clip when? 120 // clip when?
111 conf->SpinBox7->setValue(MAX_CHAR_CLIP); 121 conf->SpinBox7->setValue(MAX_CHAR_CLIP);
112 122
113 conf->exec(); 123 conf->exec();
114 124
115 int maxlinestask = conf->SpinBox2->value(); 125 int maxlinestask = conf->SpinBox2->value();
116 int maxmeet = conf->SpinBox1->value(); 126 int maxmeet = conf->SpinBox1->value();
117 int location = conf->CheckBox1->isChecked(); 127 int location = conf->CheckBox1->isChecked();
118 int notes = conf->CheckBox2->isChecked(); 128 int notes = conf->CheckBox2->isChecked();
119 int maxcharclip = conf->SpinBox7->value(); 129 int maxcharclip = conf->SpinBox7->value();
120 130
121 cfg.writeEntry("maxlinestask",maxlinestask); 131 cfg.writeEntry("maxlinestask",maxlinestask);
122 cfg.writeEntry("maxcharclip", maxcharclip); 132 cfg.writeEntry("maxcharclip", maxcharclip);
123 cfg.writeEntry("maxlinesmeet",maxmeet); 133 cfg.writeEntry("maxlinesmeet",maxmeet);
124 cfg.writeEntry("showlocation",location); 134 cfg.writeEntry("showlocation",location);
125 cfg.writeEntry("shownotes", notes); 135 cfg.writeEntry("shownotes", notes);
126 // sync it to "disk" 136 // sync it to "disk"
127 cfg.write(); 137 cfg.write();
128 138
129 init(); 139 draw();
130 getDates();
131 getTodo();
132 //cout << location << endl;
133} 140}
134 141
135 142
136/* 143/*
137 * Get all events that are in the datebook xml file for today 144 * Get all events that are in the datebook xml file for today
138 */ 145 */
139void Today::getDates() 146void Today::getDates()
140{ 147{
141 QDate date = QDate::currentDate(); 148 QDate date = QDate::currentDate();
142 QTime time = QTime::currentTime(); 149 QTime time = QTime::currentTime();
143 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date); 150 QValueList<EffectiveEvent> list = db->getEffectiveEvents(date, date);
144 151
145 Config config( "qpe" ); 152 Config config( "qpe" );
146 // if 24 h format 153 // if 24 h format
147 // bool ampm = config.readBoolEntry( "AMPM", TRUE ); 154 // bool ampm = config.readBoolEntry( "AMPM", TRUE );
148 155
149 int count=0; 156 int count=0;
150 157
151 if ( list.count() > 0 ) { 158 if ( list.count() > 0 ) {
152 QString msg; 159 QString msg;
153 160
154 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); 161 for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin();
155 it!=list.end(); ++it ) { 162 it!=list.end(); ++it ) {
156 163
@@ -241,94 +248,119 @@ QList<TodoItem> Today::loadTodo(const char *filename)
241 { 248 {
242 QString s = attlist[j]->name; 249 QString s = attlist[j]->name;
243 if(s == "Priority") 250 if(s == "Priority")
244 { 251 {
245 priority = QString(attlist[j]->value).toInt(); 252 priority = QString(attlist[j]->value).toInt();
246 } 253 }
247 } 254 }
248 j++; 255 j++;
249 } 256 }
250 if(description) 257 if(description)
251 { 258 {
252 tmp = new TodoItem(description, completed, priority); 259 tmp = new TodoItem(description, completed, priority);
253 loadtodolist.append(tmp); 260 loadtodolist.append(tmp);
254 } 261 }
255 i++; 262 i++;
256 } 263 }
257 } 264 }
258 265
259 minidom_free(todo); 266 minidom_free(todo);
260 267
261 return loadtodolist; 268 return loadtodolist;
262} 269}
263 270
264 271
272void Today::getMail()
273{
274 Config cfg("opiemail");
275 cfg.setGroup("today");
276
277 // how many lines should be showed in the task section
278 int NEW_MAILS = cfg.readNumEntry("newmails",0);
279 int OUTGOING = cfg.readNumEntry("outgoing",0);
280
281 QString output = tr("<b>%1</b> new mails, <b>%2</b> outgoing").arg(NEW_MAILS).arg(OUTGOING);
282
283
284 MailField->setText(output);
285}
286
287
265/* 288/*
266 * Get the todos 289 * Get the todos
267 * 290 *
268 */ 291 */
269void Today::getTodo() 292void Today::getTodo()
270{ 293{
271 QString output; 294 QString output;
272 QString tmpout; 295 QString tmpout;
273 int count = 0; 296 int count = 0;
274 297
275 QDir dir; 298 QDir dir;
276 QString homedir = dir.homeDirPath (); 299 QString homedir = dir.homeDirPath ();
277 // see if todolist.xml does exist. 300 // see if todolist.xml does exist.
278 QFile f(homedir +"/Applications/todolist/todolist.xml"); 301 QFile f(homedir +"/Applications/todolist/todolist.xml");
279 if ( f.exists() ) 302 if ( f.exists() )
280 { 303 {
281 QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml"); 304 QList<TodoItem> todolist = loadTodo(homedir +"/Applications/todolist/todolist.xml");
282 305
283 TodoItem *item; 306 TodoItem *item;
284 for( item = todolist.first(); item; item = todolist.next()) 307 for( item = todolist.first(); item; item = todolist.next())
285 { 308 {
286 if (!(item->getCompleted() == 1) ) 309 if (!(item->getCompleted() == 1) )
287 { 310 {
288 count++; 311 count++;
289 if (count <= MAX_LINES_TASK) 312 if (count <= MAX_LINES_TASK)
290 { 313 {
291 tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>"))); 314 tmpout += "<b>- </b>" + QString(((item)->getDescription().mid(0, MAX_CHAR_CLIP) + ("<br>")));
292 } 315 }
293 } 316 }
294 } 317 }
295 } 318 }
296 319
297 if (count > 0) 320 if (count > 0)
298 { 321 {
299 output = QString("There are <b> %1</b> active tasks: <br>").arg(count); 322 output = QString("There are <b> %1</b> active tasks: <br>").arg(count);
300 output += tmpout; 323 output += tmpout;
301 } 324 }
302 else 325 else
303 { 326 {
304 output = ("No active tasks"); 327 output = ("No active tasks");
305 } 328 }
306 329
307 TodoField->setText(output); 330 TodoField->setText(output);
308} 331}
309 332
310/* 333/*
311 * lanches datebook 334 * launches datebook
312 */ 335 */
313void Today::startDatebook() 336void Today::startDatebook()
314{ 337{
315 QCopEnvelope e("QPE/System", "execute(QString)"); 338 QCopEnvelope e("QPE/System", "execute(QString)");
316 e << QString("datebook"); 339 e << QString("datebook");
317} 340}
318 341
319/* 342/*
320 * lanches todolist 343 * launches todolist
321 */ 344 */
322void Today::startTodo() 345void Today::startTodo()
323{ 346{
324 QCopEnvelope e("QPE/System", "execute(QString)"); 347 QCopEnvelope e("QPE/System", "execute(QString)");
325 e << QString("todolist"); 348 e << QString("todolist");
326} 349}
327 350
328/* 351/*
352 * launch opiemail
353 */
354void Today::startMail()
355{
356 QCopEnvelope e("QPE/System", "execute(QString)");
357 e << QString("opiemail");
358}
359
360/*
329 * Destroys the object and frees any allocated resources 361 * Destroys the object and frees any allocated resources
330 */ 362 */
331Today::~Today() 363Today::~Today()
332{ 364{
333 // no need to delete child widgets, Qt does it all for us 365 // no need to delete child widgets, Qt does it all for us
334} 366}
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index 50a10f1..6b8c0bf 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -20,42 +20,44 @@
20 20
21#ifndef TODAY_H 21#ifndef TODAY_H
22#define TODAY_H 22#define TODAY_H
23#include "todaybase.h" 23#include "todaybase.h"
24 24
25#include <qpe/datebookdb.h> 25#include <qpe/datebookdb.h>
26 26
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qlist.h> 28#include <qlist.h>
29#include "TodoItem.h" 29#include "TodoItem.h"
30#include "todayconfig.h" 30#include "todayconfig.h"
31 31
32class Today : public TodayBase 32class Today : public TodayBase
33{ 33{
34 Q_OBJECT 34 Q_OBJECT
35 35
36 public: 36 public:
37 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 37 Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
38 ~Today(); 38 ~Today();
39 39
40 private slots: 40 private slots:
41 void startConfig(); 41 void startConfig();
42 void startTodo(); 42 void startTodo();
43 void startDatebook(); 43 void startDatebook();
44 44 void startMail();
45 void draw();
45 private: 46 private:
46 void init(); 47 void init();
47 void getDates(); 48 void getDates();
48 void getTodo(); 49 void getTodo();
50 void getMail();
49 QList<TodoItem> loadTodo(const char *filename); 51 QList<TodoItem> loadTodo(const char *filename);
50 private: 52 private:
51 DateBookDB *db; 53 DateBookDB *db;
52 todayconfig *conf; 54 todayconfig *conf;
53 //Config cfg; 55 //Config cfg;
54 int MAX_LINES_TASK; 56 int MAX_LINES_TASK;
55 int MAX_CHAR_CLIP; 57 int MAX_CHAR_CLIP;
56 int MAX_LINES_MEET; 58 int MAX_LINES_MEET;
57 int SHOW_LOCATION; 59 int SHOW_LOCATION;
58 int SHOW_NOTES; 60 int SHOW_NOTES;
59}; 61};
60#endif // TODAY_H 62#endif // TODAY_H
61 63
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index b60c915..9331ee3 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -25,115 +25,139 @@
25#include <qvariant.h> 25#include <qvariant.h>
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qwhatsthis.h> 27#include <qwhatsthis.h>
28#include <qimage.h> 28#include <qimage.h>
29#include <qpixmap.h> 29#include <qpixmap.h>
30//#include <qscrollview.h> 30//#include <qscrollview.h>
31 31
32#include <qpe/resource.h> 32#include <qpe/resource.h>
33 33
34/* 34/*
35 * Constructs a TodayBase which is a child of 'parent', with the 35 * Constructs a TodayBase which is a child of 'parent', with the
36 * name 'name' and widget flags set to 'f' 36 * name 'name' and widget flags set to 'f'
37 */ 37 */
38TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) 38TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl )
39 : QWidget( parent, name, fl ) 39 : QWidget( parent, name, fl )
40{ 40{
41 // logo 41 // logo
42 QPixmap logo = Resource::loadPixmap( "today/today_logo"); 42 QPixmap logo = Resource::loadPixmap( "today/today_logo");
43 // datebook 43 // datebook
44 QPixmap datebook = Resource::loadPixmap("DateBook"); 44 QPixmap datebook = Resource::loadPixmap("DateBook");
45 // todo 45 // todo
46 QPixmap todo = Resource::loadPixmap( "TodoList" ); 46 QPixmap todo = Resource::loadPixmap( "TodoList" );
47 // config icon 47 // config icon
48 QPixmap config = Resource::loadPixmap( "today/config" ); 48 QPixmap config = Resource::loadPixmap( "today/config" );
49 // mail icon
50 QPixmap mail = Resource::loadPixmap( "today/mail" );
49 51
50 if ( !name ) 52
51 setName( "TodayBase" ); 53 //if ( !name )
52 resize( 223, 307 ); 54 // setName( "TodayBase" );
55 //resize( 223, 307 );
53 56
54 QVBoxLayout * layout = new QVBoxLayout(this); 57 QVBoxLayout * layout = new QVBoxLayout(this);
55 58
56 Frame4 = new QFrame( this, "Frame4" ); 59 Frame4 = new QFrame( this, "Frame4" );
57 Frame4->setFrameShape( QScrollView::StyledPanel ); 60 Frame4->setFrameShape( QScrollView::StyledPanel );
58 Frame4->setFrameShadow( QScrollView::Sunken ); 61 Frame4->setFrameShadow( QScrollView::Sunken );
59 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin ); 62 Frame4->setBackgroundOrigin( QScrollView::ParentOrigin );
60 63
61 // hehe, qt is ... 64 // hehe, qt is ...
62 getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" ); 65 getridoffuckingstrippeldlinesbutton = new QPushButton (Frame4, "asdfsad" );
63 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); 66 getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) );
64 67
65 DatesButton = new QPushButton (Frame4, "DatesButton" ); 68 DatesButton = new QPushButton (Frame4, "DatesButton" );
66 DatesButton->setGeometry( QRect( 2, 10, 36, 32 ) ); 69 DatesButton->setGeometry( QRect( 2, 4, 36, 32 ) );
67 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 70 DatesButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
68 DatesButton->setPixmap( datebook ); 71 DatesButton->setPixmap( datebook );
69 DatesButton->setFlat( TRUE ); 72 DatesButton->setFlat( TRUE );
70 73
71 DatesField = new QLabel( Frame4, "DatesField" ); 74 DatesField = new QLabel( Frame4, "DatesField" );
72 DatesField->setGeometry( QRect( 40, 10, 203, 120 ) ); 75 DatesField->setGeometry( QRect( 40, 4, 203, 120 ) );
73 DatesField->setText( tr( "No appointments today" ) ); 76 DatesField->setText( tr( "No appointments today" ) );
74 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 77 DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
75 78
76 // today logo 79 // today logo
77 Frame = new QLabel( this, "Frame" ); 80 Frame = new QLabel( this, "Frame" );
78 QPalette pal; 81 QPalette pal;
79 QColorGroup cg; 82 QColorGroup cg;
80 cg.setColor( QColorGroup::Text, white ); 83 cg.setColor( QColorGroup::Text, white );
81 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); 84 cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) );
82 pal.setActive( cg ); 85 pal.setActive( cg );
83 86
84 Frame->setPalette( pal ); 87 Frame->setPalette( pal );
85 Frame->setFrameShape( QFrame::StyledPanel ); 88 Frame->setFrameShape( QFrame::StyledPanel );
86 Frame->setFrameShadow( QFrame::Raised ); 89 Frame->setFrameShadow( QFrame::Raised );
87 Frame->setLineWidth( 0 ); 90 Frame->setLineWidth( 0 );
88 Frame->setMaximumHeight(50); 91 Frame->setMaximumHeight(50);
89 Frame->setMinimumHeight(50); 92 Frame->setMinimumHeight(50);
90 // date 93 // date
91 TextLabel1 = new QLabel( Frame, "TextLabel1" ); 94 TextLabel1 = new QLabel( Frame, "TextLabel1" );
92 TextLabel1->setPalette( pal ); 95 TextLabel1->setPalette( pal );
93 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) ); 96 TextLabel1->setGeometry( QRect( 10, 35, 168, 12 ) );
94 QFont TextLabel1_font( TextLabel1->font() ); 97 QFont TextLabel1_font( TextLabel1->font() );
95 TextLabel1_font.setBold( TRUE ); 98 TextLabel1_font.setBold( TRUE );
96 TextLabel1->setFont( TextLabel1_font ); 99 TextLabel1->setFont( TextLabel1_font );
97 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin ); 100 TextLabel1->setBackgroundOrigin( QLabel::ParentOrigin );
98 TextLabel1->setTextFormat( QLabel::AutoText ); 101 TextLabel1->setTextFormat( QLabel::AutoText );
99 102
100 // todo 103 // todo
101 Frame15 = new QFrame( this, "Frame15" ); 104 Frame15 = new QFrame( this, "Frame15" );
102 Frame15->setFrameShape( QFrame::StyledPanel ); 105 Frame15->setFrameShape( QFrame::StyledPanel );
103 Frame15->setFrameShadow( QFrame::Sunken ); 106 Frame15->setFrameShadow( QFrame::Sunken );
104 107
105 TodoButton = new QPushButton (Frame15, "TodoButton" ); 108 TodoButton = new QPushButton (Frame15, "TodoButton" );
106 TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); 109 TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) );
107 TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin ); 110 TodoButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
108 TodoButton->setPixmap( todo ); 111 TodoButton->setPixmap( todo );
109 TodoButton->setFlat( TRUE ); 112 TodoButton->setFlat( TRUE );
110 113
111 TodoField = new QLabel( Frame15, "TodoField" ); 114 TodoField = new QLabel( Frame15, "TodoField" );
112 TodoField->setGeometry( QRect( 40, 10, 196, 120 ) ); 115 TodoField->setGeometry( QRect( 40, 4, 196, 120 ) );
113 TodoField->setFrameShadow( QLabel::Plain ); 116 TodoField->setFrameShadow( QLabel::Plain );
114 TodoField->setText( tr( "No current todos" ) ); 117 TodoField->setText( tr( "No current todos" ) );
115 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); 118 TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
116 119
117 PushButton1 = new QPushButton (Frame15, "PushButton1" ); 120 PushButton1 = new QPushButton (Frame15, "PushButton1" );
118 PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) ); 121 PushButton1->setGeometry( QRect( 216, 68, 25, 21 ) );
119 PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin ); 122 PushButton1->setBackgroundOrigin( QPushButton::WidgetOrigin );
120 PushButton1->setPixmap( config ); 123 PushButton1->setPixmap( config );
121 PushButton1->setAutoDefault( TRUE ); 124 PushButton1->setAutoDefault( TRUE );
122 PushButton1->setFlat( TRUE ); 125 PushButton1->setFlat( TRUE );
123 126
127 // mail
128 MailFrame = new QFrame( this, "MailFrame" );
129 MailFrame->setFrameShape( QScrollView::StyledPanel );
130 MailFrame->setFrameShadow( QScrollView::Sunken );
131 MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin );
132
133 MailButton = new QPushButton (MailFrame, "MailButton" );
134 MailButton->setGeometry( QRect( 2, 10, 36, 19 ) );
135 MailButton->setBackgroundOrigin( QPushButton::WidgetOrigin );
136 MailButton->setPixmap( mail );
137 MailButton->setFlat( TRUE );
138
139 MailField = new QLabel( MailFrame, "DatesField" );
140 MailField->setGeometry( QRect( 40, 10, 203, 120 ) );
141 MailField->setText( tr( "Opiemail not installed" ) );
142 MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) );
143 MailField->setMaximumHeight(15);
144 MailField->setMinimumHeight(10);
145
124 layout->addWidget(Frame); 146 layout->addWidget(Frame);
125 layout->addWidget(Frame4); 147 layout->addWidget(Frame4);
148 layout->addWidget(MailFrame);
126 layout->addWidget(Frame15); 149 layout->addWidget(Frame15);
127 150
128 layout->setStretchFactor(Frame4,3); 151 layout->setStretchFactor(Frame4,4);
129 layout->setStretchFactor(Frame15,2); 152 layout->setStretchFactor(MailFrame,1);
153 layout->setStretchFactor(Frame15,3);
130} 154}
131 155
132/* 156/*
133 * Destroys the object and frees any allocated resources 157 * Destroys the object and frees any allocated resources
134 */ 158 */
135TodayBase::~TodayBase() 159TodayBase::~TodayBase()
136{ 160{
137 // no need to delete child widgets, Qt does it all for us 161 // no need to delete child widgets, Qt does it all for us
138} 162}
139 163
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index 69c6363..15f021a 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -11,37 +11,39 @@
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qwidget.h> 13#include <qwidget.h>
14#include <qscrollview.h> 14#include <qscrollview.h>
15 15
16class QVBoxLayout; 16class QVBoxLayout;
17class QHBoxLayout; 17class QHBoxLayout;
18class QGridLayout; 18class QGridLayout;
19class QFrame; 19class QFrame;
20class QLabel; 20class QLabel;
21class QPushButton; 21class QPushButton;
22 22
23class TodayBase : public QWidget 23class TodayBase : public QWidget
24{ 24{
25 Q_OBJECT 25 Q_OBJECT
26 26
27public: 27public:
28 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 28 TodayBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
29 ~TodayBase(); 29 ~TodayBase();
30 30
31 QFrame* Frame4; 31 QFrame* Frame4;
32 QPushButton* DatesButton; 32 QPushButton* DatesButton;
33 QLabel* DatesField; 33 QLabel* DatesField;
34 QLabel* Frame; 34 QLabel* Frame;
35 //QFrame* Frame; 35 QFrame* MailFrame;
36 QLabel* TextLabel1; 36 QLabel* TextLabel1;
37 QFrame* Frame15; 37 QFrame* Frame15;
38 QLabel* TodoField; 38 QLabel* TodoField;
39 QLabel* MailField;
39 QPushButton* PushButton1; 40 QPushButton* PushButton1;
40 QPushButton* TodoButton; 41 QPushButton* TodoButton;
42 QPushButton* MailButton;
41 QPushButton* getridoffuckingstrippeldlinesbutton; 43 QPushButton* getridoffuckingstrippeldlinesbutton;
42 44
43protected: 45protected:
44 46
45}; 47};
46 48
47#endif // TODAYBASE_H 49#endif // TODAYBASE_H