summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-04-15 20:30:41 (UTC)
committer harlekin <harlekin>2002-04-15 20:30:41 (UTC)
commit15244683bb97d303d0d3b6104b46a9b429aaed85 (patch) (unidiff)
treece57768177baec8b90146245a8cfad669addf647
parent551eb586e6a19db69348b0bb38f06171201d89a0 (diff)
downloadopie-15244683bb97d303d0d3b6104b46a9b429aaed85.zip
opie-15244683bb97d303d0d3b6104b46a9b429aaed85.tar.gz
opie-15244683bb97d303d0d3b6104b46a9b429aaed85.tar.bz2
added a configurable delay, so for example if 5 min are set, and the suspend time is shorter, no app is autostarted
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp41
-rw-r--r--core/launcher/desktop.h2
-rw-r--r--core/launcher/launcher.cpp82
-rw-r--r--core/pim/today/today.cpp27
-rw-r--r--core/pim/today/todayconfig.cpp57
-rw-r--r--core/pim/today/todayconfig.h39
6 files changed, 150 insertions, 98 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index cf33011..43006f1 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -26,46 +26,47 @@
26#include "shutdownimpl.h" 26#include "shutdownimpl.h"
27#include "startmenu.h" 27#include "startmenu.h"
28#include "taskbar.h" 28#include "taskbar.h"
29#include "transferserver.h" 29#include "transferserver.h"
30#include "irserver.h" 30#include "irserver.h"
31#include "packageslave.h" 31#include "packageslave.h"
32 32
33#include <qpe/applnk.h> 33#include <qpe/applnk.h>
34#include <qpe/mimetype.h> 34#include <qpe/mimetype.h>
35#include <qpe/password.h> 35#include <qpe/password.h>
36#include <qpe/config.h> 36#include <qpe/config.h>
37#include <qpe/power.h> 37#include <qpe/power.h>
38#include <qpe/timeconversion.h>
38#include <qpe/qcopenvelope_qws.h> 39#include <qpe/qcopenvelope_qws.h>
39#include <qpe/global.h> 40#include <qpe/global.h>
40#ifdef QT_QWS_CUSTOM 41#ifdef QT_QWS_CUSTOM
41#include "qpe/custom.h" 42#include "qpe/custom.h"
42#endif 43#endif
43 44
44#include <qgfx_qws.h> 45#include <qgfx_qws.h>
45#include <qmainwindow.h> 46#include <qmainwindow.h>
46#include <qmessagebox.h> 47#include <qmessagebox.h>
47#include <qtimer.h> 48#include <qtimer.h>
48#include <qwindowsystem_qws.h> 49#include <qwindowsystem_qws.h>
49 50
50#include <qvaluelist.h> 51#include <qvaluelist.h>
51 52
52#include <stdlib.h> 53#include <stdlib.h>
53#include <unistd.h> 54#include <unistd.h>
54 55
55class QCopKeyRegister 56class QCopKeyRegister
56{ 57{
57public: 58public:
58 QCopKeyRegister() : keyCode(0) { } 59 QCopKeyRegister() : keyCode(0) { }
59 QCopKeyRegister(int k, const QString &c, const QString &m) 60 QCopKeyRegister(int k, const QString &c, const QString &m)
60 : keyCode(k), channel(c), message(m) { } 61 : keyCode(k), channel(c), message(m) { }
61 62
62 int getKeyCode() const { return keyCode; } 63 int getKeyCode() const { return keyCode; }
63 QString getChannel() const { return channel; } 64 QString getChannel() const { return channel; }
64 QString getMessage() const { return message; } 65 QString getMessage() const { return message; }
65 66
66private: 67private:
67 int keyCode; 68 int keyCode;
68 QString channel, message; 69 QString channel, message;
69}; 70};
70 71
71typedef QValueList<QCopKeyRegister> KeyRegisterList; 72typedef QValueList<QCopKeyRegister> KeyRegisterList;
@@ -159,32 +160,32 @@ DesktopApplication::~DesktopApplication()
159 160
160void DesktopApplication::receive( const QCString &msg, const QByteArray &data ) 161void DesktopApplication::receive( const QCString &msg, const QByteArray &data )
161{ 162{
162 QDataStream stream( data, IO_ReadOnly ); 163 QDataStream stream( data, IO_ReadOnly );
163 if (msg == "keyRegister(int key, QString channel, QString message)") 164 if (msg == "keyRegister(int key, QString channel, QString message)")
164 { 165 {
165 int k; 166 int k;
166 QString c, m; 167 QString c, m;
167 168
168 stream >> k; 169 stream >> k;
169 stream >> c; 170 stream >> c;
170 stream >> m; 171 stream >> m;
171 172
172 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m); 173 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m);
173 keyRegisterList.append(QCopKeyRegister(k,c,m)); 174 keyRegisterList.append(QCopKeyRegister(k,c,m));
174 } 175 }
175 else if (msg == "suspend()"){ 176 else if (msg == "suspend()"){
176 emit power(); 177 emit power();
177 } 178 }
178 179
179} 180}
180 181
181enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown; 182enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown;
182 183
183#ifdef Q_WS_QWS 184#ifdef Q_WS_QWS
184bool DesktopApplication::qwsEventFilter( QWSEvent *e ) 185bool DesktopApplication::qwsEventFilter( QWSEvent *e )
185{ 186{
186 qpedesktop->checkMemory(); 187 qpedesktop->checkMemory();
187 188
188 if ( e->type == QWSEvent::Key ) { 189 if ( e->type == QWSEvent::Key ) {
189 QWSKeyEvent *ke = (QWSKeyEvent *)e; 190 QWSKeyEvent *ke = (QWSKeyEvent *)e;
190 if ( !loggedin && ke->simpleData.keycode != Key_F34 ) 191 if ( !loggedin && ke->simpleData.keycode != Key_F34 )
@@ -268,25 +269,25 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
268 QWSMouseEvent *me = (QWSMouseEvent *)e; 269 QWSMouseEvent *me = (QWSMouseEvent *)e;
269 static bool up = TRUE; 270 static bool up = TRUE;
270 if ( me->simpleData.state&LeftButton ) { 271 if ( me->simpleData.state&LeftButton ) {
271 if ( up ) { 272 if ( up ) {
272 up = FALSE; 273 up = FALSE;
273 qpedesktop->screenClick(); 274 qpedesktop->screenClick();
274 } 275 }
275 } else { 276 } else {
276 up = TRUE; 277 up = TRUE;
277 } 278 }
278 } 279 }
279 } 280 }
280 281
281 return QPEApplication::qwsEventFilter( e ); 282 return QPEApplication::qwsEventFilter( e );
282} 283}
283#endif 284#endif
284 285
285void DesktopApplication::psTimeout() 286void DesktopApplication::psTimeout()
286{ 287{
287 qpedesktop->checkMemory(); // in case no events are being generated 288 qpedesktop->checkMemory(); // in case no events are being generated
288 289
289 *ps = PowerStatusManager::readStatus(); 290 *ps = PowerStatusManager::readStatus();
290 291
291 if ( (ps->batteryStatus() == PowerStatus::VeryLow ) ) { 292 if ( (ps->batteryStatus() == PowerStatus::VeryLow ) ) {
292 pa->alert( tr( "Battery is running very low." ), 6 ); 293 pa->alert( tr( "Battery is running very low." ), 6 );
@@ -538,32 +539,39 @@ void Desktop::raiseEmail()
538 Config cfg("qpe"); //F13, 'Mail' 539 Config cfg("qpe"); //F13, 'Mail'
539 cfg.setGroup("AppsKey"); 540 cfg.setGroup("AppsKey");
540 QString tempItem; 541 QString tempItem;
541 tempItem = cfg.readEntry("RightEnd","Mail"); 542 tempItem = cfg.readEntry("RightEnd","Mail");
542 if(tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty()) executeOrModify("Applications/qtmail.desktop"); 543 if(tempItem == "Mail" || tempItem == "qtmail" || tempItem.isEmpty()) executeOrModify("Applications/qtmail.desktop");
543 else { 544 else {
544 QCopEnvelope e("QPE/System","execute(QString)"); 545 QCopEnvelope e("QPE/System","execute(QString)");
545 e << tempItem; 546 e << tempItem;
546 } 547 }
547} 548}
548 549
549// autoStarts apps on resume and start 550// autoStarts apps on resume and start
550void Desktop::execAutoStart() 551void Desktop::execAutoStart() {
551{ 552 QString appName;
552 QString appName; 553 int delay;
553 Config cfg( "autostart" ); 554 QDateTime now = QDateTime::currentDateTime();
554 cfg.setGroup( "AutoStart" ); 555 Config cfg( "autostart" );
555 appName = cfg.readEntry("Apps", ""); 556 cfg.setGroup( "AutoStart" );
556 QCopEnvelope e("QPE/System", "execute(QString)"); 557 appName = cfg.readEntry("Apps", "");
557 e << QString(appName); 558 delay = (cfg.readEntry("Delay", "0" )).toInt();
559 // If the time between suspend and resume was longer then the
560 // value saved as delay, start the app
561 if ( suspendTime.secsTo(now) >= (delay*60) ) {
562 QCopEnvelope e("QPE/System", "execute(QString)");
563 e << QString(appName);
564 } else {
565 }
558} 566}
559 567
560#if defined(QPE_HAVE_TOGGLELIGHT) 568#if defined(QPE_HAVE_TOGGLELIGHT)
561#include <qpe/config.h> 569#include <qpe/config.h>
562 570
563#include <sys/ioctl.h> 571#include <sys/ioctl.h>
564#include <sys/types.h> 572#include <sys/types.h>
565#include <fcntl.h> 573#include <fcntl.h>
566#include <unistd.h> 574#include <unistd.h>
567#include <errno.h> 575#include <errno.h>
568#include <linux/ioctl.h> 576#include <linux/ioctl.h>
569#include <time.h> 577#include <time.h>
@@ -584,31 +592,32 @@ static void blankScreen()
584 592
585static void darkScreen() 593static void darkScreen()
586{ 594{
587 extern void qpe_setBacklight(int); 595 extern void qpe_setBacklight(int);
588 qpe_setBacklight(0); // force off 596 qpe_setBacklight(0); // force off
589} 597}
590 598
591 599
592void Desktop::togglePower() 600void Desktop::togglePower()
593{ 601{
594 bool wasloggedin = loggedin; 602 bool wasloggedin = loggedin;
595 loggedin=0; 603 loggedin=0;
604 suspendTime = QDateTime::currentDateTime();
596 darkScreen(); 605 darkScreen();
597 if ( wasloggedin ) 606 if ( wasloggedin )
598 blankScreen(); 607 blankScreen();
599 608
600 system("apm --suspend"); 609 system("apm --suspend");
601 610
602 611
603 612
604 QWSServer::screenSaverActivate( FALSE ); 613 QWSServer::screenSaverActivate( FALSE );
605 { 614 {
606 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep 615 QCopEnvelope("QPE/Card", "mtabChanged()" ); // might have changed while asleep
607 QCopEnvelope e("QPE/System", "setBacklight(int)"); 616 QCopEnvelope e("QPE/System", "setBacklight(int)");
608 e << -3; // Force on 617 e << -3; // Force on
609 } 618 }
610 if ( wasloggedin ) { 619 if ( wasloggedin ) {
611 login(TRUE); 620 login(TRUE);
612 } 621 }
613 sleep(1); 622 sleep(1);
614 execAutoStart(); 623 execAutoStart();
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h
index de0dbf0..e094dc0 100644
--- a/core/launcher/desktop.h
+++ b/core/launcher/desktop.h
@@ -18,24 +18,25 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef __DESKTOP_H__ 21#ifndef __DESKTOP_H__
22#define __DESKTOP_H__ 22#define __DESKTOP_H__
23 23
24 24
25#include "shutdownimpl.h" 25#include "shutdownimpl.h"
26 26
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28 28
29#include <qwidget.h> 29#include <qwidget.h>
30#include <qdatetime.h>
30 31
31class Background; 32class Background;
32class Launcher; 33class Launcher;
33class TaskBar; 34class TaskBar;
34class PowerStatus; 35class PowerStatus;
35class QCopBridge; 36class QCopBridge;
36class TransferServer; 37class TransferServer;
37class DesktopPowerAlerter; 38class DesktopPowerAlerter;
38class PackageSlave; 39class PackageSlave;
39 40
40class DesktopApplication : public QPEApplication 41class DesktopApplication : public QPEApplication
41{ 42{
@@ -117,18 +118,19 @@ protected:
117 QWidget *bg; 118 QWidget *bg;
118 Launcher *launcher; 119 Launcher *launcher;
119 TaskBar *tb; 120 TaskBar *tb;
120 121
121private: 122private:
122 void startTransferServer(); 123 void startTransferServer();
123 bool recoverMemory(); 124 bool recoverMemory();
124 125
125 QCopBridge *qcopBridge; 126 QCopBridge *qcopBridge;
126 TransferServer *transferServer; 127 TransferServer *transferServer;
127 PackageSlave *packageSlave; 128 PackageSlave *packageSlave;
128 129
130 QDateTime suspendTime;
129 bool keyclick,touchclick; 131 bool keyclick,touchclick;
130}; 132};
131 133
132 134
133#endif // __DESKTOP_H__ 135#endif // __DESKTOP_H__
134 136
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 1449269..979eee6 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -88,25 +88,25 @@ namespace {
88 }else{ 88 }else{
89 tmpMime = cfg->readBoolEntry("audio", true ); 89 tmpMime = cfg->readBoolEntry("audio", true );
90 if(tmpMime ) 90 if(tmpMime )
91 mimes.append("audio//*" ); 91 mimes.append("audio//*" );
92 92
93 tmpMime = cfg->readBoolEntry("image", true ); 93 tmpMime = cfg->readBoolEntry("image", true );
94 if(tmpMime ) 94 if(tmpMime )
95 mimes.append("image//*" ); 95 mimes.append("image//*" );
96 96
97 tmpMime = cfg->readBoolEntry("text", true ); 97 tmpMime = cfg->readBoolEntry("text", true );
98 if(tmpMime ) 98 if(tmpMime )
99 mimes.append("text//*"); 99 mimes.append("text//*");
100 100
101 tmpMime = cfg->readBoolEntry("video", true ); 101 tmpMime = cfg->readBoolEntry("video", true );
102 if(tmpMime ) 102 if(tmpMime )
103 mimes.append("video//*" ); 103 mimes.append("video//*" );
104 } 104 }
105 return mimes; 105 return mimes;
106 } 106 }
107 107
108} 108}
109 109
110 110
111CategoryTabWidget::CategoryTabWidget( QWidget* parent ) : 111CategoryTabWidget::CategoryTabWidget( QWidget* parent ) :
112 QVBox( parent ) 112 QVBox( parent )
@@ -540,28 +540,28 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
540 qWarning("loading Documents" ); 540 qWarning("loading Documents" );
541 qWarning("The currentTimeStamp is: %s", m_timeStamp.latin1() ); 541 qWarning("The currentTimeStamp is: %s", m_timeStamp.latin1() );
542 delete docsFolder; 542 delete docsFolder;
543 docsFolder = new DocLnkSet; 543 docsFolder = new DocLnkSet;
544 qWarning("new DocLnkSet" ); 544 qWarning("new DocLnkSet" );
545 DocLnkSet *tmp = 0; 545 DocLnkSet *tmp = 0;
546 QString home = QString(getenv("HOME")) + "/Documents"; 546 QString home = QString(getenv("HOME")) + "/Documents";
547 tmp = new DocLnkSet( home , QString::null); 547 tmp = new DocLnkSet( home , QString::null);
548 docsFolder->appendFrom( *tmp ); 548 docsFolder->appendFrom( *tmp );
549 delete tmp; 549 delete tmp;
550 // find out wich filesystems are new in this round 550 // find out wich filesystems are new in this round
551 // We will do this by having a timestamp inside each mountpoint 551 // We will do this by having a timestamp inside each mountpoint
552 // if the current timestamp doesn't match this is a new file system and 552 // if the current timestamp doesn't match this is a new file system and
553 // come up with our MediumMountGui :) let the hacking begin 553 // come up with our MediumMountGui :) let the hacking begin
554 int stamp = uidgen.generate(); 554 int stamp = uidgen.generate();
555 555
556 QString newStamp = QString::number( stamp ); // generates newtime Stamp 556 QString newStamp = QString::number( stamp ); // generates newtime Stamp
557 StorageInfo storage; 557 StorageInfo storage;
558 const QList<FileSystem> &fileSystems = storage.fileSystems(); 558 const QList<FileSystem> &fileSystems = storage.fileSystems();
559 QListIterator<FileSystem> it ( fileSystems ); 559 QListIterator<FileSystem> it ( fileSystems );
560 for ( ; it.current(); ++it ) { 560 for ( ; it.current(); ++it ) {
561 if ( (*it)->isRemovable() ) { // let's find out if we should search on it 561 if ( (*it)->isRemovable() ) { // let's find out if we should search on it
562 qWarning("%s is removeable", (*it)->path().latin1() ); 562 qWarning("%s is removeable", (*it)->path().latin1() );
563 OConfig cfg( (*it)->path() + "/.opiestorage.cf"); 563 OConfig cfg( (*it)->path() + "/.opiestorage.cf");
564 cfg.setGroup("main"); 564 cfg.setGroup("main");
565 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() ); 565 QString stamp = cfg.readEntry("timestamp", QDateTime::currentDateTime().toString() );
566 if( stamp == m_timeStamp ){ // ok we know this card 566 if( stamp == m_timeStamp ){ // ok we know this card
567 cfg.writeEntry("timestamp", newStamp ); //just write a new timestamp 567 cfg.writeEntry("timestamp", newStamp ); //just write a new timestamp
@@ -582,25 +582,25 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
582 }// no else 582 }// no else
583 }else{ // we checked 583 }else{ // we checked
584 // do something different see what we need to do 584 // do something different see what we need to do
585 // let's see if we should check the device 585 // let's see if we should check the device
586 cfg.setGroup("main" ); 586 cfg.setGroup("main" );
587 bool check = cfg.readBoolEntry("autocheck", true ); 587 bool check = cfg.readBoolEntry("autocheck", true );
588 if( check ){ // find the documents 588 if( check ){ // find the documents
589 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") ); 589 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") );
590 docsFolder->appendFrom( *tmp ); 590 docsFolder->appendFrom( *tmp );
591 delete tmp; 591 delete tmp;
592 } 592 }
593 } 593 }
594 } 594 }
595 } 595 }
596 } 596 }
597 m_timeStamp = newStamp; 597 m_timeStamp = newStamp;
598} 598}
599 599
600void Launcher::updateTabs() 600void Launcher::updateTabs()
601{ 601{
602 MimeType::updateApplications(); // ### reads all applnks twice 602 MimeType::updateApplications(); // ### reads all applnks twice
603 603
604 delete rootFolder; 604 delete rootFolder;
605 rootFolder = new AppLnkSet( MimeType::appsFolderName() ); 605 rootFolder = new AppLnkSet( MimeType::appsFolderName() );
606 606
@@ -678,25 +678,25 @@ void Launcher::updateLink(const QString& link)
678} 678}
679 679
680void Launcher::systemMessage( const QCString &msg, const QByteArray &data) 680void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
681{ 681{
682 QDataStream stream( data, IO_ReadOnly ); 682 QDataStream stream( data, IO_ReadOnly );
683 if ( msg == "closing(QString)" ){ 683 if ( msg == "closing(QString)" ){
684 QString app; 684 QString app;
685 stream >> app; 685 stream >> app;
686 qWarning("app closed %s", app.latin1() ); 686 qWarning("app closed %s", app.latin1() );
687 MRUList::removeTask( app ); 687 MRUList::removeTask( app );
688 }else if ( msg == "linkChanged(QString)" ) { 688 }else if ( msg == "linkChanged(QString)" ) {
689 QString link; 689 QString link;
690 stream >> link; 690 stream >> link;
691 if ( in_lnk_props ) { 691 if ( in_lnk_props ) {
692 got_lnk_change = TRUE; 692 got_lnk_change = TRUE;
693 lnk_change = link; 693 lnk_change = link;
694 } else { 694 } else {
695 updateLink(link); 695 updateLink(link);
696 } 696 }
697 } else if ( msg == "busy()" ) { 697 } else if ( msg == "busy()" ) {
698 emit busy(); 698 emit busy();
699 } else if ( msg == "notBusy(QString)" ) { 699 } else if ( msg == "notBusy(QString)" ) {
700 QString app; 700 QString app;
701 stream >> app; 701 stream >> app;
702 tabs->setBusy(FALSE); 702 tabs->setBusy(FALSE);
@@ -732,52 +732,66 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
732 QStringList entries = dir.entryList(); 732 QStringList entries = dir.entryList();
733 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) 733 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
734 dir.remove( *it ); 734 dir.remove( *it );
735 } else if ( msg == "sendHandshakeInfo()" ) { 735 } else if ( msg == "sendHandshakeInfo()" ) {
736 QString home = getenv( "HOME" ); 736 QString home = getenv( "HOME" );
737 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" ); 737 QCopEnvelope e( "QPE/Desktop", "handshakeInfo(QString,bool)" );
738 e << home; 738 e << home;
739 int locked = (int) Desktop::screenLocked(); 739 int locked = (int) Desktop::screenLocked();
740 e << locked; 740 e << locked;
741 // register an app for autostart 741 // register an app for autostart
742 // if clear is send the list is cleared. 742 // if clear is send the list is cleared.
743 } else if ( msg == "autoStart(QString)" ) { 743 } else if ( msg == "autoStart(QString)" ) {
744 QString appName; 744 QString appName;
745 stream >> appName; 745 stream >> appName;
746 Config cfg( "autostart" ); 746 Config cfg( "autostart" );
747 cfg.setGroup( "AutoStart" ); 747 cfg.setGroup( "AutoStart" );
748 if ( appName.compare("clear") == 0){ 748 if ( appName.compare("clear") == 0){
749 cfg.writeEntry("Apps", ""); 749 cfg.writeEntry("Apps", "");
750 } 750 }
751 } else if ( msg == "autoStart(QString,QString)" ) { 751 } else if ( msg == "autoStart(QString,QString)" ) {
752 QString modifier, appName; 752 QString modifier, appName;
753 stream >> modifier >> appName; 753 stream >> modifier >> appName;
754 Config cfg( "autostart" ); 754 Config cfg( "autostart" );
755 cfg.setGroup( "AutoStart" ); 755 cfg.setGroup( "AutoStart" );
756 if ( modifier.compare("add") == 0 ){ 756 if ( modifier.compare("add") == 0 ){
757 // only add it appname is entered 757 // only add if appname is entered
758 if (!appName.isEmpty()) { 758 if (!appName.isEmpty()) {
759 cfg.writeEntry("Apps", appName); 759 cfg.writeEntry("Apps", appName);
760 } 760 }
761 } else if (modifier.compare("remove") == 0 ) { 761 } else if (modifier.compare("remove") == 0 ) {
762 // need to change for multiple entries 762 // need to change for multiple entries
763 // actually remove is right now simular to clear, but in future there 763 // actually remove is right now simular to clear, but in future there
764 // should be multiple apps in autostart possible. 764 // should be multiple apps in autostart possible.
765 QString checkName; 765 QString checkName;
766 checkName = cfg.readEntry("Apps", ""); 766 checkName = cfg.readEntry("Apps", "");
767 if (checkName == appName) { 767 if (checkName == appName) {
768 cfg.writeEntry("Apps", ""); 768 cfg.writeEntry("Apps", "");
769 } 769 }
770 } 770 }
771 } else if ( msg == "sendCardInfo()" ) { 771 // case the autostart feature should be delayed
772 } else if ( msg == "autoStart(QString, QString, QString)") {
773 QString modifier, appName, delay;
774 stream >> modifier >> appName >> delay;
775 Config cfg( "autostart" );
776 cfg.setGroup( "AutoStart" );
777 if ( modifier.compare("add") == 0 ){
778 // only add it appname is entered
779 if (!appName.isEmpty()) {
780 cfg.writeEntry("Apps", appName);
781 cfg.writeEntry("Delay", delay);
782 }
783 } else {
784 }
785 } else if ( msg == "sendCardInfo()" ) {
772 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" ); 786 QCopEnvelope e( "QPE/Desktop", "cardInfo(QString)" );
773 const QList<FileSystem> &fs = storage->fileSystems(); 787 const QList<FileSystem> &fs = storage->fileSystems();
774 QListIterator<FileSystem> it ( fs ); 788 QListIterator<FileSystem> it ( fs );
775 QString s; 789 QString s;
776 QString homeDir = getenv("HOME"); 790 QString homeDir = getenv("HOME");
777 QString hardDiskHome; 791 QString hardDiskHome;
778 for ( ; it.current(); ++it ) { 792 for ( ; it.current(); ++it ) {
779 if ( (*it)->isRemovable() ) 793 if ( (*it)->isRemovable() )
780 s += (*it)->name() + "=" + (*it)->path() + "/Documents " 794 s += (*it)->name() + "=" + (*it)->path() + "/Documents "
781 + QString::number( (*it)->availBlocks() * (*it)->blockSize() ) 795 + QString::number( (*it)->availBlocks() * (*it)->blockSize() )
782 + " " + (*it)->options() + ";"; 796 + " " + (*it)->options() + ";";
783 else if ( (*it)->disk() == "/dev/mtdblock1" || 797 else if ( (*it)->disk() == "/dev/mtdblock1" ||
@@ -814,25 +828,25 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
814 cfg.writeEntry( app, date ); 828 cfg.writeEntry( app, date );
815 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1()); 829 //qDebug("setSyncDate(QString,QString) %s %s", app.latin1(), date.latin1());
816 } else if ( msg == "startSync(QString)" ) { 830 } else if ( msg == "startSync(QString)" ) {
817 QString what; 831 QString what;
818 stream >> what; 832 stream >> what;
819 delete syncDialog; syncDialog = 0; 833 delete syncDialog; syncDialog = 0;
820 syncDialog = new SyncDialog( this, "syncProgress", FALSE, 834 syncDialog = new SyncDialog( this, "syncProgress", FALSE,
821 WStyle_Tool | WStyle_Customize | 835 WStyle_Tool | WStyle_Customize |
822 Qt::WStyle_StaysOnTop ); 836 Qt::WStyle_StaysOnTop );
823 syncDialog->showMaximized(); 837 syncDialog->showMaximized();
824 syncDialog->whatLabel->setText( "<b>" + what + "</b>" ); 838 syncDialog->whatLabel->setText( "<b>" + what + "</b>" );
825 connect( syncDialog->buttonCancel, SIGNAL( clicked() ), 839 connect( syncDialog->buttonCancel, SIGNAL( clicked() ),
826 SLOT( cancelSync() ) ); 840 SLOT( cancelSync() ) );
827 } 841 }
828 else if ( msg == "stopSync()") { 842 else if ( msg == "stopSync()") {
829 delete syncDialog; syncDialog = 0; 843 delete syncDialog; syncDialog = 0;
830 } else if ( msg == "getAllDocLinks()" ) { 844 } else if ( msg == "getAllDocLinks()" ) {
831 loadDocs(); 845 loadDocs();
832 846
833 QString contents; 847 QString contents;
834 848
835 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) { 849 for ( QListIterator<DocLnk> it( docsFolder->children() ); it.current(); ++it ) {
836 DocLnk *doc = it.current(); 850 DocLnk *doc = it.current();
837 QFileInfo fi( doc->file() ); 851 QFileInfo fi( doc->file() );
838 if ( !fi.exists() ) 852 if ( !fi.exists() )
@@ -853,25 +867,25 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
853 contents += "[Desktop Entry]\n"; 867 contents += "[Desktop Entry]\n";
854 contents += "Categories = " + Qtopia::Record::idsToString( doc->categories() ) + "\n"; 868 contents += "Categories = " + Qtopia::Record::idsToString( doc->categories() ) + "\n";
855 contents += "File = "+doc->file()+"\n"; 869 contents += "File = "+doc->file()+"\n";
856 contents += "Name = "+doc->name()+"\n"; 870 contents += "Name = "+doc->name()+"\n";
857 contents += "Type = "+doc->type()+"\n"; 871 contents += "Type = "+doc->type()+"\n";
858 } 872 }
859 contents += QString("Size = %1\n").arg( fi.size() ); 873 contents += QString("Size = %1\n").arg( fi.size() );
860 } 874 }
861 875
862 //qDebug( "sending length %d", contents.length() ); 876 //qDebug( "sending length %d", contents.length() );
863 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" ); 877 QCopEnvelope e( "QPE/Desktop", "docLinks(QString)" );
864 e << contents; 878 e << contents;
865 879
866 qDebug( "================ \n\n%s\n\n===============", 880 qDebug( "================ \n\n%s\n\n===============",
867 contents.latin1() ); 881 contents.latin1() );
868 882
869 delete docsFolder; 883 delete docsFolder;
870 docsFolder = 0; 884 docsFolder = 0;
871 } 885 }
872} 886}
873 887
874void Launcher::cancelSync() 888void Launcher::cancelSync()
875{ 889{
876 QCopEnvelope e( "QPE/Desktop", "cancelSync()" ); 890 QCopEnvelope e( "QPE/Desktop", "cancelSync()" );
877} 891}
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 61bd0c4..f5ed8d2 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -13,57 +13,58 @@
13 * This program is free software; you can redistribute it and/or modify * 13 * This program is free software; you can redistribute it and/or modify *
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 21
22#include <qpe/timestring.h> 22#include <qpe/timestring.h>
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/qcopenvelope_qws.h> 24#include <qpe/qcopenvelope_qws.h>
25#include <qpe/qprocess.h> 25//#include <qpe/qprocess.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/contact.h> 27#include <qpe/contact.h>
28#include <qpe/global.h> 28#include <qpe/global.h>
29#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30 30
31#include <qdir.h> 31#include <qdir.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qdatetime.h> 33#include <qdatetime.h>
34#include <qtextstream.h> 34#include <qtextstream.h>
35#include <qcheckbox.h> 35#include <qcheckbox.h>
36#include <qspinbox.h> 36#include <qspinbox.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qtimer.h> 39#include <qtimer.h>
40#include <qpixmap.h> 40#include <qpixmap.h>
41#include <qfileinfo.h> 41//#include <qfileinfo.h>
42#include <qlayout.h> 42#include <qlayout.h>
43#include <qtl.h> 43#include <qtl.h>
44 44
45//#include <iostream.h> 45//#include <iostream.h>
46#include <unistd.h> 46#include <unistd.h>
47#include <stdlib.h> 47#include <stdlib.h>
48 48
49int MAX_LINES_TASK; 49int MAX_LINES_TASK;
50int MAX_CHAR_CLIP; 50int MAX_CHAR_CLIP;
51int MAX_LINES_MEET; 51int MAX_LINES_MEET;
52int SHOW_LOCATION; 52int SHOW_LOCATION;
53int SHOW_NOTES; 53int SHOW_NOTES;
54// show only later dates 54// show only later dates
55int ONLY_LATER; 55int ONLY_LATER;
56int AUTOSTART; 56int AUTOSTART;
57int NEW_START=1; 57int NEW_START=1;
58QString AUTOSTART_TIMER;
58 59
59/* 60/*
60 * Constructs a Example which is a child of 'parent', with the 61 * Constructs a Example which is a child of 'parent', with the
61 * name 'name' and widget flags set to 'f' 62 * name 'name' and widget flags set to 'f'
62 */ 63 */
63Today::Today( QWidget* parent, const char* name, WFlags fl ) 64Today::Today( QWidget* parent, const char* name, WFlags fl )
64 : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) { 65 : TodayBase( parent, name, fl ), AllDateBookEvents(NULL) {
65 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) ); 66 QObject::connect( (QObject*)PushButton1, SIGNAL( clicked() ), this, SLOT(startConfig() ) );
66 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) ); 67 QObject::connect( (QObject*)TodoButton, SIGNAL( clicked() ), this, SLOT(startTodo() ) );
67 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) ); 68 QObject::connect( (QObject*)DatesButton, SIGNAL( clicked() ), this, SLOT(startDatebook() ) );
68 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) ); 69 QObject::connect( (QObject*)MailButton, SIGNAL( clicked() ), this, SLOT(startMail() ) );
69 70
@@ -117,33 +118,35 @@ void Today::setOwnerField() {
117 */ 118 */
118void Today::setOwnerField(QString &message) { 119void Today::setOwnerField(QString &message) {
119 if (!message.isEmpty()) { 120 if (!message.isEmpty()) {
120 OwnerField->setText("<b>" + message + "</b>"); 121 OwnerField->setText("<b>" + message + "</b>");
121 } 122 }
122} 123}
123 124
124/* 125/*
125 * Autostart, uses the new (opie only) autostart method in the launcher code. 126 * Autostart, uses the new (opie only) autostart method in the launcher code.
126 * If registered against that today ist started on each resume. 127 * If registered against that today ist started on each resume.
127 */ 128 */
128void Today::autoStart() { 129void Today::autoStart() {
129 Config cfg("today"); 130 // Config cfg("today");
130 cfg.setGroup("Autostart"); 131 //cfg.setGroup("Autostart");
131 AUTOSTART = cfg.readNumEntry("autostart",1); 132 //AUTOSTART = cfg.readNumEntry("autostart",1);
133
132 if (AUTOSTART) { 134 if (AUTOSTART) {
133 QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); 135 QCopEnvelope e("QPE/System", "autoStart(QString, QString, QString)");
134 e << QString("add"); 136 e << QString("add");
135 e << QString("today"); 137 e << QString("today");
138 e << AUTOSTART_TIMER;
136 } else { 139 } else {
137 QCopEnvelope e("QPE/System", "autoStart(QString,QString)"); 140 QCopEnvelope e("QPE/System", "autoStart(QString, QString)");
138 e << QString("remove"); 141 e << QString("remove");
139 e << QString("today"); 142 e << QString("today");
140 } 143 }
141} 144}
142 145
143/* 146/*
144 * Repaint method. Reread all fields. 147 * Repaint method. Reread all fields.
145 */ 148 */
146void Today::draw() { 149void Today::draw() {
147 init(); 150 init();
148 getDates(); 151 getDates();
149 getMail(); 152 getMail();
@@ -203,24 +206,28 @@ void Today::init() {
203 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5); 206 MAX_LINES_TASK = cfg.readNumEntry("maxlinestask",5);
204 // after how many chars should the be cut off on tasks and notes 207 // after how many chars should the be cut off on tasks and notes
205 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",40); 208 MAX_CHAR_CLIP = cfg.readNumEntry("maxcharclip",40);
206 // how many lines should be showed in the datebook section 209 // how many lines should be showed in the datebook section
207 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5); 210 MAX_LINES_MEET = cfg.readNumEntry("maxlinesmeet",5);
208 // If location is to be showed too, 1 to activate it. 211 // If location is to be showed too, 1 to activate it.
209 SHOW_LOCATION = cfg.readNumEntry("showlocation",1); 212 SHOW_LOCATION = cfg.readNumEntry("showlocation",1);
210 // if notes should be shown 213 // if notes should be shown
211 SHOW_NOTES = cfg.readNumEntry("shownotes",0); 214 SHOW_NOTES = cfg.readNumEntry("shownotes",0);
212 // should only later appointments be shown or all for the current day. 215 // should only later appointments be shown or all for the current day.
213 ONLY_LATER = cfg.readNumEntry("onlylater",1); 216 ONLY_LATER = cfg.readNumEntry("onlylater",1);
214 217
218 cfg.setGroup("Autostart");
219 AUTOSTART = cfg.readNumEntry("autostart",1);
220 AUTOSTART_TIMER = cfg.readEntry("autostartdelay", "0");
221
215 //db = new DateBookDB; 222 //db = new DateBookDB;
216} 223}
217 224
218/* 225/*
219 * The method for the configuration dialog. 226 * The method for the configuration dialog.
220 */ 227 */
221void Today::startConfig() { 228void Today::startConfig() {
222 229
223 conf = new todayconfig ( this, "", true ); 230 conf = new todayconfig ( this, "", true );
224 // read the config 231 // read the config
225 Config cfg("today"); 232 Config cfg("today");
226 cfg.setGroup("BaseConfig"); 233 cfg.setGroup("BaseConfig");
@@ -231,43 +238,47 @@ void Today::startConfig() {
231 // location show box 238 // location show box
232 conf->CheckBox1->setChecked(SHOW_LOCATION); 239 conf->CheckBox1->setChecked(SHOW_LOCATION);
233 // notes show box 240 // notes show box
234 conf->CheckBox2->setChecked(SHOW_NOTES); 241 conf->CheckBox2->setChecked(SHOW_NOTES);
235 // task lines 242 // task lines
236 conf->SpinBox2->setValue(MAX_LINES_TASK); 243 conf->SpinBox2->setValue(MAX_LINES_TASK);
237 // clip when? 244 // clip when?
238 conf->SpinBox7->setValue(MAX_CHAR_CLIP); 245 conf->SpinBox7->setValue(MAX_CHAR_CLIP);
239 // only later 246 // only later
240 conf->CheckBox3->setChecked(ONLY_LATER); 247 conf->CheckBox3->setChecked(ONLY_LATER);
241 // if today should be autostarted 248 // if today should be autostarted
242 conf->CheckBoxAuto->setChecked(AUTOSTART); 249 conf->CheckBoxAuto->setChecked(AUTOSTART);
250 // autostart only if device has been suspended for X minutes
251 conf->SpinBoxTime->setValue( AUTOSTART_TIMER.toInt() );
243 252
244 conf->exec(); 253 conf->exec();
245 254
246 int maxlinestask = conf->SpinBox2->value(); 255 int maxlinestask = conf->SpinBox2->value();
247 int maxmeet = conf->SpinBox1->value(); 256 int maxmeet = conf->SpinBox1->value();
248 int location = conf->CheckBox1->isChecked(); 257 int location = conf->CheckBox1->isChecked();
249 int notes = conf->CheckBox2->isChecked(); 258 int notes = conf->CheckBox2->isChecked();
250 int maxcharclip = conf->SpinBox7->value(); 259 int maxcharclip = conf->SpinBox7->value();
251 int onlylater = conf->CheckBox3->isChecked(); 260 int onlylater = conf->CheckBox3->isChecked();
252 int autostart =conf->CheckBoxAuto->isChecked(); 261 int autostart = conf->CheckBoxAuto->isChecked();
262 int autostartdelay = conf->SpinBoxTime->value();
253 263
254 cfg.writeEntry("maxlinestask",maxlinestask); 264 cfg.writeEntry("maxlinestask",maxlinestask);
255 cfg.writeEntry("maxcharclip", maxcharclip); 265 cfg.writeEntry("maxcharclip", maxcharclip);
256 cfg.writeEntry("maxlinesmeet",maxmeet); 266 cfg.writeEntry("maxlinesmeet",maxmeet);
257 cfg.writeEntry("showlocation",location); 267 cfg.writeEntry("showlocation",location);
258 cfg.writeEntry("shownotes", notes); 268 cfg.writeEntry("shownotes", notes);
259 cfg.writeEntry("onlylater", onlylater); 269 cfg.writeEntry("onlylater", onlylater);
260 cfg.setGroup("Autostart"); 270 cfg.setGroup("Autostart");
261 cfg.writeEntry("autostart", autostart); 271 cfg.writeEntry("autostart", autostart);
272 cfg.writeEntry("autostartdelay", autostartdelay);
262 273
263 // sync it to "disk" 274 // sync it to "disk"
264 cfg.write(); 275 cfg.write();
265 NEW_START=1; 276 NEW_START=1;
266 draw(); 277 draw();
267 autoStart(); 278 autoStart();
268} 279}
269 280
270 281
271/* 282/*
272 * Get all events that are in the datebook xml file for today 283 * Get all events that are in the datebook xml file for today
273 */ 284 */
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 500e8fb..905ec4b 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,44 +1,47 @@
1/**************************************************************************** 1/*
2** Form implementation generated from reading ui file 'todayconfig.ui' 2 * todayconfig.cpp
3** 3 *
4** Created: Thu Feb 14 15:04:33 2002 4 * ---------------------
5** by: The User Interface Compiler (uic) 5 *
6** 6 * begin : Sun 10 17:20:00 CEST 2002
7** WARNING! All changes made in this file will be lost! 7 * copyright : (c) 2002 by Maximilian Reiß
8****************************************************************************/ 8 * email : max.reiss@gmx.de
9 *
10 */
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
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 *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
19
9#include "todayconfig.h" 20#include "todayconfig.h"
10 21
11#include <qcheckbox.h> 22#include <qcheckbox.h>
12#include <qframe.h> 23#include <qframe.h>
13#include <qlabel.h> 24#include <qlabel.h>
14#include <qspinbox.h> 25#include <qspinbox.h>
15#include <qtabwidget.h> 26#include <qtabwidget.h>
16#include <qwidget.h> 27#include <qwidget.h>
17#include <qlayout.h> 28#include <qlayout.h>
18#include <qvariant.h> 29#include <qvariant.h>
19#include <qwhatsthis.h> 30//#include <qwhatsthis.h>
20 31
21/*
22 * Constructs a todayconfig which is a child of 'parent', with the
23 * name 'name' and widget flags set to 'f'
24 *
25 * The dialog will by default be modeless, unless you set 'modal' to
26 * TRUE to construct a modal dialog.
27 */
28todayconfig::todayconfig( QWidget* parent, const char* name, bool modal, WFlags fl ) 32todayconfig::todayconfig( QWidget* parent, const char* name, bool modal, WFlags fl )
29 : QDialog( parent, name, modal, fl ) 33 : QDialog( parent, name, modal, fl ) {
30{
31 if ( !name ) 34 if ( !name )
32 setName( "todayconfig" ); 35 setName( "todayconfig" );
33 resize( 175, 232 ); 36 resize( 175, 232 );
34 setCaption( tr( "Today config" ) ); 37 setCaption( tr( "Today config" ) );
35 38
36 TabWidget3 = new QTabWidget( this, "TabWidget3" ); 39 TabWidget3 = new QTabWidget( this, "TabWidget3" );
37 TabWidget3->setGeometry( QRect( 0, 0, 220, 320 ) ); 40 TabWidget3->setGeometry( QRect( 0, 0, 220, 320 ) );
38 TabWidget3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget3->sizePolicy().hasHeightForWidth() ) ); 41 TabWidget3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, TabWidget3->sizePolicy().hasHeightForWidth() ) );
39 TabWidget3->setAutoMask( FALSE ); 42 TabWidget3->setAutoMask( FALSE );
40 TabWidget3->setTabShape( QTabWidget::Rounded ); 43 TabWidget3->setTabShape( QTabWidget::Rounded );
41 44
42 tab = new QWidget( TabWidget3, "tab" ); 45 tab = new QWidget( TabWidget3, "tab" );
43 46
44 Frame8 = new QFrame( tab, "Frame8" ); 47 Frame8 = new QFrame( tab, "Frame8" );
@@ -111,36 +114,38 @@ todayconfig::todayconfig( QWidget* parent, const char* name, bool modal, WFlags
111 Frame14->setGeometry( QRect( -5, 0, 200, 220 ) ); 114 Frame14->setGeometry( QRect( -5, 0, 200, 220 ) );
112 Frame14->setFrameShape( QFrame::StyledPanel ); 115 Frame14->setFrameShape( QFrame::StyledPanel );
113 Frame14->setFrameShadow( QFrame::Raised ); 116 Frame14->setFrameShadow( QFrame::Raised );
114 117
115 TextLabel1 = new QLabel( Frame14, "TextLabel1" ); 118 TextLabel1 = new QLabel( Frame14, "TextLabel1" );
116 TextLabel1->setGeometry( QRect( 20, 20, 100, 30 ) ); 119 TextLabel1->setGeometry( QRect( 20, 20, 100, 30 ) );
117 TextLabel1->setText( tr( "Clip after how\n" 120 TextLabel1->setText( tr( "Clip after how\n"
118 "many letters" ) ); 121 "many letters" ) );
119 122
120 SpinBox7 = new QSpinBox( Frame14, "SpinBox7" ); 123 SpinBox7 = new QSpinBox( Frame14, "SpinBox7" );
121 SpinBox7->setGeometry( QRect( 115, 20, 58, 25 ) ); 124 SpinBox7->setGeometry( QRect( 115, 20, 58, 25 ) );
122 SpinBox7->setMaxValue( 80 ); 125 SpinBox7->setMaxValue( 80 );
123 SpinBox7->setValue( 30 );
124 126
125 TextLabel2 = new QLabel( Frame14, "AutoStart" ); 127 TextLabel2 = new QLabel( Frame14, "AutoStart" );
126 TextLabel2->setGeometry( QRect( 20, 60, 100, 45 ) ); 128 TextLabel2->setGeometry( QRect( 20, 60, 100, 45 ) );
127 TextLabel2->setText( tr( "Should today be\n" 129 TextLabel2->setText( tr( "Should today be\n"
128 "autostarted on\n" 130 "autostarted on\n"
129 "resume?" 131 "resume?"
130 " (Opie only)" ) ); 132 " (Opie only)" ) );
131 133
132 CheckBoxAuto = new QCheckBox (Frame14, "CheckBoxAuto" ); 134 CheckBoxAuto = new QCheckBox (Frame14, "CheckBoxAuto" );
133 CheckBoxAuto->setGeometry( QRect( 158, 60, 27, 21 ) ); 135 CheckBoxAuto->setGeometry( QRect( 158, 60, 27, 21 ) );
134 136
137 TimeLabel = new QLabel( Frame14, "TimeLabel" );
138 TimeLabel->setGeometry( QRect ( 20, 120, 120, 45 ) );
139 TimeLabel->setText( tr( "Activate the \n"
140 "autostart after how\n"
141 "many minutes?" ) );
142 SpinBoxTime = new QSpinBox( Frame14, "TimeSpinner");
143 SpinBoxTime->setGeometry( QRect( 115, 120, 58, 25 ) );
144
135 TabWidget3->insertTab( tab_3, tr( "Misc" ) ); 145 TabWidget3->insertTab( tab_3, tr( "Misc" ) );
136 146
137} 147}
138 148
139/* 149todayconfig::~todayconfig() {
140 * Destroys the object and frees any allocated resources
141 */
142todayconfig::~todayconfig()
143{
144 // no need to delete child widgets, Qt does it all for us
145} 150}
146 151
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 4739b5a..2986c4c 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -1,37 +1,46 @@
1/**************************************************************************** 1/*
2** Form interface generated from reading ui file 'todayconfig.ui' 2 * todayconfig.h
3** 3 *
4** Created: Thu Feb 14 15:04:33 2002 4 * ---------------------
5** by: The User Interface Compiler (uic) 5 *
6** 6 * begin : Sun 10 17:20:00 CEST 2002
7** WARNING! All changes made in this file will be lost! 7 * copyright : (c) 2002 by Maximilian Reiß
8****************************************************************************/ 8 * email : max.reiss@gmx.de
9 *
10 */
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
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 *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
9#ifndef TODAYCONFIG_H 19#ifndef TODAYCONFIG_H
10#define TODAYCONFIG_H 20#define TODAYCONFIG_H
11 21
12#include <qvariant.h> 22#include <qvariant.h>
13#include <qdialog.h> 23#include <qdialog.h>
14//class QVBoxLayout; 24//class QVBoxLayout;
15class QHBoxLayout; 25class QHBoxLayout;
16class QGridLayout; 26class QGridLayout;
17class QCheckBox; 27class QCheckBox;
18class QFrame; 28class QFrame;
19class QLabel; 29class QLabel;
20class QSpinBox; 30class QSpinBox;
21class QTabWidget; 31class QTabWidget;
22class QWidget; 32class QWidget;
23 33
24class todayconfig : public QDialog 34class todayconfig : public QDialog {
25{
26 Q_OBJECT 35 Q_OBJECT
27 36
28public: 37public:
29 todayconfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 38 todayconfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
30 ~todayconfig(); 39 ~todayconfig();
31 40
32 QTabWidget* TabWidget3; 41 QTabWidget* TabWidget3;
33 QWidget* tab; 42 QWidget* tab;
34 QFrame* Frame8; 43 QFrame* Frame8;
35 QLabel* TextLabel4; 44 QLabel* TextLabel4;
36 QLabel* TextLabel5; 45 QLabel* TextLabel5;
37 QLabel* TextLabel2; 46 QLabel* TextLabel2;
@@ -40,16 +49,18 @@ public:
40 QCheckBox* CheckBox1; 49 QCheckBox* CheckBox1;
41 QCheckBox* CheckBoxAuto; 50 QCheckBox* CheckBoxAuto;
42 QSpinBox* SpinBox1; 51 QSpinBox* SpinBox1;
43 QLabel* TextLabel3; 52 QLabel* TextLabel3;
44 QWidget* tab_2; 53 QWidget* tab_2;
45 QFrame* Frame9; 54 QFrame* Frame9;
46 QLabel* TextLabel6; 55 QLabel* TextLabel6;
47 QSpinBox* SpinBox2; 56 QSpinBox* SpinBox2;
48 QWidget* tab_3; 57 QWidget* tab_3;
49 QFrame* Frame14; 58 QFrame* Frame14;
50 QLabel* TextLabel1; 59 QLabel* TextLabel1;
51 QSpinBox* SpinBox7; 60 QSpinBox* SpinBox7;
61 QLabel* TimeLabel;
62 QSpinBox* SpinBoxTime;
52 63
53}; 64};
54 65
55#endif // TODAYCONFIG_H 66#endif