1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Issue #875 fixed

This commit is contained in:
bsongis 2014-03-27 16:29:45 +01:00
parent e24301cf13
commit 6d1ad5d121
4 changed files with 43 additions and 41 deletions

View file

@ -42,7 +42,8 @@ printDialog::printDialog(QWidget *parent, GeneralSettings *gg, ModelData *gm, QS
if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) {
gvars=1;
}
} else {
}
else {
gvars=1;
}
@ -519,23 +520,6 @@ void printDialog::printCurves()
int i,r,g,b,c,count;
char buffer[16];
QPen pen(Qt::black, 2, Qt::SolidLine);
QColor * qplot_color[16];
qplot_color[0]=new QColor(0,0,127);
qplot_color[1]=new QColor(0,127,0);
qplot_color[2]=new QColor(127,0,0);
qplot_color[3]=new QColor(0,127,127);
qplot_color[4]=new QColor(127,0,127);
qplot_color[5]=new QColor(127,127,0);
qplot_color[6]=new QColor(127,127,127);
qplot_color[7]=new QColor(0,0,255);
qplot_color[8]=new QColor(0,127,255);
qplot_color[9]=new QColor(127,0,255);
qplot_color[10]=new QColor(0,200,0);
qplot_color[11]=new QColor(0,200,127);
qplot_color[12]=new QColor(127,200,0);
qplot_color[13]=new QColor(255,0,0);
qplot_color[14]=new QColor(255,0,127);
qplot_color[15]=new QColor(255,127,0);
QString str = "<table border=1 cellspacing=0 cellpadding=3 style=\"page-break-before:auto;\" width=\"100%\"><tr><td><h2>";
str.append(tr("Curves"));
@ -552,9 +536,9 @@ void printDialog::printCurves()
painter.drawRect(0,0,ISIZEW,ISIZEW);
str.append("<table border=0 cellspacing=0 cellpadding=3 width=\"100%\">"+QString("<tr><td width=\"400\"><img src=\"%1\" border=0></td><td><table border=1 cellspacing=0 cellpadding=3 width=\"100%\">").arg(curvefile5));
for(i=0; i<numcurves; i++) {
pen.setColor(*qplot_color[i]);
pen.setColor(colors[i]);
painter.setPen(pen);
qplot_color[i]->getRgb(&r,&g,&b);
colors[i].getRgb(&r,&g,&b);
c=r;
c*=256;
c+=g;
@ -576,9 +560,9 @@ void printDialog::printCurves()
str.append(doTC(tr("pt %1").arg(i+1), "", true));
str.append("</tr>");
for(i=0; i<numcurves; i++) {
pen.setColor(*qplot_color[i]);
pen.setColor(colors[i]);
painter.setPen(pen);
qplot_color[i]->getRgb(&r,&g,&b);
colors[i].getRgb(&r,&g,&b);
c=r;
c*=256;
c+=g;