summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp
index 2c2965e..c0d45c9 100644
--- a/core/pim/datebook/datebook.cpp
+++ b/core/pim/datebook/datebook.cpp
@@ -129,5 +129,5 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
a->addTo( sub_bar );
a->addTo( view );
-
+
a = new QAction( tr( "Day" ), Resource::loadPixmap( "day" ), QString::null, 0, g, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( viewDay() ) );
@@ -174,5 +174,5 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
config.setGroup("Main");
int current=config.readNumEntry("defaultview", DAY);
-
+
QActionGroup *ag = new QActionGroup(this);
a = new QAction( tr( "Day" ), QString::null, 0, 0, 0, true );
@@ -188,20 +188,20 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
if (current==MONTH) a->setOn(true), viewMonth();
ag->insert(a);
-
+
ag->addTo(default_view);
- connect(ag, SIGNAL( selected ( QAction * ) ),
- this, SLOT( newDefaultView(QAction *) )
+ connect(ag, SIGNAL( selected ( QAction * ) ),
+ this, SLOT( newDefaultView(QAction *) )
);
-
+
connect( qApp, SIGNAL(clockChanged(bool)),
this, SLOT(changeClock(bool)) );
connect( qApp, SIGNAL(weekChanged(bool)),
this, SLOT(changeWeek(bool)) );
-
+
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
this, SLOT(appMessage(const QCString&, const QByteArray&)) );
#endif
-
+
// listen on QPE/System
#if defined(Q_WS_QWS)
@@ -213,8 +213,8 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f )
connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
this, SLOT(receive(const QCString&, const QByteArray&)) );
- qDebug("olle\n");
+ qDebug("olle\n");
#endif
#endif
-
+
qDebug("done t=%d", t.elapsed() );
@@ -310,5 +310,5 @@ QDate DateBook::currentDate()
{
QDate d = QDate::currentDate();
-
+
if ( dayView && views->visibleWidget() == dayView ) {
d = dayView->date();
@@ -407,5 +407,5 @@ void DateBook::editEvent( const Event &e )
if (!error.isNull()) {
if (QMessageBox::warning(this, "error box",
- error, "Fix it", "Continue",
+ error, "Fix it", "Continue",
0, 0, 1) == 0)
continue;
@@ -489,5 +489,5 @@ void DateBook::initWeek()
QDate d = QDate( yearNumber, 12, 31 );
calcWeek( d, totWeeks, yearNumber, onMonday );
-
+
while ( totWeeks == 1 ) {
d = d.addDays( -1 );
@@ -499,16 +499,16 @@ void DateBook::initWeek()
void DateBook::initWeekLst() {
if ( !weekLstView ) {
- weekLstView = new DateBookWeekLst( ampm, onMonday, db,
+ weekLstView = new DateBookWeekLst( ampm, onMonday, db,
views, "weeklst view" );
views->addWidget( weekLstView, WEEKLST );
-
+
//weekLstView->setStartViewTime( startTime );
connect( weekLstView, SIGNAL( showDate( int, int, int ) ),
this, SLOT( showDay( int, int, int ) ) );
- connect( weekLstView, SIGNAL( addEvent( const QDateTime &,
- const QDateTime &,
+ connect( weekLstView, SIGNAL( addEvent( const QDateTime &,
+ const QDateTime &,
const QString & ) ),
- this, SLOT( slotNewEntry( const QDateTime &,
- const QDateTime &,
+ this, SLOT( slotNewEntry( const QDateTime &,
+ const QDateTime &,
const QString & ) ) );
connect( this, SIGNAL( newEvent() ),
@@ -541,5 +541,5 @@ void DateBook::loadSettings()
onMonday = config.readBoolEntry( "MONDAY" );
}
-
+
{
Config config("DateBook");
@@ -567,5 +567,5 @@ void DateBook::newDefaultView(QAction *a) {
if (a->text() == "WeekLst") val=WEEKLST;
if (a->text() == "Month") val=MONTH;
-
+
Config configDB( "DateBook" );
configDB.setGroup( "Main" );
@@ -689,5 +689,5 @@ void DateBook::timerEvent( QTimerEvent *e )
alarmCounter++;
Sound::soundAlarm();
- }
+ }
else
killTimer( e->timerId() );
@@ -977,5 +977,5 @@ Event DateBookDBHack::eventByUID(int uid) {
QValueList<Event>::ConstIterator it;
-
+
for (it = myEventList.begin(); it != myEventList.end(); it++) {
if ((*it).uid() == uid) return *it;
@@ -986,4 +986,6 @@ Event DateBookDBHack::eventByUID(int uid) {
qDebug("Event not found: uid=%d\n", uid);
+ Event ev;
+ return ev; // return at least
}