comparison src/main.cpp @ 118:b982ac0fdae4

Make printed header title strings etc. translatable.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 05 Jul 2017 15:21:25 +0300
parents 71cfb7d96cfc
children 2ff2ad720474
comparison
equal deleted inserted replaced
117:71cfb7d96cfc 118:b982ac0fdae4
679 // If we are at the start of the page, we shall draw a header 679 // If we are at the start of the page, we shall draw a header
680 pt->setBrush(QBrush(Qt::black)); 680 pt->setBrush(QBrush(Qt::black));
681 pt->setPen(QPen(Qt::black, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); 681 pt->setPen(QPen(Qt::black, 3, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
682 682
683 ctx.setPos(0, 0); 683 ctx.setPos(0, 0);
684 ctx.drawText( 5, 180, "Etunimi"); 684 ctx.drawText( 5, 180, tr("Etunimi"));
685 ctx.drawText( 200, 230, "Sukunimi"); 685 ctx.drawText( 200, 230, tr("Sukunimi"));
686 ctx.drawText( 450, 190, "Lisätty"); 686 ctx.drawText( 450, 190, tr("Lisätty"));
687 ctx.drawText( 650, 190, "Päivitetty"); 687 ctx.drawText( 650, 190, tr("Päivitetty"));
688 ctx.drawText( 870, 120, "Tase"); 688 ctx.drawText( 870, 120, tr("Tase"));
689 ctx.lf(); 689 ctx.lf();
690 690
691 pt->drawLine(0, ctx.m_pos.y(), 1000, ctx.m_pos.y()); 691 pt->drawLine(0, ctx.m_pos.y(), 1000, ctx.m_pos.y());
692 692
693 ctx.move(0, 5); 693 ctx.move(0, 5);
725 } 725 }
726 else 726 else
727 { 727 {
728 ctx.setPos(0, 1240); 728 ctx.setPos(0, 1240);
729 ctx.drawText(0, 1000, 729 ctx.drawText(0, 1000,
730 QStringLiteral("Sivu %1 / %2"). 730 tr("Sivu %1 / %2").
731 arg(npage).arg(printer->toPage()), 731 arg(npage).arg(printer->toPage()),
732 Qt::AlignHCenter); 732 Qt::AlignHCenter);
733 } 733 }
734 734
735 pt->restore(); 735 pt->restore();