7#include "skyqpainter.h"
11#include "kstarsdata.h"
15#include "projections/projector.h"
16#include "skycomponents/flagcomponent.h"
17#include "skycomponents/linelist.h"
18#include "skycomponents/linelistlabel.h"
19#include "skycomponents/satellitescomponent.h"
20#include "skycomponents/skiphashlist.h"
21#include "skycomponents/skymapcomposite.h"
22#include "skycomponents/solarsystemcomposite.h"
23#include "skycomponents/earthshadowcomponent.h"
24#include "skycomponents/imageoverlaycomponent.h"
25#include "skyobjects/skyobject.h"
26#include "skyobjects/constellationsart.h"
27#include "skyobjects/catalogobject.h"
28#include "skyobjects/ksasteroid.h"
29#include "skyobjects/kscomet.h"
30#include "skyobjects/kssun.h"
31#include "skyobjects/ksmoon.h"
32#include "skyobjects/satellite.h"
33#include "skyobjects/supernova.h"
34#include "skyobjects/ksearthshadow.h"
36#include "skyobjects/mosaictiles.h"
38#include "hips/hipsrenderer.h"
39#include "terrain/terrainrenderer.h"
40#include <QElapsedTimer>
41#include "auxiliary/rectangleoverlap.h"
47int harvardToIndex(
char c)
79const int nStarSizes = 15;
82const int nSPclasses = 7;
87QPixmap *imageCache[nSPclasses][nStarSizes] = { {
nullptr } };
89std::unique_ptr<QPixmap> visibleSatPixmap, invisibleSatPixmap;
92int SkyQPainter::starColorMode = 0;
98 for (
char &color : ColorMap.
keys())
100 QPixmap **pmap = imageCache[harvardToIndex(color)];
102 for (
int size = 1; size < nStarSizes; size++)
107 pmap[size] =
nullptr;
117 m_hipsRender =
new HIPSRenderer();
125 m_hipsRender =
new HIPSRenderer();
132 m_pd = (pd ? pd : widget);
133 m_size = widget->
size();
134 m_hipsRender =
new HIPSRenderer();
137SkyQPainter::~SkyQPainter()
139 delete (m_hipsRender);
142void SkyQPainter::setSize(
int width,
int height)
151 bool aa = !SkyMap::Instance()->isSlewing() && Options::useAntialias();
154 m_proj = SkyMap::Instance()->
projector();
165double circleOverlap(
double d,
double radius1,
double radius2)
168 const double r1 = (radius1 >= radius2) ? radius1 : radius2;
170 const double r2 = (radius1 >= radius2) ? radius2 : radius1;
177 if (d == 0 || r2 + d <= r1)
178 return M_PI * r2 * r2;
181 if (r1 <= 0 || r2 <= 0 || d < 0)
185 const double d1 = (r1 * r1 - r2 * r2 + d * d) / (2 * d);
186 const double d2 = d - d1;
187 const double intersection =
188 r1 * r1 * acos(d1 / r1) - d1 * sqrt(r1 * r1 - d1 * d1) +
189 r2 * r2 * acos(d2 / r2) - d2 * sqrt(r2 * r2 - d2 * d2);
195QColor SkyQPainter::skyColor()
const
199 if (Options::simulateDaytime())
201 KSSun *sun = KStarsData::Instance()->
skyComposite()->solarSystemComposite()->sun();
204 const double nightFraction = sun->nightFraction();
205 const double dayFraction = 1 - nightFraction;
207 sky =
QColor(nightFraction * nightSky.
red() + dayFraction * daySky.
red(),
208 nightFraction * nightSky.
green() + dayFraction * daySky.
green(),
209 nightFraction * nightSky.
blue() + dayFraction * daySky.
blue());
212 const KSMoon *moon = KStarsData::Instance()->
skyComposite()->solarSystemComposite()->moon();
216 const double sunRadius = sun->
angSize() * 0.5 / 60.0;
217 const double moonRadius = moon->
angSize() * 0.5 / 60.0;
218 if (separation < sunRadius + moonRadius)
222 if (moonRadius >= separation + sunRadius)
228 const double sunArea = M_PI * sunRadius * sunRadius;
229 const double overlapArea = circleOverlap(separation, moonRadius, sunRadius);
230 const double sunFraction = (sunArea - overlapArea) / sunArea;
231 if (sunFraction <= .05)
233 const double dayFraction = sunFraction / .05;
234 const double nightFraction = 1 - dayFraction;
235 sky =
QColor(dayFraction * sky.
red() + nightFraction * nightSky.
red(),
236 dayFraction * sky.
green() + nightFraction * nightSky.
green(),
237 dayFraction * sky.
blue() + nightFraction * nightSky.
blue());
265 const int starColorIntensity = Options::starColorIntensity();
268 switch (Options::starColorMode())
293 ColorMap.
insert(
'O', m_starColor);
294 ColorMap.
insert(
'B', m_starColor);
295 ColorMap.
insert(
'A', m_starColor);
296 ColorMap.
insert(
'F', m_starColor);
297 ColorMap.
insert(
'G', m_starColor);
298 ColorMap.
insert(
'K', m_starColor);
299 ColorMap.
insert(
'M', m_starColor);
302 for (
char &color : ColorMap.
keys())
310 if (Options::starColorMode() == 0)
314 QColor starColor = ColorMap[color];
315 starColor.
getHsvF(&h, &s, &v, &a);
316 for (
int i = 0; i < 8; i++)
318 for (
int j = 0; j < 8; j++)
322 qreal dist = sqrt(x * x + y * y) / 7.0;
326 dist < (10 - starColorIntensity) / 10.0 ? 0 : dist),
329 dist < (10 - starColorIntensity) / 20.0 ? 1 : 1 - dist));
348 QPixmap **pmap = imageCache[harvardToIndex(color)];
350 for (
int size = 1; size < nStarSizes; size++)
358 starColorMode = Options::starColorMode();
360 if (!visibleSatPixmap.get())
361 visibleSatPixmap.reset(
new QPixmap(
":/icons/kstars_satellites_visible.svg"));
362 if (!invisibleSatPixmap.get())
363 invisibleSatPixmap.reset(
new QPixmap(
":/icons/kstars_satellites_invisible.svg"));
368 bool aVisible, bVisible;
393 LineListLabel * label)
395 SkyList *points = list->points();
396 bool isVisible, isVisibleLast;
398 if (points->size() == 0)
400 QPointF oLast = m_proj->
toScreen(points->first().get(),
true, &isVisibleLast);
405 for (
int j = 1; j < points->size(); j++)
407 SkyPoint *pThis = points->at(j).get();
409 oThis2 = oThis = m_proj->
toScreen(pThis,
true, &isVisible);
415 doSkip = skipList->skip(j);
418 bool pointsVisible =
false;
420 if (SkyMap::Instance()->projector()->type() == Projector::Gnomonic)
422 if (isVisible && isVisibleLast)
423 pointsVisible =
true;
427 if (isVisible || isVisibleLast)
428 pointsVisible =
true;
437 label->updateLabelCandidates(oThis.
x(), oThis.
y(), list, j);
442 isVisibleLast = isVisible;
448 bool isVisible =
false, isVisibleLast;
449 SkyList *points = list->points();
452 if (forceClip ==
false)
454 for (
const auto &point : *points)
456 polygon << m_proj->
toScreen(point.get(),
false, &isVisibleLast);
457 isVisible |= isVisibleLast;
461 if (polygon.
size() && isVisible)
467 SkyPoint *pLast = points->last().get();
472 for (
const auto &point : *points)
479 if (isVisible && isVisibleLast)
483 else if (isVisibleLast)
497 isVisibleLast = isVisible;
509 bool visible =
false;
511 if (!visible || !m_proj->
onScreen(pos))
514 float fakeStarSize = (10.0 + log10(Options::zoomFactor()) - log10(MINZOOM)) *
515 (10 - planet->
mag()) / 10;
516 if (fakeStarSize > 15.0)
519 double size = planet->
angSize() *
dms::PI * Options::zoomFactor() / 10800.0;
520 if (size < fakeStarSize && planet->name() !=
i18n(
"Sun") &&
530 else if (planet->
name() ==
i18n(
"Jupiter") || planet->
name() ==
i18n(
"Mercury") ||
546 if (planet->
name() ==
i18n(
"Sun")) size = size * Options::sunScale();
547 if (planet->
name() ==
i18n(
"Moon")) size = size * Options::moonScale();
552 if (Options::showPlanetImages() && !planet->
image().
isNull())
555 if (planet->
name() ==
"Saturn")
556 size = int(2.5 * size);
558 else if (planet->
name() ==
"Pluto")
559 size = int(size * exp(1.5 * size));
571 auto keepBrush =
brush();
572 auto keepPen =
pen();
599 bool visible =
false;
607 double penumbra_size =
630 bool visible =
false;
634 if (visible && m_proj->
onScreen(pos))
643 if (Options::showCometComas() && comaLength > size)
646 KStarsData::Instance()->
skyComposite()->solarSystemComposite()->sun();
649 double comaAngle = m_proj->
findPA(sun, pos.
x(), pos.
y());
653 QPoint(pos.
x(), pos.
y() + comaLength)
695 bool visible =
false;
698 if (visible && m_proj->
onScreen(pos))
718 bool visible =
false;
721 if (visible && m_proj->
onScreen(pos))
734 int isize = qMin(
static_cast<int>(size), 14);
735 if (!m_vectorStars || starColorMode == 0)
738 QPixmap *im = imageCache[harvardToIndex(sp)][isize];
739 float offset = 0.5 * im->
width();
745 if (starColorMode != 4)
762 drawEllipse(pos.
x() - 0.5 * size, pos.
y() - 0.5 * size,
int(size),
int(size));
770 double zoom = Options::zoomFactor();
772 bool visible =
false;
774 KStarsData::Instance()->geo()->lat());
777 if (!visible || !m_proj->
onScreen(constellationmidpoint))
781 float positionangle =
782 m_proj->
findPA(obj, constellationmidpoint.
x(), constellationmidpoint.
y());
794 if (m_proj->viewParams().mirror)
808bool SkyQPainter::drawMosaicPanel(MosaicTiles * obj)
810 bool visible =
false;
812 KStarsData::Instance()->geo()->lat());
815 if (!visible || !m_proj->
onScreen(tileMid) || !obj->isValid())
821 const auto mirror = m_proj->viewParams().mirror;
822 auto PA = (obj->positionAngle() < 0) ? obj->positionAngle() + 360 : obj->positionAngle();
823 auto finalPA = m_proj->
findNorthPA(obj, tileMid.
x(), tileMid.
y()) - (mirror ? -PA : PA);
840 if (useCache && m_HiPSImage)
848 bool rendered = m_hipsRender->render(w, h, m_HiPSImage.
data(), m_proj);
862 TerrainRenderer *renderer = TerrainRenderer::Instance();
863 bool rendered = renderer->render(w, h, terrainImage, m_proj);
867 delete (terrainImage);
874 if (!Options::showImageOverlays())
877 constexpr int minDisplayDimension = 5;
880 auto localTime = KStarsData::Instance()->
geo()->UTtoLT(KStarsData::Instance()->clock()->utc());
883 const double vw = view.width, vh = view.height;
889 for (
const ImageOverlay &o : *imageOverlays)
891 if (o.m_Status != ImageOverlay::AVAILABLE || o.m_Img.get() ==
nullptr)
894 double orientation = o.m_Orientation, ra = o.m_RA, dec = o.m_DEC,
scale = o.m_ArcsecPerPixel;
895 const int origWidth = o.m_Width, origHeight = o.m_Height;
902 const dms raDms(ra), decDms(dec);
908 const double a = origWidth *
scale / 60.0;
909 const double zoom = Options::zoomFactor();
912 const double w = a *
dms::PI * zoom / 10800.0;
913 const double h = w * origHeight / origWidth;
914 const double maxDimension = std::max(w, h);
915 if (maxDimension < minDisplayDimension)
920 if (!visible || isnan(pos.
x()) || isnan(pos.
y()))
923 const auto PA = (orientation < 0) ? orientation + 360 : orientation;
924 const auto mirror = m_proj->viewParams().mirror;
925 const auto finalPA = m_proj->
findNorthPA(&coord, pos.
x(), pos.
y()) - (mirror ? -PA : PA);
934 this->
scale(-1., 1.);
947 const auto &image = obj.
image();
952 double zoom = Options::zoomFactor();
953 double w = obj.
a() *
dms::PI * zoom / 10800.0;
954 double h = obj.
e() * w;
968 bool visible =
false;
970 if (!visible || !m_proj->
onScreen(pos))
975 float majorAxis = obj.
a();
976 if (majorAxis == 0.0)
981 float size = majorAxis *
dms::PI * Options::zoomFactor() / 10800.0;
983 const auto mirror = m_proj->viewParams().mirror;
984 const auto positionAngle = m_proj->
findNorthPA(&obj, pos.
x(), pos.
y())
985 - (mirror ? -obj.
pa() : obj.
pa())
989 if (Options::showInlineImages() && Options::zoomFactor() > 5. * MINZOOM &&
990 !Options::showHIPS())
991 drawCatalogObjectImage(pos, obj, positionAngle);
994 drawDeepSkySymbol(pos, obj.
type(), size, obj.
e(), positionAngle);
999void SkyQPainter::drawDeepSkySymbol(
const QPointF &pos,
int type,
float size,
float e,
1000 float positionAngle)
1004 float zoom = Options::zoomFactor();
1006 int isize = int(size);
1008 float dx1 = -0.5 * size;
1009 float dx2 = 0.5 * size;
1010 float dy1 = -1.0 * e * size / 2.;
1011 float dy2 = e * size / 2.;
1017 float dxa = -size / 4.;
1018 float dxb = size / 4.;
1019 float dya = -1.0 * e * size / 4.;
1020 float dyb = e * size / 4.;
1032 std::function<void(
float,
float,
float,
float)> lambdaDrawEllipse;
1033 std::function<void(
float,
float,
float,
float)> lambdaDrawLine;
1034 std::function<void(
float,
float,
float,
float)> lambdaDrawCross;
1036 if (Options::useAntialias())
1038 lambdaDrawEllipse = [
this](
float x,
float y,
float width,
float height)
1042 lambdaDrawLine = [
this](
float x1,
float y1,
float x2,
float y2)
1046 lambdaDrawCross = [
this](
float centerX,
float centerY,
float sizeX,
float sizeY)
1049 QLineF(centerX - sizeX / 2., centerY, centerX + sizeX / 2., centerY));
1051 QLineF(centerX, centerY - sizeY / 2., centerX, centerY + sizeY / 2.));
1056 lambdaDrawEllipse = [
this](
float x,
float y,
float width,
float height)
1060 lambdaDrawLine = [
this](
float x1,
float y1,
float x2,
float y2)
1064 lambdaDrawCross = [
this](
float centerX,
float centerY,
float sizeX,
float sizeY)
1066 drawLine(
QLine(centerX - sizeX / 2., centerY, centerX + sizeX / 2., centerY));
1067 drawLine(
QLine(centerX, centerY - sizeY / 2., centerX, centerY + sizeY / 2.));
1073 case SkyObject::STAR:
1074 case SkyObject::CATALOG_STAR:
1078 lambdaDrawEllipse(x - size / 2., y - size / 2., size, size);
1080 case SkyObject::PLANET:
1082 case SkyObject::OPEN_CLUSTER:
1083 case SkyObject::ASTERISM:
1085 tempBrush =
brush();
1093 auto putDot = [psize, &lambdaDrawEllipse](
float x,
float y)
1095 lambdaDrawEllipse(x - psize / 2., y - psize / 2., psize, psize);
1108 case SkyObject::GLOBULAR_CLUSTER:
1115 lambdaDrawEllipse(dx1, dy1, size, e * size);
1116 lambdaDrawCross(0, 0, size, e * size);
1120 case SkyObject::GASEOUS_NEBULA:
1121 case SkyObject::DARK_NEBULA:
1126 lambdaDrawLine(dx1, dy1, dx2, dy1);
1127 lambdaDrawLine(dx2, dy1, dx2, dy2);
1128 lambdaDrawLine(dx2, dy2, dx1, dy2);
1129 lambdaDrawLine(dx1, dy2, dx1, dy1);
1132 case SkyObject::PLANETARY_NEBULA:
1139 lambdaDrawEllipse(dx1, dy1, size, e * size);
1140 lambdaDrawLine(0., dy1, 0., dy1 - e * size / 2.);
1141 lambdaDrawLine(0., dy2, 0., dy2 + e * size / 2.);
1142 lambdaDrawLine(dx1, 0., dx1 - size / 2., 0.);
1143 lambdaDrawLine(dx2, 0., dx2 + size / 2., 0.);
1146 case SkyObject::SUPERNOVA_REMNANT:
1151 lambdaDrawLine(0., dy1, dx2, 0.);
1152 lambdaDrawLine(dx2, 0., 0., dy2);
1153 lambdaDrawLine(0., dy2, dx1, 0.);
1154 lambdaDrawLine(dx1, 0., 0., dy1);
1157 case SkyObject::GALAXY:
1158 case SkyObject::QUASAR:
1160 if (size < 1. && zoom > 20 * MINZOOM)
1162 if (size < 1. && zoom > 5 * MINZOOM)
1169 lambdaDrawEllipse(dx1, dy1, size, e * size);
1177 case SkyObject::GALAXY_CLUSTER:
1179 tempBrush =
brush();
1188 lambdaDrawEllipse(dx1, dy1, size, e * size);
1196 if (size < 1. && zoom > 20 * MINZOOM)
1198 if (size < 1. && zoom > 5 * MINZOOM)
1206#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
1209 double scaleFactor = 0.8 * size /
fontMetrics().width(qMark);
1212 f.setPointSizeF(f.pointSizeF() * scaleFactor);
1216 lambdaDrawEllipse(dx1, dy1, size, e * size);
1217 if (Options::useAntialias())
1221 int idx1 = int(dx1);
1222 int idy1 = int(dy1);
1230 if (Options::useAntialias())
1242 bool visible =
false;
1244 if (!visible || !m_proj->
onScreen(o))
1248 float x1 = o.
x() - 0.5 * size;
1249 float y1 = o.
y() - 0.5 * size;
1258 std::shared_ptr<SkyPoint> point;
1260 bool visible =
false;
1263 for (
int i = 0; i < data->
skyComposite()->flags()->size(); i++)
1269 point->EquatorialToHorizontal(data->
lst(), data->
geo()->
lat());
1272 pos = m_proj->
toScreen(point.get(),
true, &visible);
1275 if (!visible || !m_proj->
onScreen(pos))
1288void SkyQPainter::drawHorizon(
bool filled,
SkyPoint * labelPoint,
bool * drawLabel)
1294 for (
int i = 0; i < ground.
size(); ++i)
1295 groundPoly[i] = KSUtils::vecToPoint(ground[i]);
1300 groundPoly.append(groundPoly.first());
1312 bool visible =
false;
1316 pos = m_proj->
toScreen(sat,
true, &visible);
1318 if (!visible || !m_proj->
onScreen(pos))
1321 if (Options::drawSatellitesLikeStars())
1353 bool visible =
false;
1357 if (!visible || !m_proj->
onScreen(pos))
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
std::pair< bool, const QImage & > image() const
Get the image for this object.
double pa() const override
QColor colorNamed(const QString &name) const
Retrieve a color by name.
Information about a ConstellationsArt object.
QColor labelColor(int index)
Get label color.
QString label(int index)
Get label.
QImage image(int index)
Get image.
const CachingDms * lat() const
A subclass of KSPlanetBase that implements asteroids.
A subclass of KSPlanetBase that implements comets.
A class that manages the calculation of the earths shadow (in moon distance) as a 'virtual' skyobject...
double getPenumbraAngSize() const
double getUmbraAngSize() const
Provides necessary information about the Moon.
A subclass of TrailObject that provides additional information needed for most solar system objects.
const QImage & image() const
Child class of KSPlanetBase; encapsulates information about the Sun.
KStarsData is the backbone of KStars.
ColorScheme * colorScheme()
SkyMapComposite * skyComposite()
static KStars * Instance()
A simple data container used by LineListIndex.
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=nullptr) const
This is exactly the same as toScreenVec but it returns a QPointF.
double findPA(const SkyObject *o, float x, float y) const
Determine the on-screen position angle of a SkyObject.
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
double findNorthPA(const SkyPoint *o, float x, float y) const
Determine the on-screen position angle of a SkyPont with recept with NCP.
bool checkVisibility(const SkyPoint *p) const
Determine if the skypoint p is likely to be visible in the display window.
virtual QVector< Eigen::Vector2f > groundPoly(SkyPoint *labelpoint=nullptr, bool *drawLabel=nullptr) const
Get the ground polygon.
QPointF clipLine(SkyPoint *p1, SkyPoint *p2) const
ASSUMES *p1 did not clip but *p2 did.
This class checks if two rectangles overlap.
bool intersects(const QPointF ¢er, int width, int height, double rotationDegrees=0.0) const
Check if the input rectangle overlaps the reference rectangle.
Represents an artificial satellites.
const Projector * projector() const
Get the current projector.
Provides all necessary information about an object in the sky: its coordinates, name(s),...
virtual QString name(void) const
TYPE
The type classification of the SkyObject.
Draws things on the sky, without regard to backend.
float starWidth(float mag) const
Get the width of a star of magnitude mag.
The sky coordinates of a point in the sky.
void apparentCoord(long double jd0, long double jdf)
Computes the apparent coordinates for this SkyPoint for any epoch, accounting for the effects of prec...
dms angularDistanceTo(const SkyPoint *sp, double *const positionAngle=nullptr) const
Computes the angular distance between two SkyObjects.
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
bool drawAsteroid(KSAsteroid *ast) override
Draw an asteroid in the sky.
bool drawComet(KSComet *com) override
Draw a comet in the sky.
void end() override
End and finalize painting.
SkyQPainter(QPaintDevice *pd, const QSize &canvasSize)
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canv...
bool drawPlanet(KSPlanetBase *planet) override
Draw a planet.
bool drawPointSource(const SkyPoint *loc, float mag, char sp='A') override
Draw a point source (e.g., a star).
void drawSkyLine(SkyPoint *a, SkyPoint *b) override
Draw a line between points in the sky.
bool drawImageOverlay(const QList< ImageOverlay > *imageOverlays, bool useCache=false) override
drawImageOverlay Draws a user-supplied image onto the skymap
void setBrush(const QBrush &brush) override
Set the brush of the painter.
void drawSkyPolyline(LineList *list, SkipHashList *skipList=nullptr, LineListLabel *label=nullptr) override
Draw a polyline in the sky.
bool drawTerrain(bool useCache=false) override
drawTerrain Draw the Terrain
void drawSkyPolygon(LineList *list, bool forceClip=true) override
Draw a polygon in the sky.
void drawSkyBackground() override
Draw the sky background.
bool drawCatalogObject(const CatalogObject &obj) override
Draw a deep sky object (loaded from the new implementation)
void drawObservingList(const QList< SkyObject * > &obs) override
Draw the symbols for the observing list.
static void initStarImages()
Recalculates the star pixmaps.
static void releaseImageCache()
Release the image cache.
void setPen(const QPen &pen) override
Set the pen of the painter.
bool drawEarthShadow(KSEarthShadow *shadow) override
Draw the earths shadow on the moon (red-ish)
bool drawConstellationArtImage(ConstellationsArt *obj) override
Draw a ConstellationsArt object.
void drawFlags() override
Draw flags.
bool drawSupernova(Supernova *sup) override
Draw a Supernova.
bool drawHips(bool useCache=false) override
drawMosaicPanel Draws mosaic panel in planning or operation mode.
bool drawSatellite(Satellite *sat) override
Draw a satellite.
void begin() override
Begin painting.
Represents the supernova object.
This is just a container that holds information needed to do projections.
An angle, stored as degrees, but expressible in many ways.
static constexpr double PI
PI is a const static member; it's public so that it can be used anywhere, as long as dms....
const double & Degrees() const
QString i18n(const char *text, const TYPE &arg...)
void getHsvF(float *h, float *s, float *v, float *a) const const
QString name(NameFormat format) const const
void setHsvF(float h, float s, float v, float a)
int horizontalAdvance(QChar ch) const const
void setColorAt(qreal position, const QColor &color)
bool isNull() const const
const_reference at(qsizetype i) const const
qsizetype size() const const
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
QList< Key > keys() const const
T value(const Key &key, const T &defaultValue) const const
bool begin(QPaintDevice *device)
const QBrush & brush() const const
CompositionMode compositionMode() const const
void drawArc(const QRect &rectangle, int startAngle, int spanAngle)
void drawConvexPolygon(const QPoint *points, int pointCount)
void drawEllipse(const QPoint ¢er, int rx, int ry)
void drawImage(const QPoint &point, const QImage &image)
void drawLine(const QLine &line)
void drawPixmap(const QPoint &point, const QPixmap &pixmap)
void drawPoint(const QPoint &position)
void drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fillRule)
void drawPolyline(const QPoint *points, int pointCount)
void drawText(const QPoint &position, const QString &text)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
const QFont & font() const const
QFontMetrics fontMetrics() const const
const QPen & pen() const const
void scale(qreal sx, qreal sy)
void setBrush(Qt::BrushStyle style)
void setCompositionMode(CompositionMode mode)
void setFont(const QFont &font)
void setOpacity(qreal opacity)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
void setRenderHints(RenderHints hints, bool on)
void translate(const QPoint &offset)
QRect viewport() const const
QColor color() const const
void setStyle(Qt::PenStyle style)
void fill(const QColor &color)
QPixmap scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QPoint toPoint() const const
QPoint point(int index) const const
void setHeight(int height)