QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
CheckerboardTextureData.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4
*
5
* QGroundControl is licensed according to the terms in the file
6
* COPYING.md in the root of the source code directory.
7
*
8
****************************************************************************/
9
10
#pragma once
11
12
#include <QtGui/QColor>
13
#include <QtQuick3D/QQuick3DTextureData>
14
18
class
CheckerboardTextureData
:
public
QQuick3DTextureData
19
{
20
Q_OBJECT
21
QML_ELEMENT
22
Q_PROPERTY(
int
sizePixels
READ
sizePixels
WRITE
setSizePixels
NOTIFY
sizePixelsChanged
)
23
Q_PROPERTY(
int
cells
READ
cells
WRITE
setCells
NOTIFY
cellsChanged
)
24
Q_PROPERTY(QColor
color1
READ
color1
WRITE
setColor1
NOTIFY
color1Changed
)
25
Q_PROPERTY(QColor
color2
READ
color2
WRITE
setColor2
NOTIFY
color2Changed
)
26
27
public
:
28
explicit
CheckerboardTextureData
(QQuick3DObject* parent =
nullptr
);
29
30
int
sizePixels
()
const
{
return
_sizePixels; }
31
32
void
setSizePixels
(
int
sizePixels
);
33
34
int
cells
()
const
{
return
_cells; }
35
36
void
setCells
(
int
cells
);
37
38
QColor
color1
()
const
{
return
_color1; }
39
40
void
setColor1
(
const
QColor& color);
41
42
QColor
color2
()
const
{
return
_color2; }
43
44
void
setColor2
(
const
QColor& color);
45
46
signals:
47
void
sizePixelsChanged
();
48
void
cellsChanged
();
49
void
color1Changed
();
50
void
color2Changed
();
51
52
private
:
53
void
_rebuild();
54
55
int
_sizePixels = 256;
56
int
_cells = 8;
57
QColor _color1{0x40, 0x80, 0x40};
58
QColor _color2{0xd0, 0xd0, 0xd0};
59
};
CheckerboardTextureData
Definition
CheckerboardTextureData.h:19
CheckerboardTextureData::setCells
void setCells(int cells)
Definition
CheckerboardTextureData.cc:23
CheckerboardTextureData::color1
QColor color1() const
Definition
CheckerboardTextureData.h:38
CheckerboardTextureData::setSizePixels
void setSizePixels(int sizePixels)
Definition
CheckerboardTextureData.cc:12
CheckerboardTextureData::sizePixelsChanged
void sizePixelsChanged()
CheckerboardTextureData::color2
QColor color2() const
Definition
CheckerboardTextureData.h:42
CheckerboardTextureData::color2Changed
void color2Changed()
CheckerboardTextureData::color1Changed
void color1Changed()
CheckerboardTextureData::cells
int cells() const
Definition
CheckerboardTextureData.h:34
CheckerboardTextureData::cellsChanged
void cellsChanged()
CheckerboardTextureData::setColor1
void setColor1(const QColor &color)
Definition
CheckerboardTextureData.cc:36
CheckerboardTextureData::sizePixels
int sizePixels() const
Definition
CheckerboardTextureData.h:30
CheckerboardTextureData::setColor2
void setColor2(const QColor &color)
Definition
CheckerboardTextureData.cc:46
src
GeoMap
CheckerboardTextureData.h
Generated by
1.9.8