50     int harvardToIndex(
char c) {
 
   52         case 'o': 
case 'O': 
return 0;
 
   53         case 'b': 
case 'B': 
return 1;
 
   54         case 'a': 
case 'A': 
return 2;
 
   55         case 'f': 
case 'F': 
return 3;
 
   56         case 'g': 
case 'G': 
return 4;
 
   57         case 'k': 
case 'K': 
return 5;
 
   58         case 'm': 
case 'M': 
return 6;
 
   65     const int nStarSizes = 15;
 
   68     const int nSPclasses = 7;
 
   73     QPixmap* imageCache[nSPclasses][nStarSizes] = {{0}};
 
   76 int SkyQPainter::starColorMode = 0;
 
   83     m_size = QSize( pd->width(), pd->height() );
 
   84     m_vectorStars = 
false;
 
   93     m_vectorStars = 
false;
 
  101     m_pd = ( pd ? pd : widget );
 
  102     m_size = widget->size();
 
  103     m_vectorStars = 
false;
 
  112     QPainter::begin(m_pd);
 
  114     setRenderHint(QPainter::Antialiasing, aa );
 
  115     setRenderHint(QPainter::HighQualityAntialiasing, aa);
 
  132     QPainter::setPen(pen);
 
  137     QPainter::setBrush(brush);
 
  143     QMap<char, QColor> ColorMap;
 
  148         ColorMap.insert( 
'O', QColor::fromRgb( 255,   0,   0 ) );
 
  149         ColorMap.insert( 
'B', QColor::fromRgb( 255,   0,   0 ) );
 
  150         ColorMap.insert( 
'A', QColor::fromRgb( 255,   0,   0 ) );
 
  151         ColorMap.insert( 
'F', QColor::fromRgb( 255,   0,   0 ) );
 
  152         ColorMap.insert( 
'G', QColor::fromRgb( 255,   0,   0 ) );
 
  153         ColorMap.insert( 
'K', QColor::fromRgb( 255,   0,   0 ) );
 
  154         ColorMap.insert( 
'M', QColor::fromRgb( 255,   0,   0 ) );
 
  157         ColorMap.insert( 
'O', QColor::fromRgb(   0,   0,   0 ) );
 
  158         ColorMap.insert( 
'B', QColor::fromRgb(   0,   0,   0 ) );
 
  159         ColorMap.insert( 
'A', QColor::fromRgb(   0,   0,   0 ) );
 
  160         ColorMap.insert( 
'F', QColor::fromRgb(   0,   0,   0 ) );
 
  161         ColorMap.insert( 
'G', QColor::fromRgb(   0,   0,   0 ) );
 
  162         ColorMap.insert( 
'K', QColor::fromRgb(   0,   0,   0 ) );
 
  163         ColorMap.insert( 
'M', QColor::fromRgb(   0,   0,   0 ) );
 
  166         ColorMap.insert( 
'O', QColor::fromRgb( 255, 255, 255 ) );
 
  167         ColorMap.insert( 
'B', QColor::fromRgb( 255, 255, 255 ) );
 
  168         ColorMap.insert( 
'A', QColor::fromRgb( 255, 255, 255 ) );
 
  169         ColorMap.insert( 
'F', QColor::fromRgb( 255, 255, 255 ) );
 
  170         ColorMap.insert( 
'G', QColor::fromRgb( 255, 255, 255 ) );
 
  171         ColorMap.insert( 
'K', QColor::fromRgb( 255, 255, 255 ) );
 
  172         ColorMap.insert( 
'M', QColor::fromRgb( 255, 255, 255 ) );
 
  175         ColorMap.insert( 
'O', QColor::fromRgb(   0,   0, 255 ) );
 
  176         ColorMap.insert( 
'B', QColor::fromRgb(   0, 200, 255 ) );
 
  177         ColorMap.insert( 
'A', QColor::fromRgb(   0, 255, 255 ) );
 
  178         ColorMap.insert( 
'F', QColor::fromRgb( 200, 255, 100 ) );
 
  179         ColorMap.insert( 
'G', QColor::fromRgb( 255, 255,   0 ) );
 
  180         ColorMap.insert( 
'K', QColor::fromRgb( 255, 100,   0 ) );
 
  181         ColorMap.insert( 
'M', QColor::fromRgb( 255,   0,   0 ) );
 
  184     foreach( 
char color, ColorMap.keys() ) {
 
  185         QPixmap BigImage( 15, 15 );
 
  186         BigImage.fill( Qt::transparent );
 
  189         p.begin( &BigImage );
 
  193             p.setRenderHint( QPainter::Antialiasing, 
false );
 
  194             QColor starColor = ColorMap[color];
 
  195             starColor.getHsvF(&h, &s, &v, &a);
 
  196             for (
int i = 0; i < 8; i++ ) {
 
  197                 for (
int j = 0; j < 8; j++ ) {
 
  200                     qreal dist = sqrt( x*x + y*y ) / 7.0;
 
  202                                       qMin( qreal(1), dist < (10-starColorIntensity)/10.0 ? 0 : dist ),
 
  204                                       qMax( qreal(0), dist < (10-starColorIntensity)/20.0 ? 1 : 1-dist ) );
 
  205                     p.setPen( starColor );
 
  207                     p.drawPoint( 14-i, j );
 
  208                     p.drawPoint( i, 14-j );
 
  209                     p.drawPoint (14-i, 14-j);
 
  213             p.setRenderHint(QPainter::Antialiasing, 
true );
 
  214             p.setPen( QPen(ColorMap[color], 2.0 ) );
 
  215             p.setBrush( p.pen().color() );
 
  216             p.drawEllipse( QRectF( 2, 2, 10, 10 ) );
 
  221         QPixmap** pmap = imageCache[ harvardToIndex(color) ];
 
  222         for( 
int size = 1; size < nStarSizes; size++ ) {
 
  224                 pmap[size] = 
new QPixmap();
 
  225             *pmap[size] = BigImage.scaled( size, size, Qt::KeepAspectRatio, Qt::SmoothTransformation );
 
  233     bool aVisible, bVisible;
 
  234     QPointF aScreen = m_proj->
toScreen(a,
true,&aVisible);
 
  235     QPointF bScreen = m_proj->
toScreen(b,
true,&bVisible);
 
  237     if( aVisible && bVisible ) {
 
  239         drawLine(aScreen, bScreen);
 
  240     } 
else if( aVisible ) {
 
  242         drawLine(aScreen, m_proj->
clipLine(a,b));
 
  243     } 
else if( bVisible ) {
 
  245         drawLine(bScreen, m_proj->
clipLine(b,a));
 
  252     bool isVisible, isVisibleLast;
 
  254     QPointF   oLast = m_proj->
toScreen( points->first(), 
true, &isVisibleLast );
 
  257     QPointF oThis, oThis2;
 
  259     for ( 
int j = 1 ; j < points->size() ; j++ ) {
 
  261         oThis2 = oThis = m_proj->
toScreen( pThis, 
true, &isVisible );
 
  266             doSkip = skipList->
skip(j);
 
  270             if ( isVisible && isVisibleLast ) {
 
  271                 drawLine( oLast, oThis );
 
  278         isVisibleLast = isVisible;
 
  285     bool isVisible, isVisibleLast;
 
  287     QPointF   oLast = m_proj->
toScreen( pLast, 
true, &isVisibleLast );
 
  293     for ( 
int i = 0; i < points->size(); ++i ) {
 
  295         QPointF oThis = m_proj->
toScreen( pThis, 
true, &isVisible );
 
  300         if ( isVisible && isVisibleLast ) {
 
  302         } 
else if ( isVisibleLast ) {
 
  303             QPointF oMid = m_proj->
clipLine( pLast, pThis );
 
  305         } 
else if ( isVisible ) {
 
  306             QPointF oMid = m_proj->
clipLine( pThis, pLast );
 
  313         isVisibleLast = isVisible;
 
  316     if ( polygon.size() )
 
  317         drawPolygon(polygon);
 
  324     bool visible = 
false;
 
  325     QPointF pos = m_proj->
toScreen(planet,
true,&visible);
 
  326     if( !visible || !m_proj->
onScreen(pos) ) 
return false;
 
  329     if( fakeStarSize > 15.0 )
 
  333     if( size < fakeStarSize && planet->name() != 
"Sun" && planet->
name() != 
"Moon" ) {
 
  337         if( planet->
name() == i18n(
"Mars") ) {
 
  339         } 
else if( planet->
name() == i18n(
"Jupiter") || planet->
name() == i18n(
"Mercury") || planet->
name() == i18n(
"Saturn") ) {
 
  347         if( planet->
name() == 
"Sun" || planet->
name() == 
"Moon" )
 
  355             if( planet->
name() == 
"Saturn" )
 
  356                 size = 
int(2.5*size);
 
  360             rotate( m_proj->
findPA( planet, pos.x(), pos.y() ) );
 
  361             drawImage( QRect(-0.5*size, -0.5*size, size, size),
 
  365             drawEllipse( pos, size, size );
 
  376     bool visible = 
false;
 
  377     QPointF pos = m_proj->
toScreen(loc,
true,&visible);
 
  378     if( visible && m_proj->
onScreen(pos) ) { 
 
  388     int isize = qMin(static_cast<int>(size), 14);
 
  389     if( !m_vectorStars || ( starColorMode <=0 || starColorMode > 3 )  ) {
 
  391         QPixmap* im = imageCache[ harvardToIndex(sp) ][isize];
 
  392         float offset = 0.5 * im->width();
 
  393         drawPixmap( QPointF(pos.x()-offset, pos.y()-offset), *im );
 
  400             color = QColor::fromRgb(255, 0, 0);
 
  403             color = QColor::fromRgb(0, 0, 0);
 
  406             color = QColor::fromRgb(255, 255, 255);
 
  418             drawEllipse( pos.x() - 0.5 * size, pos.y() - 0.5 * size, int(size), int(size) );
 
  420             drawPoint( pos.x(), pos.y() );
 
  428     bool visible = 
false;
 
  429     QPointF pos = m_proj->
toScreen(obj, 
true, &visible);
 
  430     if( !visible || !m_proj->
onScreen(pos) ) 
return false;
 
  434     float majorAxis = obj->
a();
 
  435     if ( majorAxis == 0.0 ) {   majorAxis = 1.0; }
 
  440     float positionAngle = m_proj->
findPA( obj, pos.x(), pos.y() );
 
  444         drawDeepSkyImage(pos, obj, positionAngle);
 
  452 bool SkyQPainter::drawDeepSkyImage(
const QPointF& pos, 
DeepSkyObject* obj, 
float positionAngle)
 
  455     double w = obj->
a() * 
dms::PI * zoom/10800.0;
 
  456     double h = obj->
e() * w;
 
  460     rotate( positionAngle );
 
  461     drawImage( QRect(-0.5*w, -0.5*h, w, h), obj->
image() );
 
  474     int isize = int(size);
 
  476     float dx1 = -0.5*size;
 
  477     float dx2 =  0.5*size;
 
  478     float dy1 = -1.0*e*size/2.;
 
  479     float dy2 = e*size/2.;
 
  485     float dxa = -size/4.;
 
  487     float dya = -1.0*e*size/4.;
 
  488     float dyb = e*size/4.;
 
  502         if (size<2.) size = 2.;
 
  504             drawEllipse( QRectF(x1, y1, size/2., size/2.) );
 
  506             drawEllipse( QRect(
int(x1), 
int(y1), 
int(size/2), 
int(size/2)) );
 
  515         if ( size > 50. )  psize *= 2.;
 
  516         if ( size > 100. ) psize *= 2.;
 
  518             drawEllipse( QRectF(xa, y1, psize, psize) );
 
  519             drawEllipse( QRectF(xb, y1, psize, psize) );
 
  520             drawEllipse( QRectF(xa, y2, psize, psize) );
 
  521             drawEllipse( QRectF(xb, y2, psize, psize) );
 
  522             drawEllipse( QRectF(x1, ya, psize, psize) );
 
  523             drawEllipse( QRectF(x1, yb, psize, psize) );
 
  524             drawEllipse( QRectF(x2, ya, psize, psize) );
 
  525             drawEllipse( QRectF(x2, yb, psize, psize) );
 
  527             int ix1 = int(x1); 
int iy1 = int(y1);
 
  528             int ix2 = int(x2); 
int iy2 = int(y2);
 
  529             int ixa = int(xa); 
int iya = int(ya);
 
  530             int ixb = int(xb); 
int iyb = int(yb);
 
  531             drawEllipse( QRect(ixa, iy1, 
int(psize), 
int(psize)) );
 
  532             drawEllipse( QRect(ixb, iy1, 
int(psize), 
int(psize)) );
 
  533             drawEllipse( QRect(ixa, iy2, 
int(psize), 
int(psize)) );
 
  534             drawEllipse( QRect(ixb, iy2, 
int(psize), 
int(psize)) );
 
  535             drawEllipse( QRect(ix1, iya, 
int(psize), 
int(psize)) );
 
  536             drawEllipse( QRect(ix1, iyb, 
int(psize), 
int(psize)) );
 
  537             drawEllipse( QRect(ix2, iya, 
int(psize), 
int(psize)) );
 
  538             drawEllipse( QRect(ix2, iyb, 
int(psize), 
int(psize)) );
 
  543         if (size<2.) size = 2.;
 
  546         rotate( positionAngle );  
 
  549             drawEllipse( QRectF(dx1, dy1, size, e*size) );
 
  550             drawLine( QPointF(0., dy1), QPointF(0., dy2) );
 
  551             drawLine( QPointF(dx1, 0.), QPointF(dx2, 0.) );
 
  554             int idx1 = int(dx1); 
int idy1 = int(dy1);
 
  555             int idx2 = int(dx2); 
int idy2 = int(dy2);
 
  556             drawEllipse( QRect(idx1, idy1, isize, 
int(e*size)) );
 
  557             drawLine( QPoint(0, idy1), QPoint(0, idy2) );
 
  558             drawLine( QPoint(idx1, 0), QPoint(idx2, 0) );
 
  565         if (size <2.) size = 2.;
 
  568         rotate( positionAngle );  
 
  571             drawLine( QPointF(dx1, dy1), QPointF(dx2, dy1) );
 
  572             drawLine( QPointF(dx2, dy1), QPointF(dx2, dy2) );
 
  573             drawLine( QPointF(dx2, dy2), QPointF(dx1, dy2) );
 
  574             drawLine( QPointF(dx1, dy2), QPointF(dx1, dy1) );
 
  576             int idx1 = int(dx1); 
int idy1 = int(dy1);
 
  577             int idx2 = int(dx2); 
int idy2 = int(dy2);
 
  578             drawLine( QPoint(idx1, idy1), QPoint(idx2, idy1) );
 
  579             drawLine( QPoint(idx2, idy1), QPoint(idx2, idy2) );
 
  580             drawLine( QPoint(idx2, idy2), QPoint(idx1, idy2) );
 
  581             drawLine( QPoint(idx1, idy2), QPoint(idx1, idy1) );
 
  586         if (size<2.) size = 2.;
 
  589         rotate( positionAngle );  
 
  592             drawEllipse( QRectF(dx1, dy1, size, e*size) );
 
  593             drawLine( QPointF(0., dy1), QPointF(0., dy1 - e*size/2. ) );
 
  594             drawLine( QPointF(0., dy2), QPointF(0., dy2 + e*size/2. ) );
 
  595             drawLine( QPointF(dx1, 0.), QPointF(dx1 - size/2., 0.) );
 
  596             drawLine( QPointF(dx2, 0.), QPointF(dx2 + size/2., 0.) );
 
  598             int idx1 = int(dx1); 
int idy1 = int(dy1);
 
  599             int idx2 = int(dx2); 
int idy2 = int(dy2);
 
  600             drawEllipse( QRect( idx1, idy1, isize, 
int(e*size) ) );
 
  601             drawLine( QPoint(0, idy1), QPoint(0, idy1 - 
int(e*size/2) ) );
 
  602             drawLine( QPoint(0, idy2), QPoint(0, idy2 + 
int(e*size/2) ) );
 
  603             drawLine( QPoint(idx1, 0), QPoint(idx1 - 
int(size/2), 0) );
 
  604             drawLine( QPoint(idx2, 0), QPoint(idx2 + 
int(size/2), 0) );
 
  610         if (size<2) size = 2;
 
  613         rotate( positionAngle );  
 
  616             drawLine( QPointF(0., dy1), QPointF(dx2, 0.) );
 
  617             drawLine( QPointF(dx2, 0.), QPointF(0., dy2) );
 
  618             drawLine( QPointF(0., dy2), QPointF(dx1, 0.) );
 
  619             drawLine( QPointF(dx1, 0.), QPointF(0., dy1) );
 
  621             int idx1 = int(dx1); 
int idy1 = int(dy1);
 
  622             int idx2 = int(dx2); 
int idy2 = int(dy2);
 
  623             drawLine( QPoint(0, idy1), QPoint(idx2, 0) );
 
  624             drawLine( QPoint(idx2, 0), QPoint(0, idy2) );
 
  625             drawLine( QPoint(0, idy2), QPoint(idx1, 0) );
 
  626             drawLine( QPoint(idx1, 0), QPoint(0, idy1) );
 
  633         if ( size <1. && zoom > 20*
MINZOOM ) size = 3.; 
 
  634         if ( size <1. && zoom > 5*MINZOOM ) size = 1.; 
 
  638             rotate( positionAngle );  
 
  641                 drawEllipse( QRectF(dx1, dy1, size, e*size) );
 
  643                 int idx1 = int(dx1); 
int idy1 = int(dy1);
 
  644                 drawEllipse( QRect(idx1, idy1, isize, 
int(e*size)) );
 
  649         } 
else if ( size>0. ) {
 
  650             drawPoint( QPointF(x, y) );
 
  657         if ( size > 50. )  psize *= 2.;
 
  660             drawLine( QLineF( xa - psize, y1, xa + psize, y1 ) );
 
  661             drawLine( QLineF( xa, y1 - psize, xa, y1 + psize ) );
 
  662             drawLine( QLineF( xb - psize, y1, xb + psize, y1 ) );
 
  663             drawLine( QLineF( xb, y1 - psize, xb, y1 + psize ) );
 
  664             drawLine( QLineF( xa - psize, y2, xa + psize, y2 ) );
 
  665             drawLine( QLineF( xa, y2 - psize, xa, y2 + psize ) );
 
  666             drawLine( QLineF( xb - psize, y2, xb + psize, y2 ) );
 
  667             drawLine( QLineF( xb, y2 - psize, xb, y2 + psize ) );
 
  668             drawLine( QLineF( x1 - psize, ya, x1 + psize, ya ) );
 
  669             drawLine( QLineF( x1, ya - psize, x1, ya + psize ) );
 
  670             drawLine( QLineF( x1 - psize, yb, x1 + psize, yb ) );
 
  671             drawLine( QLineF( x1, yb - psize, x1, yb + psize ) );
 
  672             drawLine( QLineF( x2 - psize, ya, x2 + psize, ya ) );
 
  673             drawLine( QLineF( x2, ya - psize, x2, ya + psize ) );
 
  674             drawLine( QLineF( x2 - psize, yb, x2 + psize, yb ) );
 
  675             drawLine( QLineF( x2, yb - psize, x2, yb + psize ) );
 
  677             int ix1 = int(x1); 
int iy1 = int(y1);
 
  678             int ix2 = int(x2); 
int iy2 = int(y2);
 
  679             int ixa = int(xa); 
int iya = int(ya);
 
  680             int ixb = int(xb); 
int iyb = int(yb);
 
  681             drawLine( QLineF( ixa - 
int(psize), iy1, ixa + 
int(psize), iy1 ) );
 
  682             drawLine( QLineF( ixa, iy1 - 
int(psize), ixa, iy1 + 
int(psize) ) );
 
  683             drawLine( QLineF( ixb - 
int(psize), iy1, ixb + 
int(psize), iy1 ) );
 
  684             drawLine( QLineF( ixb, iy1 - 
int(psize), ixb, iy1 + 
int(psize) ) );
 
  685             drawLine( QLineF( ixa - 
int(psize), iy2, ixa + 
int(psize), iy2 ) );
 
  686             drawLine( QLineF( ixa, iy2 - 
int(psize), ixa, iy2 + 
int(psize) ) );
 
  687             drawLine( QLineF( ixb - 
int(psize), iy2, ixb + 
int(psize), iy2 ) );
 
  688             drawLine( QLineF( ixb, iy2 - 
int(psize), ixb, iy2 + 
int(psize) ) );
 
  689             drawLine( QLineF( ix1 - 
int(psize), iya, ix1 + 
int(psize), iya ) );
 
  690             drawLine( QLineF( ix1, iya - 
int(psize), ix1, iya + 
int(psize) ) );
 
  691             drawLine( QLineF( ix1 - 
int(psize), iyb, ix1 + 
int(psize), iyb ) );
 
  692             drawLine( QLineF( ix1, iyb - 
int(psize), ix1, iyb + 
int(psize) ) );
 
  693             drawLine( QLineF( ix2 - 
int(psize), iya, ix2 + 
int(psize), iya ) );
 
  694             drawLine( QLineF( ix2, iya - 
int(psize), ix2, iya + 
int(psize) ) );
 
  695             drawLine( QLineF( ix2 - 
int(psize), iyb, ix2 + 
int(psize), iyb ) );
 
  696             drawLine( QLineF( ix2, iyb - 
int(psize), ix2, iyb + 
int(psize) ) );
 
  706         bool visible = 
false;
 
  707         QPointF o = m_proj->
toScreen( obj, 
true, &visible );
 
  708         if( !visible || !m_proj->
onScreen(o) ) 
continue;
 
  711         float x1 = o.x() - 0.5*size;
 
  712         float y1 = o.y() - 0.5*size;
 
  713         drawArc( QRectF(x1, y1, size, size), -60*16, 120*16 );
 
  714         drawArc( QRectF(x1, y1, size, size), 120*16, 120*16 );
 
  723     bool visible = 
false;
 
  735         pos = m_proj->
toScreen( point, 
true, &visible );
 
  738         if( !visible || !m_proj->
onScreen( pos ) ) 
continue;
 
  741         drawImage( pos.x()-0.5*image.width(), pos.y()-0.5*image.height(), image );
 
  745         setFont( QFont( 
"Courier New", 10, QFont::Bold ) );
 
  752     QVector<Vector2f> ground = m_proj->
groundPoly(labelPoint, drawLabel);
 
  753     if( ground.size() ) {
 
  754         QPolygonF groundPoly(ground.size());
 
  755         for(
int i = 0; i < ground.size(); ++i)
 
  758             drawPolygon(groundPoly);
 
  760             groundPoly.append( groundPoly.first() );
 
  761             drawPolyline(groundPoly);
 
  769     bool visible = 
false;
 
  773     pos = m_proj->
toScreen( sat, 
true, &visible );
 
  775     if( !visible || !m_proj->
onScreen( pos ) )
 
  786         drawLine( QPoint( pos.x() - 0.5, pos.y() - 0.5 ), QPoint( pos.x() + 0.5, pos.y() - 0.5 ) );
 
  787         drawLine( QPoint( pos.x() + 0.5, pos.y() - 0.5 ), QPoint( pos.x() + 0.5, pos.y() + 0.5 ) );
 
  788         drawLine( QPoint( pos.x() + 0.5, pos.y() + 0.5 ), QPoint( pos.x() - 0.5, pos.y() + 0.5 ) );
 
  789         drawLine( QPoint( pos.x() - 0.5, pos.y() + 0.5 ), QPoint( pos.x() - 0.5, pos.y() - 0.5 ) );
 
  801     bool visible = 
false;
 
  802     QPointF pos = m_proj->
toScreen(sup,
true,&visible);
 
  805     if( !visible || !m_proj->
onScreen(pos) ) 
return false;
 
  809     drawLine ( QPoint( pos.x () - 2.0, pos.y() ), QPoint( pos.x() + 2.0, pos.y() ) );
 
  810     drawLine ( QPoint( pos.x (), pos.y() - 2.0 ), QPoint( pos.x(), pos.y() + 2.0 ) );
 
static void initStarImages()
Recalculates the star pixmaps. 
 
int size()
Return the numbers of flags. 
 
virtual void drawSkyBackground()
Draw the sky background. 
 
virtual bool drawPointSource(SkyPoint *loc, float mag, char sp= 'A')
Draw a point source (e.g., a star). 
 
bool onScreen(const QPointF &p) const 
Check whether the projected point is on-screen. 
 
virtual QVector< Vector2f > groundPoly(SkyPoint *labelpoint=0, bool *drawLabel=0) const 
Get the ground polygon. 
 
QVector< SkyPoint * > SkyList
 
KStarsData is the backbone of KStars. 
 
virtual void drawObservingList(const QList< SkyObject * > &obs)
Draw the symbols for the observing list. 
 
ColorScheme * colorScheme()
 
QPointF vecToPoint(const Vector2f &vec)
Convert a vector to a point. 
 
static KStarsData * Instance()
 
virtual bool drawDeepSkyObject(DeepSkyObject *obj, bool drawImage=false)
Draw a deep sky object. 
 
QColor colorNamed(const QString &name) const 
Retrieve a color by name. 
 
virtual void setBrush(const QBrush &brush)
Set the brush of the painter. 
 
virtual void drawSkyLine(SkyPoint *a, SkyPoint *b)
Draw a line between points in the sky. 
 
virtual bool drawSupernova(Supernova *sup)
Draw a Supernova. 
 
virtual void begin()
Begin painting. 
 
bool checkVisibility(SkyPoint *p) const 
Determine if the skypoint p is likely to be visible in the display window. 
 
static bool showSatellitesLabels()
Get Draw satellite labels? 
 
SatellitesComponent * satellites()
 
double findPA(SkyObject *o, float x, float y) const 
Determine the on-screen position angle of a SkyObject. 
 
QImage image(int index)
Get image. 
 
The sky coordinates of a point in the sky. 
 
float starWidth(float mag) const 
Get the width of a star of magnitude mag. 
 
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=0) const 
This is exactly the same as toScreenVec but it returns a QPointF. 
 
QString label(int index)
Get label. 
 
static uint starColorIntensity()
Get Saturation level of star colors. 
 
virtual void drawFlags()
Draw flags. 
 
Represents the supernova object. 
 
virtual void drawHorizon(bool filled, SkyPoint *labelPoint=0, bool *drawLabel=0)
 
void HorizontalToEquatorial(const dms *LST, const dms *lat)
Determine the (RA, Dec) coordinates of the SkyPoint from its (Altitude, Azimuth) coordinates, given the local sidereal time and the observer's latitude. 
 
SkyMapComposite * skyComposite()
 
virtual void drawSatellite(Satellite *sat)
Draw a satellite. 
 
QPointF clipLine(SkyPoint *p1, SkyPoint *p2) const 
ASSUMES *p1 did not clip but *p2 did. 
 
virtual void drawSkyPolygon(LineList *list)
Draw a polygon in the sky. 
 
virtual void drawSkyPolyline(LineList *list, SkipList *skipList=0, LineListLabel *label=0)
Draw a polyline in the sky. 
 
QList< SkyPoint * > & pointList()
 
void EquatorialToHorizontal(const dms *LST, const dms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates, given the local sidereal time and the observer's latitude. 
 
const QImage & image() const 
 
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
 
virtual void setPen(const QPen &pen)
Set the pen of the painter. 
 
SkyQPainter(QPaintDevice *pd, const QSize &canvasSize)
Creates a SkyQPainter with the given QPaintDevice and uses the dimensions of the paint device as canv...
 
virtual void drawDeepSkySymbol(const QPointF &pos, int type, float size, float e, float positionAngle)
 
static bool drawSatellitesLikeStars()
Get If selected, satellites will be draw like stars, otherwise, draw satellites as small colored squa...
 
void drawLabel(Satellite *sat, QPointF pos)
Draw label of a satellite. 
 
QColor labelColor(int index)
Get label color. 
 
static double zoomFactor()
Get Zoom Factor, in pixels per radian. 
 
static uint starColorMode()
Get Mode for rendering stars. 
 
Represents an artificial satellites. 
 
A subclass of TrailObject that provides additional information needed for most solar system objects...
 
virtual QString name(void) const 
 
virtual bool drawPlanet(KSPlanetBase *planet)
Draw a planet. 
 
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object. 
 
const Projector * projector() const 
Get the current projector. 
 
Draws things on the sky, without regard to backend. 
 
static bool useAntialias()
Get Use antialiasing when drawing the screen? 
 
static bool showPlanetImages()
Get Draw planets as images in the sky map? 
 
virtual void end()
End and finalize painting. 
 
void updateLabelCandidates(qreal x, qreal y, LineList *lineList, int i)