From da5a348c104c358a742278f6de312c51a89f1186 Mon Sep 17 00:00:00 2001 From: Bryant Mairs Date: Tue, 24 Jun 2014 22:38:38 -0700 Subject: [PATCH] QImage::setNumColors() renamed to setColorCount() --- src/apps/qgcvideo/QGCVideoWidget.cc | 4 ++-- src/ui/CameraView.cc | 6 +++--- src/ui/HUD.cc | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apps/qgcvideo/QGCVideoWidget.cc b/src/apps/qgcvideo/QGCVideoWidget.cc index 8fc9b85ad..ba0be9c15 100644 --- a/src/apps/qgcvideo/QGCVideoWidget.cc +++ b/src/apps/qgcvideo/QGCVideoWidget.cc @@ -151,7 +151,7 @@ QGCVideoWidget::QGCVideoWidget(QWidget* parent) // Fill with black background QImage fill = QImage(640, 480, QImage::Format_Indexed8); - fill.setNumColors(3); + fill.setColorCount(3); fill.setColor(0, qRgb(0, 0, 0)); fill.setColor(1, qRgb(0, 0, 0)); fill.setColor(2, qRgb(0, 0, 0)); @@ -1136,7 +1136,7 @@ void QGCVideoWidget::commitRawDataToGL() QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); if (format == QImage::Format_Indexed8) { // Create matching color table - newImage->setNumColors(256); + newImage->setColorCount(256); for (int i = 0; i < 256; i++) { newImage->setColor(i, qRgb(i, i, i)); //qDebug() << __FILE__ << __LINE__ << std::hex << i; diff --git a/src/ui/CameraView.cc b/src/ui/CameraView.cc index 13bc86bb6..f23e96fab 100644 --- a/src/ui/CameraView.cc +++ b/src/ui/CameraView.cc @@ -49,7 +49,7 @@ CameraView::CameraView(int width, int height, int depth, int channels, QWidget* // Fill with black background QImage fill = QImage(width, height, QImage::Format_Indexed8); - fill.setNumColors(1); + fill.setColorCount(1); fill.setColor(0, qRgb(70, 200, 70)); fill.fill(CameraView::initialColor); glImage = QGLWidget::convertToGLFormat(fill); @@ -104,7 +104,7 @@ void CameraView::setImageSize(int width, int height, int depth, int channels) if (depth <= 8 && channels == 1) { image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8); // Create matching color table - image->setNumColors(256); + image->setColorCount(256); for (int i = 0; i < 256; i++) { image->setColor(i, qRgb(i, i, i)); //qDebug() << __FILE__ << __LINE__ << std::hex << i; @@ -162,7 +162,7 @@ void CameraView::commitRawDataToGL() QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); if (format == QImage::Format_Indexed8) { // Create matching color table - newImage->setNumColors(256); + newImage->setColorCount(256); for (int i = 0; i < 256; i++) { newImage->setColor(i, qRgb(i, i, i)); //qDebug() << __FILE__ << __LINE__ << std::hex << i; diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 90b1ca0b7..2c13dc576 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -1212,7 +1212,7 @@ void HUD::setImageSize(int width, int height, int depth, int channels) if (depth <= 8 && channels == 1) { image = new QImage(receivedWidth, receivedHeight, QImage::Format_Indexed8); // Create matching color table - image->setNumColors(256); + image->setColorCount(256); for (int i = 0; i < 256; i++) { image->setColor(i, qRgb(i, i, i)); //qDebug() << __FILE__ << __LINE__ << std::hex << i; @@ -1277,7 +1277,7 @@ void HUD::commitRawDataToGL() QImage* newImage = new QImage(rawImage, receivedWidth, receivedHeight, format); if (format == QImage::Format_Indexed8) { // Create matching color table - newImage->setNumColors(256); + newImage->setColorCount(256); for (int i = 0; i < 256; i++) { newImage->setColor(i, qRgb(i, i, i)); //qDebug() << __FILE__ << __LINE__ << std::hex << i; -- 2.22.0