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:
Lubomir I. Ivanov 2013-10-15 12:54:20 +03:00 committed by Dirk Hohndel
parent 2b98d28980
commit 2ec6303f50
2 changed files with 0 additions and 16 deletions

View file

@ -365,17 +365,3 @@ void PrintLayout::addTablePrintHeadingRow(TablePrintModel *model, int row) const
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);
}

View file

@ -39,8 +39,6 @@ private:
void printTable();
void addTablePrintDataRow(TablePrintModel *model, int row, struct dive *dive) const;
void addTablePrintHeadingRow(TablePrintModel *model, int row) const;
QPixmap convertPixmapToGrayscale(QPixmap) const;
};
#endif