author | simon <simon> | 2002-12-17 13:46:35 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-17 13:46:35 (UTC) |
commit | 65c1d23402f8df58524a8e182b00745cf9a4c3af (patch) (side-by-side diff) | |
tree | c0e6d7f7abaaf09254eda212091a04243d115a6e | |
parent | 1e0289c2367b411fe9c4c34aff11988dc77c0f54 (diff) | |
download | opie-65c1d23402f8df58524a8e182b00745cf9a4c3af.zip opie-65c1d23402f8df58524a8e182b00745cf9a4c3af.tar.gz opie-65c1d23402f8df58524a8e182b00745cf9a4c3af.tar.bz2 |
- word puzzle fix by Carsten
-rw-r--r-- | core/pim/todo/tableitems.cpp | 2 | ||||
-rw-r--r-- | core/pim/todo/tableview.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/todo/tableitems.cpp b/core/pim/todo/tableitems.cpp index 86fe07d..a636de6 100644 --- a/core/pim/todo/tableitems.cpp +++ b/core/pim/todo/tableitems.cpp @@ -134,48 +134,48 @@ QString DueTextItem::key() const { if(m_off == 0 ){ key.append("b"); }else if( m_off > 0 ){ key.append("c"); }else if( m_off < 0 ){ key.append("a"); } key.append(QString::number(m_off ) ); }else{ key.append("d"); } return key; } void DueTextItem::setCompleted( bool comp ) { m_completed = comp; table()->updateCell( row(), col() ); } void DueTextItem::setToDoEvent( const OTodo& ev ) { m_hasDate = ev.hasDueDate(); m_completed = ev.isCompleted(); if( ev.hasDueDate() ){ QDate today = QDate::currentDate(); m_off = today.daysTo(ev.dueDate() ); - setText( QString::number(m_off) + " day(s) " ); + setText( tr( "%1 day(s)" ).arg( QString::number(m_off) ) ); }else{ setText("n.d." ); m_off = 0; } } void DueTextItem::paint( QPainter* p, const QColorGroup &cg, const QRect& cr, bool selected ) { QColorGroup cg2(cg); QColor text = cg.text(); if( m_hasDate && !m_completed ){ if( m_off < 0 ){ cg2.setColor(QColorGroup::Text, QColor(red ) ); }else if( m_off == 0 ){ cg2.setColor(QColorGroup::Text, QColor(yellow) ); // orange isn't predefined }else if( m_off > 0){ cg2.setColor(QColorGroup::Text, QColor(green ) ); } } QTableItem::paint(p, cg2, cr, selected ); /* restore default color */ cg2.setColor(QColorGroup::Text, text ); } diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 2434150..f59971e 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -358,49 +358,49 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool } } break; case 1: // priority field { QString text = QString::number(task.priority()); p->drawText(2,2 + fm.ascent(), text); } break; case 2: // description field { QString text = task.summary().isEmpty() ? task.description().left(20) : task.summary(); p->drawText(2,2 + fm.ascent(), text); } break; case 3: { QString text; if (task.hasDueDate()) { int off = QDate::currentDate().daysTo( task.dueDate() ); - text = QString::number(off) + tr(" day(s)"); + text = tr( "%1 day(s)").arg(QString::number(off)); /* * set color if not completed */ if (!task.isCompleted() ) { QColor color = Qt::black; if ( off < 0 ) color = Qt::red; else if ( off == 0 ) color = Qt::yellow; else if ( off > 0 ) color = Qt::green; p->setPen(color ); } } else { text = tr("None"); } p->drawText(2,2 + fm.ascent(), text); } break; } p->restore(); } QWidget* TableView::createEditor(int row, int col, bool )const { switch( col ) { |