mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
printlayout.cpp: Remove convertPixmapToGrayscale()
Function is redundant as we should only render the profile with a custom color table. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2b98d28980
commit
2ec6303f50
2 changed files with 0 additions and 16 deletions
|
@ -365,17 +365,3 @@ void PrintLayout::addTablePrintHeadingRow(TablePrintModel *model, int row) const
|
||||||
model->setData(model->index(row, i), tablePrintHeadingBackground, Qt::BackgroundRole);
|
model->setData(model->index(row, i), tablePrintHeadingBackground, Qt::BackgroundRole);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// experimental
|
|
||||||
QPixmap PrintLayout::convertPixmapToGrayscale(QPixmap pixmap) const
|
|
||||||
{
|
|
||||||
QImage image = pixmap.toImage();
|
|
||||||
int gray, width = pixmap.width(), height = pixmap.height();
|
|
||||||
for (int i = 0; i < width; i++) {
|
|
||||||
for (int j = 0; j < height; j++) {
|
|
||||||
gray = qGray(image.pixel(i, j));
|
|
||||||
image.setPixel(i, j, qRgb(gray, gray, gray));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return pixmap.fromImage(image);
|
|
||||||
}
|
|
||||||
|
|
|
@ -39,8 +39,6 @@ private:
|
||||||
void printTable();
|
void printTable();
|
||||||
void addTablePrintDataRow(TablePrintModel *model, int row, struct dive *dive) const;
|
void addTablePrintDataRow(TablePrintModel *model, int row, struct dive *dive) const;
|
||||||
void addTablePrintHeadingRow(TablePrintModel *model, int row) const;
|
void addTablePrintHeadingRow(TablePrintModel *model, int row) const;
|
||||||
|
|
||||||
QPixmap convertPixmapToGrayscale(QPixmap) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue