Ppi after format name added
This commit is contained in:
parent
3cb79b32e2
commit
898a5a92c3
|
@ -141,69 +141,93 @@ QSizeF VPSheet::GetTemplateSize(PaperSizeTemplate tmpl)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString VPSheet::GetTemplateName(PaperSizeTemplate tmpl)
|
QString VPSheet::GetTemplateName(PaperSizeTemplate tmpl)
|
||||||
{
|
{
|
||||||
|
QString tmplName;
|
||||||
switch (tmpl)
|
switch (tmpl)
|
||||||
{
|
{
|
||||||
case PaperSizeTemplate::A0:
|
case PaperSizeTemplate::A0:
|
||||||
return QString("A0");
|
tmplName = QString("A0");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::A1:
|
case PaperSizeTemplate::A1:
|
||||||
return QString("A1");
|
tmplName = QString("A1");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::A2:
|
case PaperSizeTemplate::A2:
|
||||||
return QString("A2");
|
tmplName = QString("A2");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::A3:
|
case PaperSizeTemplate::A3:
|
||||||
return QString("A3");
|
tmplName = QString("A3");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::A4:
|
case PaperSizeTemplate::A4:
|
||||||
return QString("A4");
|
tmplName = QString("A4");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Letter:
|
case PaperSizeTemplate::Letter:
|
||||||
return tr("Letter");
|
tmplName = tr("Letter");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Legal:
|
case PaperSizeTemplate::Legal:
|
||||||
return tr("Legal");
|
tmplName = tr("Legal");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Tabloid:
|
case PaperSizeTemplate::Tabloid:
|
||||||
return tr("Tabloid");
|
tmplName = tr("Tabloid");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll24in:
|
case PaperSizeTemplate::Roll24in:
|
||||||
return tr("Roll 24in");
|
tmplName = tr("Roll 24in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll30in:
|
case PaperSizeTemplate::Roll30in:
|
||||||
return tr("Roll 30in");
|
tmplName = tr("Roll 30in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll36in:
|
case PaperSizeTemplate::Roll36in:
|
||||||
return tr("Roll 36in");
|
tmplName = tr("Roll 36in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll42in:
|
case PaperSizeTemplate::Roll42in:
|
||||||
return tr("Roll 42in");
|
tmplName = tr("Roll 42in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll44in:
|
case PaperSizeTemplate::Roll44in:
|
||||||
return tr("Roll 44in");
|
tmplName = tr("Roll 44in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll48in:
|
case PaperSizeTemplate::Roll48in:
|
||||||
return tr("Roll 48in");
|
tmplName = tr("Roll 48in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll62in:
|
case PaperSizeTemplate::Roll62in:
|
||||||
return tr("Roll 62in");
|
tmplName = tr("Roll 62in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Roll72in:
|
case PaperSizeTemplate::Roll72in:
|
||||||
return tr("Roll 72in");
|
tmplName = tr("Roll 72in");
|
||||||
|
break;
|
||||||
|
|
||||||
case PaperSizeTemplate::Custom:
|
case PaperSizeTemplate::Custom:
|
||||||
return tr("Custom");
|
tmplName = tr("Custom");
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return QString("");
|
if(not tmplName.isEmpty())
|
||||||
|
{
|
||||||
|
tmplName += " " + QStringLiteral("(%1ppi)").arg(PrintDPI);
|
||||||
|
}
|
||||||
|
|
||||||
|
return tmplName;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
PaperSizeTemplate VPSheet::GetTemplate(QSizeF size)
|
PaperSizeTemplate VPSheet::GetTemplate(QSizeF size)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(size);
|
||||||
// TODO, float comparision not safe and problems with
|
// TODO, float comparision not safe and problems with
|
||||||
// inch / cm
|
// inch / cm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user