-rw-r--r-- | core/pim/today/clickablelabel.cpp | 6 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/core/pim/today/clickablelabel.cpp b/core/pim/today/clickablelabel.cpp index 6912c34..e11cef6 100644 --- a/core/pim/today/clickablelabel.cpp +++ b/core/pim/today/clickablelabel.cpp @@ -1,29 +1,29 @@ #include "clickablelabel.h" -ClickableLabel::ClickableLabel(QWidget* parent = 0, - const char* name = 0, - WFlags fl = 0) : +ClickableLabel::ClickableLabel(QWidget* parent, + const char* name, + WFlags fl) : QLabel(parent,name,fl) { setFrameShape(NoFrame); setFrameShadow(Sunken); } void ClickableLabel::mousePressEvent( QMouseEvent *e ) { setFrameShape(Panel); repaint(); } void ClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { setFrameShape(NoFrame); repaint(); if (rect().contains(e->pos())) { emit clicked(); } } void ClickableLabel::mouseMoveEvent( QMouseEvent *e ) { if (rect().contains(e->pos())) { setFrameShape(Panel); } else { setFrameShape(NoFrame); diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 01d1a13..1b4408c 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -447,53 +447,53 @@ void Today::editEvent(const Event &e) { void Today::startTodo() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("todolist"); } /* * launch opiemail */ void Today::startMail() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("opiemail"); //Right now start both, maybe decide which to rum via config file .. QCopEnvelope f("QPE/System", "execute(QString)"); f << QString("qtmail"); } Today::~Today() { } /* * Gets the events for the current day, if it should get all dates */ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, - QWidget* parent = 0, - int SHOW_LOCATION = 0, - int SHOW_NOTES = 0, - const char* name = 0, - WFlags fl = 0) : + QWidget* parent, + int SHOW_LOCATION, + int SHOW_NOTES, + const char* name, + WFlags fl) : ClickableLabel(parent,name,fl), event(ev) { QString msg; //QTime time = QTime::currentTime(); Config config( "qpe" ); config.setGroup( "Time" ); // if 24 h format ampm = config.readBoolEntry( "AMPM", TRUE ); if (!ONLY_LATER) { msg += "<B>" + (ev).description() + "</B>"; if ( (ev).event().hasAlarm() ) { msg += " <b>[with alarm]</b>"; } // include location or not if (SHOW_LOCATION == 1) { msg += "<BR><i>" + (ev).location() + "</i>"; } if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { msg += "<br>All day"; } else { @@ -514,53 +514,53 @@ DateBookEvent::DateBookEvent(const EffectiveEvent &ev, } QString DateBookEvent::ampmTime(QTime tm) { QString s; if( ampm ) { int hour = tm.hour(); if (hour == 0) hour = 12; if (hour > 12) hour -= 12; s.sprintf( "%2d:%02d %s", hour, tm.minute(), (tm.hour() >= 12) ? "PM" : "AM" ); return s; } else { s.sprintf( "%2d:%02d", tm.hour(), tm.minute() ); return s; } } DateBookEventLater::DateBookEventLater(const EffectiveEvent &ev, - QWidget* parent = 0, - int SHOW_LOCATION = 0, - int SHOW_NOTES = 0, - const char* name = 0, - WFlags fl = 0) : + QWidget* parent, + int SHOW_LOCATION, + int SHOW_NOTES, + const char* name, + WFlags fl) : ClickableLabel(parent,name,fl), event(ev) { QString msg; QTime time = QTime::currentTime(); Config config( "qpe" ); config.setGroup( "Time" ); // if 24 h format ampm = config.readBoolEntry( "AMPM", TRUE ); if ((time.toString() <= TimeString::dateString((ev).event().end())) ) { // show only later appointments msg += "<B>" + (ev).description() + "</B>"; if ( (ev).event().hasAlarm() ) { msg += " <b>[with alarm]</b>"; } // include location or not if (SHOW_LOCATION == 1) { msg += "<BR><i>" + (ev).location() + "</i>"; } if ( (TimeString::timeString(QTime((ev).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((ev).event().end().time()) ) == "23:59") ) { msg += "<br>All day"; |