summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 0579279..cc7bf4b 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -6,57 +6,58 @@
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19** $Id$ 19** $Id$
20** 20**
21**********************************************************************/ 21**********************************************************************/
22 22
23#define QTOPIA_INTERNAL_FD 23#define QTOPIA_INTERNAL_FD
24 24
25#include "datebook.h" 25#include "datebook.h"
26#include "datebookday.h" 26#include "datebookday.h"
27#include "datebooksettings.h" 27#include "datebooksettings.h"
28#include "datebookweek.h" 28#include "datebookweek.h"
29#include "modules/weeklst/datebookweeklst.h" 29#include "modules/weeklst/datebookweeklst.h"
30#include "modules/monthview/odatebookmonth.h"
30#include "dateentryimpl.h" 31#include "dateentryimpl.h"
31 32
32#include <opie2/odebug.h> 33#include <opie2/odebug.h>
33#include <opie2/oholidaypluginif.h> 34#include <opie2/oholidaypluginif.h>
34#include <opie2/oholidayplugin.h> 35#include <opie2/oholidayplugin.h>
35#include <opie2/opluginloader.h> 36#include <opie2/opluginloader.h>
36#include <opie2/todayplugininterface.h> 37#include <opie2/todayplugininterface.h>
37 38
38#include <qpe/datebookmonth.h> 39//#include <qpe/datebookmonth.h>
39#include <qpe/qpeapplication.h> 40#include <qpe/qpeapplication.h>
40#include <qpe/config.h> 41#include <qpe/config.h>
41#include <qpe/finddialog.h> 42#include <qpe/finddialog.h>
42#include <qpe/ir.h> 43#include <qpe/ir.h>
43#include <qpe/qpemessagebox.h> 44#include <qpe/qpemessagebox.h>
44#include <qpe/resource.h> 45#include <qpe/resource.h>
45#include <qpe/sound.h> 46#include <qpe/sound.h>
46#include <qpe/tzselect.h> 47#include <qpe/tzselect.h>
47#include <qtopia/qlibrary.h> 48#include <qtopia/qlibrary.h>
48 49
49#include <qaction.h> 50#include <qaction.h>
50#include <qcopchannel_qws.h> 51#include <qcopchannel_qws.h>
51#include <qlayout.h> 52#include <qlayout.h>
52#include <qmessagebox.h> 53#include <qmessagebox.h>
53#include <qtimer.h> 54#include <qtimer.h>
54#include <qtl.h> 55#include <qtl.h>
55#include <qtoolbar.h> 56#include <qtoolbar.h>
56#include <qwidgetstack.h> 57#include <qwidgetstack.h>
57#include <qdir.h> 58#include <qdir.h>
58#include <qlabel.h> 59#include <qlabel.h>
59 60
60#include <sys/stat.h> 61#include <sys/stat.h>
61#include <sys/types.h> 62#include <sys/types.h>
62#include <fcntl.h> 63#include <fcntl.h>
@@ -568,49 +569,49 @@ void DateBook::initWeek()
568 } 569 }
569} 570}
570 571
571void DateBook::initWeekLst() { 572void DateBook::initWeekLst() {
572 if ( !weekLstView ) { 573 if ( !weekLstView ) {
573 weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" ); 574 weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" );
574 views->addWidget( weekLstView, WEEKLST ); 575 views->addWidget( weekLstView, WEEKLST );
575 576
576 //weekLstView->setStartViewTime( startTime ); 577 //weekLstView->setStartViewTime( startTime );
577 connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); 578 connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
578 connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ), 579 connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ),
579 this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) ); 580 this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) );
580 connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) ); 581 connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) );
581 connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) ); 582 connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) );
582 connect( weekLstView, SIGNAL( duplicateEvent( const Event & ) ), this, SLOT( duplicateEvent( const Event & ) ) ); 583 connect( weekLstView, SIGNAL( duplicateEvent( const Event & ) ), this, SLOT( duplicateEvent( const Event & ) ) );
583 connect( weekLstView, SIGNAL( beamEvent(const Event&) ), this, SLOT( beamEvent(const Event&) ) ); 584 connect( weekLstView, SIGNAL( beamEvent(const Event&) ), this, SLOT( beamEvent(const Event&) ) );
584 connect( weekLstView, SIGNAL( removeEvent( const Event & ) ), this, SLOT( removeEvent( const Event & ) ) ); 585 connect( weekLstView, SIGNAL( removeEvent( const Event & ) ), this, SLOT( removeEvent( const Event & ) ) );
585 } 586 }
586} 587}
587 588
588 589
589void DateBook::initMonth() 590void DateBook::initMonth()
590{ 591{
591 if ( !monthView ) { 592 if ( !monthView ) {
592 monthView = new DateBookMonth( views, "month view", FALSE, db ); 593 monthView = new ODateBookMonth( views, "month view", FALSE, db );
593 views->addWidget( monthView, MONTH ); 594 views->addWidget( monthView, MONTH );
594 connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); 595 connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) );
595 connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) ); 596 connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) );
596 qApp->processEvents(); 597 qApp->processEvents();
597 } 598 }
598} 599}
599 600
600void DateBook::loadSettings() 601void DateBook::loadSettings()
601{ 602{
602 Config qpeconfig( "qpe" ); 603 Config qpeconfig( "qpe" );
603 qpeconfig.setGroup("Time"); 604 qpeconfig.setGroup("Time");
604 ampm = qpeconfig.readBoolEntry( "AMPM", TRUE ); 605 ampm = qpeconfig.readBoolEntry( "AMPM", TRUE );
605 onMonday = qpeconfig.readBoolEntry( "MONDAY" ); 606 onMonday = qpeconfig.readBoolEntry( "MONDAY" );
606 607
607 Config config("DateBook"); 608 Config config("DateBook");
608 config.setGroup("Main"); 609 config.setGroup("Main");
609 startTime = config.readNumEntry("startviewtime", 8); 610 startTime = config.readNumEntry("startviewtime", 8);
610 aPreset = config.readBoolEntry("alarmpreset"); 611 aPreset = config.readBoolEntry("alarmpreset");
611 presetTime = config.readNumEntry("presettime"); 612 presetTime = config.readNumEntry("presettime");
612 bJumpToCurTime = config.readBoolEntry("jumptocurtime"); 613 bJumpToCurTime = config.readBoolEntry("jumptocurtime");
613 rowStyle = config.readNumEntry("rowstyle"); 614 rowStyle = config.readNumEntry("rowstyle");
614 defaultView = config.readNumEntry("defaultview",DAY); 615 defaultView = config.readNumEntry("defaultview",DAY);
615 weeklistviewconfig = config.readNumEntry("weeklistviewconfig",NORMAL); 616 weeklistviewconfig = config.readNumEntry("weeklistviewconfig",NORMAL);
616 617