summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweekheaderimpl.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/datebookweekheaderimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweekheaderimpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp
index 123a478..7462de7 100644
--- a/core/pim/datebook/datebookweekheaderimpl.cpp
+++ b/core/pim/datebook/datebookweekheaderimpl.cpp
@@ -48,64 +48,64 @@ DateBookWeekHeader::DateBookWeekHeader( bool startOnMonday, QWidget* parent, con
*/
DateBookWeekHeader::~DateBookWeekHeader()
{
// no need to delete child widgets, Qt does it all for us
}
void DateBookWeekHeader::pickDate()
{
static QPopupMenu *m1 = 0;
static DateBookMonth *picker = 0;
if ( !m1 ) {
m1 = new QPopupMenu( this );
picker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( picker );
connect( picker, SIGNAL( dateClicked(int,int,int) ), this, SLOT( setDate(int,int,int) ) );
// connect( m1, SIGNAL( aboutToHide() ), this, SLOT( gotHide() ) );
}
picker->setDate( date.year(), date.month(), date.day() );
m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
picker->setFocus();
}
void DateBookWeekHeader::nextMonth()
{
- Opie::Core::owarn << "nextMonth()" << oendl;
+ owarn << "nextMonth()" << oendl;
setDate(date.addDays(28));
}
void DateBookWeekHeader::prevMonth()
{
- Opie::Core::owarn << "prevMonth()" << oendl;
+ owarn << "prevMonth()" << oendl;
setDate(date.addDays(-28));
}
void DateBookWeekHeader::nextWeek()
{
- Opie::Core::owarn << "nextWeek()" << oendl;
+ owarn << "nextWeek()" << oendl;
setDate(date.addDays(7));
}
void DateBookWeekHeader::prevWeek()
{
- Opie::Core::owarn << "prevWeek()" << oendl;
+ owarn << "prevWeek()" << oendl;
setDate(date.addDays(-7));
}
void DateBookWeekHeader::setDate( int y, int m, int d )
{
setDate(QDate(y,m,d));
}
void DateBookWeekHeader::setDate(const QDate &d) {
int year,week,dayofweek;
date=d;
dayofweek=d.dayOfWeek();
if(bStartOnMonday)
dayofweek--;
else if( dayofweek == 7 )
// we already have the right day -7 would lead to the current week..
dayofweek = 0;
date=date.addDays(-dayofweek);
calcWeek(date,week,year,bStartOnMonday);
QDate start=date;
QDate stop=start.addDays(6);
labelDate->setText( QString::number(start.day()) + "." +
Calendar::nameOfMonth( start.month()) + "-" +