summaryrefslogtreecommitdiff
authorcniehaus <cniehaus>2002-11-22 11:29:36 (UTC)
committer cniehaus <cniehaus>2002-11-22 11:29:36 (UTC)
commitc185c4f9788a1e3882711efa1b1c11b17fb7ef1d (patch) (unidiff)
tree9f7858cefd87420f50478796239ad3e36414e6bf
parent480284c491e26427c630131a25e56f9ed1d129b2 (diff)
downloadopie-c185c4f9788a1e3882711efa1b1c11b17fb7ef1d.zip
opie-c185c4f9788a1e3882711efa1b1c11b17fb7ef1d.tar.gz
opie-c185c4f9788a1e3882711efa1b1c11b17fb7ef1d.tar.bz2
This is the way tr() should be used. Now even RTL-languages and such
are supported @@ -53,7 +53,7 @@ void DateBookWeekLstHeader::setDate(cons int year,week; calcWeek(d,week,year,onMonday); - labelWeek->setText("W: " + QString::number(week)); + labelWeek->setText(tr( "W: %1" ).arg( ( QString::number(week)) ) ); QDate start=date; QDate stop=start.addDays(6);
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 5eefc27..7451abc 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -40,33 +40,33 @@ DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent,
40 DateBookWeekLstHeaderBaseLayout->setMargin(0); 40 DateBookWeekLstHeaderBaseLayout->setMargin(0);
41 //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); 41 //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding));
42 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 42 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
43 43
44 connect(back, SIGNAL(clicked()), this, SLOT(prevWeek())); 44 connect(back, SIGNAL(clicked()), this, SLOT(prevWeek()));
45 connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek())); 45 connect(forward, SIGNAL(clicked()), this, SLOT(nextWeek()));
46 connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate())); 46 connect(labelWeek, SIGNAL(clicked()), this, SLOT(pickDate()));
47 connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); 47 connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool)));
48 onMonday=onM; 48 onMonday=onM;
49} 49}
50DateBookWeekLstHeader::~DateBookWeekLstHeader(){} 50DateBookWeekLstHeader::~DateBookWeekLstHeader(){}
51void DateBookWeekLstHeader::setDate(const QDate &d) { 51void DateBookWeekLstHeader::setDate(const QDate &d) {
52 date=d; 52 date=d;
53 53
54 int year,week; 54 int year,week;
55 calcWeek(d,week,year,onMonday); 55 calcWeek(d,week,year,onMonday);
56 labelWeek->setText("W: " + QString::number(week)); 56 labelWeek->setText(tr( "W: %1" ).arg( ( QString::number(week)) ) );
57 57
58 QDate start=date; 58 QDate start=date;
59 QDate stop=start.addDays(6); 59 QDate stop=start.addDays(6);
60 labelDate->setText( QString::number(start.day()) + " " + 60 labelDate->setText( QString::number(start.day()) + " " +
61 start.monthName(start.month()) + " - " + 61 start.monthName(start.month()) + " - " +
62 QString::number(stop.day()) + " " + 62 QString::number(stop.day()) + " " +
63 start.monthName(stop.month()) ); 63 start.monthName(stop.month()) );
64 emit dateChanged(year,week); 64 emit dateChanged(year,week);
65} 65}
66void DateBookWeekLstHeader::pickDate() { 66void DateBookWeekLstHeader::pickDate() {
67 static QPopupMenu *m1 = 0; 67 static QPopupMenu *m1 = 0;
68 static DateBookMonth *picker = 0; 68 static DateBookMonth *picker = 0;
69 if ( !m1 ) { 69 if ( !m1 ) {
70 m1 = new QPopupMenu( this ); 70 m1 = new QPopupMenu( this );
71 picker = new DateBookMonth( m1, 0, TRUE ); 71 picker = new DateBookMonth( m1, 0, TRUE );
72 m1->insertItem( picker ); 72 m1->insertItem( picker );