|
|
@ -283,7 +283,7 @@ void SkyMap::drawMilkyWay( TQPainter& psky, double scale )
|
|
|
|
psky.setBrush( TQBrush( TQColor( data->colorScheme()->colorNamed( "MWColor" ) ) ) );
|
|
|
|
psky.setBrush( TQBrush( TQColor( data->colorScheme()->colorNamed( "MWColor" ) ) ) );
|
|
|
|
bool offscreen, lastoffscreen=false;
|
|
|
|
bool offscreen, lastoffscreen=false;
|
|
|
|
|
|
|
|
|
|
|
|
for ( register unsigned int j=0; j<11; ++j ) {
|
|
|
|
for ( unsigned int j=0; j<11; ++j ) {
|
|
|
|
if ( Options::fillMilkyWay() ) {
|
|
|
|
if ( Options::fillMilkyWay() ) {
|
|
|
|
ptsCount = 0;
|
|
|
|
ptsCount = 0;
|
|
|
|
bool partVisible = false;
|
|
|
|
bool partVisible = false;
|
|
|
@ -308,7 +308,7 @@ void SkyMap::drawMilkyWay( TQPainter& psky, double scale )
|
|
|
|
|
|
|
|
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
|
|
|
|
|
|
|
|
for ( register unsigned int i=1; i<data->MilkyWay[j].count(); ++i ) {
|
|
|
|
for ( unsigned int i=1; i<data->MilkyWay[j].count(); ++i ) {
|
|
|
|
o = getXY( data->MilkyWay[j].at(i), Options::useAltAz(), Options::useRefraction(), scale );
|
|
|
|
o = getXY( data->MilkyWay[j].at(i), Options::useAltAz(), Options::useRefraction(), scale );
|
|
|
|
if (o.x()==-10000000 && o.y()==-10000000) offscreen = true;
|
|
|
|
if (o.x()==-10000000 && o.y()==-10000000) offscreen = true;
|
|
|
|
else offscreen = false;
|
|
|
|
else offscreen = false;
|
|
|
@ -335,7 +335,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale )
|
|
|
|
psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "GridColor" ) ), 1, DotLine ) ); //change to GridColor
|
|
|
|
psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "GridColor" ) ), 1, DotLine ) ); //change to GridColor
|
|
|
|
|
|
|
|
|
|
|
|
//First, the parallels
|
|
|
|
//First, the parallels
|
|
|
|
for ( register double Dec=-80.; Dec<=80.; Dec += 20. ) {
|
|
|
|
for ( double Dec=-80.; Dec<=80.; Dec += 20. ) {
|
|
|
|
bool newlyVisible = false;
|
|
|
|
bool newlyVisible = false;
|
|
|
|
sp->set( 0.0, Dec );
|
|
|
|
sp->set( 0.0, Dec );
|
|
|
|
if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
@ -345,7 +345,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale )
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
|
|
|
|
|
|
|
|
double dRA = 1./5.; //120 points along full circle of RA
|
|
|
|
double dRA = 1./5.; //120 points along full circle of RA
|
|
|
|
for ( register double RA=dRA; RA<24.; RA+=dRA ) {
|
|
|
|
for ( double RA=dRA; RA<24.; RA+=dRA ) {
|
|
|
|
sp->set( RA, Dec );
|
|
|
|
sp->set( RA, Dec );
|
|
|
|
if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
|
|
|
|
|
|
|
@ -382,7 +382,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//next, the meridians
|
|
|
|
//next, the meridians
|
|
|
|
for ( register double RA=0.; RA<24.; RA += 2. ) {
|
|
|
|
for ( double RA=0.; RA<24.; RA += 2. ) {
|
|
|
|
bool newlyVisible = false;
|
|
|
|
bool newlyVisible = false;
|
|
|
|
SkyPoint *sp1 = new SkyPoint( RA, -90. );
|
|
|
|
SkyPoint *sp1 = new SkyPoint( RA, -90. );
|
|
|
|
if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
@ -391,7 +391,7 @@ void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale )
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
psky.moveTo( o.x(), o.y() );
|
|
|
|
|
|
|
|
|
|
|
|
double dDec = 1.;
|
|
|
|
double dDec = 1.;
|
|
|
|
for ( register double Dec=-89.; Dec<=90.; Dec+=dDec ) {
|
|
|
|
for ( double Dec=-89.; Dec<=90.; Dec+=dDec ) {
|
|
|
|
sp1->set( RA, Dec );
|
|
|
|
sp1->set( RA, Dec );
|
|
|
|
if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() );
|
|
|
|
|
|
|
|
|
|
|
@ -763,7 +763,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale )
|
|
|
|
//Use the TQPtrList of points to pre-sort visible horizon points
|
|
|
|
//Use the TQPtrList of points to pre-sort visible horizon points
|
|
|
|
if ( o.x() > -100 && o.x() < Width + 100 && o.y() > -100 && o.y() < Height + 100 ) {
|
|
|
|
if ( o.x() > -100 && o.x() < Width + 100 && o.y() > -100 && o.y() < Height + 100 ) {
|
|
|
|
if ( Options::useAltAz() ) {
|
|
|
|
if ( Options::useAltAz() ) {
|
|
|
|
register unsigned int j;
|
|
|
|
unsigned int j;
|
|
|
|
for ( j=0; j<points.count(); ++j ) {
|
|
|
|
for ( j=0; j<points.count(); ++j ) {
|
|
|
|
if ( o.x() < points.at(j)->x() ) {
|
|
|
|
if ( o.x() < points.at(j)->x() ) {
|
|
|
|
found = true;
|
|
|
|
found = true;
|
|
|
@ -842,7 +842,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale )
|
|
|
|
pts->setPoint( 0, points.at(0)->x(), points.at(0)->y() );
|
|
|
|
pts->setPoint( 0, points.at(0)->x(), points.at(0)->y() );
|
|
|
|
if ( Options::showHorizon() ) psky.moveTo( points.at(0)->x(), points.at(0)->y() );
|
|
|
|
if ( Options::showHorizon() ) psky.moveTo( points.at(0)->x(), points.at(0)->y() );
|
|
|
|
|
|
|
|
|
|
|
|
for ( register unsigned int i=1; i<points.count(); ++i ) {
|
|
|
|
for ( unsigned int i=1; i<points.count(); ++i ) {
|
|
|
|
pts->setPoint( i, points.at(i)->x(), points.at(i)->y() );
|
|
|
|
pts->setPoint( i, points.at(i)->x(), points.at(i)->y() );
|
|
|
|
|
|
|
|
|
|
|
|
if ( Options::showHorizon() ) {
|
|
|
|
if ( Options::showHorizon() ) {
|
|
|
@ -908,7 +908,7 @@ void SkyMap::drawHorizon( TQPainter& psky, double scale )
|
|
|
|
psky.drawPolygon( ( const TQPointArray ) *pts, false, 0, ptsCount );
|
|
|
|
psky.drawPolygon( ( const TQPointArray ) *pts, false, 0, ptsCount );
|
|
|
|
|
|
|
|
|
|
|
|
//remove all items in points list
|
|
|
|
//remove all items in points list
|
|
|
|
for ( register unsigned int i=0; i<points.count(); ++i ) {
|
|
|
|
for ( unsigned int i=0; i<points.count(); ++i ) {
|
|
|
|
points.remove(i);
|
|
|
|
points.remove(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1364,7 +1364,7 @@ void SkyMap::drawDeepSkyObjects( TQPainter& psky, double scale )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//Draw Custom Catalogs
|
|
|
|
//Draw Custom Catalogs
|
|
|
|
for ( register unsigned int i=0; i<data->CustomCatalogs.count(); ++i ) {
|
|
|
|
for ( unsigned int i=0; i<data->CustomCatalogs.count(); ++i ) {
|
|
|
|
if ( Options::showCatalog()[i] ) {
|
|
|
|
if ( Options::showCatalog()[i] ) {
|
|
|
|
TQPtrList<SkyObject> cat = data->CustomCatalogs.at(i)->objList();
|
|
|
|
TQPtrList<SkyObject> cat = data->CustomCatalogs.at(i)->objList();
|
|
|
|
|
|
|
|
|
|
|
|