Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
da5a348c
Commit
da5a348c
authored
Jun 24, 2014
by
Bryant Mairs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QImage::setNumColors() renamed to setColorCount()
parent
f96c178c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
QGCVideoWidget.cc
src/apps/qgcvideo/QGCVideoWidget.cc
+2
-2
CameraView.cc
src/ui/CameraView.cc
+3
-3
HUD.cc
src/ui/HUD.cc
+2
-2
No files found.
src/apps/qgcvideo/QGCVideoWidget.cc
View file @
da5a348c
...
...
@@ -151,7 +151,7 @@ QGCVideoWidget::QGCVideoWidget(QWidget* parent)
// Fill with black background
QImage
fill
=
QImage
(
640
,
480
,
QImage
::
Format_Indexed8
);
fill
.
set
NumColors
(
3
);
fill
.
set
ColorCount
(
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
->
set
NumColors
(
256
);
newImage
->
set
ColorCount
(
256
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
newImage
->
setColor
(
i
,
qRgb
(
i
,
i
,
i
));
//qDebug() << __FILE__ << __LINE__ << std::hex << i;
...
...
src/ui/CameraView.cc
View file @
da5a348c
...
...
@@ -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
.
set
NumColors
(
1
);
fill
.
set
ColorCount
(
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
->
set
NumColors
(
256
);
image
->
set
ColorCount
(
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
->
set
NumColors
(
256
);
newImage
->
set
ColorCount
(
256
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
newImage
->
setColor
(
i
,
qRgb
(
i
,
i
,
i
));
//qDebug() << __FILE__ << __LINE__ << std::hex << i;
...
...
src/ui/HUD.cc
View file @
da5a348c
...
...
@@ -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
->
set
NumColors
(
256
);
image
->
set
ColorCount
(
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
->
set
NumColors
(
256
);
newImage
->
set
ColorCount
(
256
);
for
(
int
i
=
0
;
i
<
256
;
i
++
)
{
newImage
->
setColor
(
i
,
qRgb
(
i
,
i
,
i
));
//qDebug() << __FILE__ << __LINE__ << std::hex << i;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment