-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addressbook.pro | 19 | ||||
-rw-r--r-- | core/pim/today/plugins/addressbook/addresspluginconfig.cpp | 1 |
3 files changed, 21 insertions, 3 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 7451abc..9089fe9 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -54,100 +54,100 @@ void DateBookWeekLstHeader::setDate(const QDate &d) { int year,week; calcWeek(d,week,year,onMonday); labelWeek->setText(tr( "W: %1" ).arg( ( QString::number(week)) ) ); QDate start=date; QDate stop=start.addDays(6); labelDate->setText( QString::number(start.day()) + " " + start.monthName(start.month()) + " - " + QString::number(stop.day()) + " " + start.monthName(stop.month()) ); emit dateChanged(year,week); } void DateBookWeekLstHeader::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(labelWeek->pos()+QPoint(0,labelWeek->height()))); picker->setFocus(); } void DateBookWeekLstHeader::setDate(int y, int m, int d) { QDate new_date(y,m,d); setDate(new_date); } void DateBookWeekLstHeader::nextWeek() { setDate(date.addDays(7)); } void DateBookWeekLstHeader::prevWeek() { setDate(date.addDays(-7)); } DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /*onM*/, QWidget* parent, const char* name, WFlags fl ) : DateBookWeekLstDayHdrBase(parent, name, fl) { date=d; - static const char *wdays="MTWTFSS"; + static const char *wdays={"MTWTFSS"}; char day=wdays[d.dayOfWeek()-1]; - label->setText( QString(QChar(day)) + " " + + label->setText( QString(QObject::tr(QString(QChar(day)))) + " " + QString::number(d.day()) ); add->setText("+"); if (d == QDate::currentDate()) { QPalette pal=label->palette(); pal.setColor(QColorGroup::Foreground, QColor(0,0,255)); label->setPalette(pal); /* QFont f=label->font(); f.setItalic(true); label->setFont(f); label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor())); */ } else if (d.dayOfWeek() == 7) { // FIXME: Match any holiday QPalette pal=label->palette(); pal.setColor(QColorGroup::Foreground, QColor(255,0,0)); label->setPalette(pal); } connect (label, SIGNAL(clicked()), this, SLOT(showDay())); connect (add, SIGNAL(clicked()), this, SLOT(newEvent())); } void DateBookWeekLstDayHdr::showDay() { emit showDate(date.year(), date.month(), date.day()); } void DateBookWeekLstDayHdr::newEvent() { QDateTime start, stop; start=stop=date; start.setTime(QTime(10,0)); stop.setTime(QTime(12,0)); emit addEvent(start,stop,""); } DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, QWidget* parent, const char* name, WFlags fl) : OClickableLabel(parent,name,fl), event(ev) { char s[10]; if ( ev.startDate() != ev.date() ) { // multiday event (not first day) if ( ev.endDate() == ev.date() ) { // last day strcpy(s, "__|__"); } else { diff --git a/core/pim/today/plugins/addressbook/addressbook.pro b/core/pim/today/plugins/addressbook/addressbook.pro index fd7d786..3ee5bce 100644 --- a/core/pim/today/plugins/addressbook/addressbook.pro +++ b/core/pim/today/plugins/addressbook/addressbook.pro @@ -1,23 +1,42 @@ TEMPLATE = lib CONFIG -= moc CONFIG += qt release # Input HEADERS = addressplugin.h addresspluginimpl.h addresspluginconfig.h \ addresspluginwidget.h SOURCES = addressplugin.cpp addresspluginimpl.cpp addresspluginconfig.cpp \ addresspluginwidget.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library LIBS+= -lqpe -lopie DESTDIR = $(OPIEDIR)/plugins/today TARGET = todayaddressbookplugin +TRANSLATIONS = ../../../../../i18n/de/libtodayaddressbookplugin.ts \ + ../../../../../i18n/xx/libtodayaddressbookplugin.ts \ + ../../../../../i18n/en/libtodayaddressbookplugin.ts \ + ../../../../../i18n/es/libtodayaddressbookplugin.ts \ + ../../../../../i18n/fr/libtodayaddressbookplugin.ts \ + ../../../../../i18n/hu/libtodayaddressbookplugin.ts \ + ../../../../../i18n/ja/libtodayaddressbookplugin.ts \ + ../../../../../i18n/ko/libtodayaddressbookplugin.ts \ + ../../../../../i18n/no/libtodayaddressbookplugin.ts \ + ../../../../../i18n/pl/libtodayaddressbookplugin.ts \ + ../../../../../i18n/pt/libtodayaddressbookplugin.ts \ + ../../../../../i18n/pt_BR/libtodayaddressbookplugin.ts \ + ../../../../../i18n/sl/libtodayaddressbookplugin.ts \ + ../../../../../i18n/zh_CN/libtodayaddressbookplugin.ts \ + ../../../../../i18n/zh_TW/libtodayaddressbookplugin.ts \ + ../../../../../i18n/it/libtodayaddressbookplugin.ts \ + ../../../../../i18n/da/libtodayaddressbookplugin.ts + + include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 8d7bec6..a234236 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp @@ -1,78 +1,77 @@ /* * addresspluginconfig.cpp * * copyright : (c) 2003 by Stefan Eilers * email : eilers.stefan@epost.de * * This implementation was derived from the todolist plugin implementation * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "addresspluginconfig.h" #include <qpe/config.h> #include <qlayout.h> #include <qhbox.h> #include <qtoolbutton.h> #include <qlabel.h> #include <qwhatsthis.h> - AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name) : TodayConfigWidget(parent, name ) { QVBoxLayout * layout = new QVBoxLayout( this ); layout->setMargin( 20 ); QHBox *box1 = new QHBox( this ); QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); TextLabel6->setText( tr( "Max Lines: " ) ); SpinBox2 = new QSpinBox( box1, "SpinBox2" ); SpinBox2->setMaxValue( 40 ); QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) ); QHBox *box2 = new QHBox( this ); QLabel* clipLabel = new QLabel( box2, "" ); clipLabel->setText( tr( "Clip line after X chars: " ) ); SpinBoxClip = new QSpinBox( box2, "SpinClip" ); SpinBoxClip->setMaxValue( 200 ); QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); QHBox *box3 = new QHBox( this ); QLabel* daysLabel = new QLabel( box3, "" ); daysLabel->setText( tr( "Days look ahead: " ) ); SpinDaysClip = new QSpinBox( box3, "SpinDays" ); SpinDaysClip->setMaxValue( 200 ); QWhatsThis::add( SpinDaysClip , tr( "How many days we should search forward" ) ); QHBox *box4 = new QHBox( this ); QLabel* colorLabel = new QLabel( box4, "" ); colorLabel->setText( tr( "To activate settings: Restart application !" ) ); QHBox *box5 = new QHBox( this ); QLabel* colorLabel2 = new QLabel( box5, "" ); colorLabel2->setText( tr( "Set Headline Color: " ) ); headlineColor = new OColorButton( box5, black , "headlineColor" ); QWhatsThis::add( headlineColor , tr( "Colors for the headlines !" ) ); QHBox *box6 = new QHBox( this ); QLabel* colorLabel3= new QLabel( box6, "" ); colorLabel3->setText( tr( "Set Entry Color: " ) ); |