Commit da5a348c authored by Bryant Mairs's avatar Bryant Mairs

QImage::setNumColors() renamed to setColorCount()

parent f96c178c
...@@ -151,7 +151,7 @@ QGCVideoWidget::QGCVideoWidget(QWidget* parent) ...@@ -151,7 +151,7 @@ QGCVideoWidget::QGCVideoWidget(QWidget* parent)
// Fill with black background // Fill with black background
QImage fill = QImage(640, 480, QImage::Format_Indexed8); QImage fill = QImage(640, 480, QImage::Format_Indexed8);
fill.setNumColors(3); fill.setColorCount(3);
fill.setColor(0, qRgb(0, 0, 0)); fill.setColor(0, qRgb(0, 0, 0));
fill.setColor(1, qRgb(0, 0, 0)); fill.setColor(1, qRgb(0, 0, 0));
fill.setColor(2, qRgb(0, 0, 0)); fill.setColor(2, qRgb(0, 0, 0));
...@@ -1136,7 +1136,7 @@ void QGCVideoWidget::commitRawDataToGL() ...@@ -1136,7 +1136,7 @@ void QGCVideoWidget::commitRawDataToGL()
QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format);
if (format == QImage::Format_Indexed8) { if (format == QImage::Format_Indexed8) {
// Create matching color table // Create matching color table
newImage->setNumColors(256); newImage->setColorCount(256);
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
newImage->setColor(i, qRgb(i, i, i)); newImage->setColor(i, qRgb(i, i, i));
//qDebug() << __FILE__ << __LINE__ << std::hex << i; //qDebug() << __FILE__ << __LINE__ << std::hex << i;
......
...@@ -49,7 +49,7 @@ CameraView::CameraView(int width, int height, int depth, int channels, QWidget* ...@@ -49,7 +49,7 @@ CameraView::CameraView(int width, int height, int depth, int channels, QWidget*
// Fill with black background // Fill with black background
QImage fill = QImage(width, height, QImage::Format_Indexed8); QImage fill = QImage(width, height, QImage::Format_Indexed8);
fill.setNumColors(1); fill.setColorCount(1);
fill.setColor(0, qRgb(70, 200, 70)); fill.setColor(0, qRgb(70, 200, 70));
fill.fill(CameraView::initialColor); fill.fill(CameraView::initialColor);
glImage = QGLWidget::convertToGLFormat(fill); glImage = QGLWidget::convertToGLFormat(fill);
...@@ -104,7 +104,7 @@ void CameraView::setImageSize(int width, int height, int depth, int channels) ...@@ -104,7 +104,7 @@ void CameraView::setImageSize(int width, int height, int depth, int channels)
if (depth <= 8 && channels == 1) { if (depth <= 8 && channels == 1) {
image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8); image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8);
// Create matching color table // Create matching color table
image->setNumColors(256); image->setColorCount(256);
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
image->setColor(i, qRgb(i, i, i)); image->setColor(i, qRgb(i, i, i));
//qDebug() << __FILE__ << __LINE__ << std::hex << i; //qDebug() << __FILE__ << __LINE__ << std::hex << i;
...@@ -162,7 +162,7 @@ void CameraView::commitRawDataToGL() ...@@ -162,7 +162,7 @@ void CameraView::commitRawDataToGL()
QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format);
if (format == QImage::Format_Indexed8) { if (format == QImage::Format_Indexed8) {
// Create matching color table // Create matching color table
newImage->setNumColors(256); newImage->setColorCount(256);
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
newImage->setColor(i, qRgb(i, i, i)); newImage->setColor(i, qRgb(i, i, i));
//qDebug() << __FILE__ << __LINE__ << std::hex << i; //qDebug() << __FILE__ << __LINE__ << std::hex << i;
......
...@@ -1212,7 +1212,7 @@ void HUD::setImageSize(int width, int height, int depth, int channels) ...@@ -1212,7 +1212,7 @@ void HUD::setImageSize(int width, int height, int depth, int channels)
if (depth <= 8 && channels == 1) { if (depth <= 8 && channels == 1) {
image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8); image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8);
// Create matching color table // Create matching color table
image->setNumColors(256); image->setColorCount(256);
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
image->setColor(i, qRgb(i, i, i)); image->setColor(i, qRgb(i, i, i));
//qDebug() << __FILE__ << __LINE__ << std::hex << i; //qDebug() << __FILE__ << __LINE__ << std::hex << i;
...@@ -1277,7 +1277,7 @@ void HUD::commitRawDataToGL() ...@@ -1277,7 +1277,7 @@ void HUD::commitRawDataToGL()
QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format);
if (format == QImage::Format_Indexed8) { if (format == QImage::Format_Indexed8) {
// Create matching color table // Create matching color table
newImage->setNumColors(256); newImage->setColorCount(256);
for (int i = 0; i < 256; i++) { for (int i = 0; i < 256; i++) {
newImage->setColor(i, qRgb(i, i, i)); newImage->setColor(i, qRgb(i, i, i));
//qDebug() << __FILE__ << __LINE__ << std::hex << i; //qDebug() << __FILE__ << __LINE__ << std::hex << i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment