summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-18 09:28:40 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-18 09:28:40 (GMT)
commit67bf490da3e13d8636193c05c527949a90ba2725 (patch)
treeae96fceaa0375f5f2637c1dfc28f2c3392e8a434
parentdbcc3756aba9901b6bbf0b29ef0bd7a5a168fcd2 (diff)
Rename miscObjectComponent to internetResolvedComponent
We may want to have other misc object catalogs for other purposes.
-rw-r--r--kstars/dialogs/finddialog.cpp2
-rw-r--r--kstars/skycomponents/skymapcomposite.cpp14
-rw-r--r--kstars/skycomponents/skymapcomposite.h4
3 files changed, 10 insertions, 10 deletions
diff --git a/kstars/dialogs/finddialog.cpp b/kstars/dialogs/finddialog.cpp
index 0e3fe4c..86f6a4e 100644
--- a/kstars/dialogs/finddialog.cpp
+++ b/kstars/dialogs/finddialog.cpp
@@ -342,7 +342,7 @@ void FindDialog::finishProcessing( SkyObject *selObj, bool resolve ) {
cedata = NameResolver::resolveName( processSearchText() );
DeepSkyObject *dso = 0;
if( ! std::isnan( cedata.ra ) && ! std::isnan( cedata.dec ) ) {
- dso = KStarsData::Instance()->skyComposite()->miscObjectComponent()->addObject( cedata );
+ dso = KStarsData::Instance()->skyComposite()->internetResolvedComponent()->addObject( cedata );
if( dso )
qDebug() << dso->ra0().toHMSString() << ";" << dso->dec0().toDMSString();
selObj = dso;
diff --git a/kstars/skycomponents/skymapcomposite.cpp b/kstars/skycomponents/skymapcomposite.cpp
index 82bf686..af40e80 100644
--- a/kstars/skycomponents/skymapcomposite.cpp
+++ b/kstars/skycomponents/skymapcomposite.cpp
@@ -94,7 +94,7 @@ SkyMapComposite::SkyMapComposite(SkyComposite *parent ) :
addComponent( m_ArtificialHorizon = new ArtificialHorizonComponent(this), 110);
m_internetResolvedCat = "_Internet_Resolved";
- addComponent( m_miscObjectComponent = new SyncedCatalogComponent( this, m_internetResolvedCat, true, 0 ), 6 );
+ addComponent( m_internetResolvedComponent = new SyncedCatalogComponent( this, m_internetResolvedCat, true, 0 ), 6 );
m_CustomCatalogs = new SkyComposite( this );
QStringList allcatalogs = Options::showCatalogNames();
for ( int i=0; i < allcatalogs.size(); ++ i ) {
@@ -149,7 +149,7 @@ void SkyMapComposite::update(KSNumbers *num )
//m_DeepSky->update( data, num );
//9. Custom catalogs
m_CustomCatalogs->update( num );
- m_miscObjectComponent->update( num );
+ m_internetResolvedComponent->update( num );
//10. Stars
//m_Stars->update( data, num );
//m_CLines->update( data, num ); // MUST follow stars.
@@ -260,7 +260,7 @@ void SkyMapComposite::draw( SkyPainter *skyp )
m_DeepSky->draw( skyp );
m_CustomCatalogs->draw( skyp );
- m_miscObjectComponent->draw( skyp );
+ m_internetResolvedComponent->draw( skyp );
m_Stars->draw( skyp );
@@ -372,7 +372,7 @@ SkyObject* SkyMapComposite::objectNearest( SkyPoint *p, double &maxrad ) {
}
rTry = maxrad;
- oTry = m_miscObjectComponent->objectNearest( p, rTry );
+ oTry = m_internetResolvedComponent->objectNearest( p, rTry );
rTry *= 0.5;
if ( rTry < rBest ) {
rBest = rTry;
@@ -475,7 +475,7 @@ SkyObject* SkyMapComposite::findByName( const QString &name ) {
if ( o ) return o;
o = m_CustomCatalogs->findByName( name );
if ( o ) return o;
- o = m_miscObjectComponent->findByName( name );
+ o = m_internetResolvedComponent->findByName( name );
if ( o ) return o;
o = m_CNames->findByName( name );
if ( o ) return o;
@@ -583,6 +583,8 @@ void SkyMapComposite::reloadDeepSky() {
SkyMapDrawAbstract::setDrawLock(true);
delete m_CustomCatalogs;
m_CustomCatalogs = new SkyComposite( this );
+ delete m_internetResolvedComponent;
+ addComponent( m_internetResolvedComponent = new SyncedCatalogComponent( this, m_internetResolvedCat, true, 0 ), 6 );
QStringList allcatalogs = Options::showCatalogNames();
for ( int i=0; i < allcatalogs.size(); ++ i ) {
if( allcatalogs.at(i) == m_internetResolvedCat ) // This is a special catalog
@@ -591,8 +593,6 @@ void SkyMapComposite::reloadDeepSky() {
new CatalogComponent( this, allcatalogs.at(i), false, i ), 5 // FIXME: Should this be 6 or 5? See SkyMapComposite::SkyMapComposite()
);
}
- delete m_miscObjectComponent;
- addComponent( m_miscObjectComponent = new SyncedCatalogComponent( this, m_internetResolvedCat, true, 0 ), 6 );
SkyMapDrawAbstract::setDrawLock(false);
}
diff --git a/kstars/skycomponents/skymapcomposite.h b/kstars/skycomponents/skymapcomposite.h
index 3070af1..a865436 100644
--- a/kstars/skycomponents/skymapcomposite.h
+++ b/kstars/skycomponents/skymapcomposite.h
@@ -174,7 +174,7 @@ public:
SatellitesComponent* satellites();
SupernovaeComponent* supernovaeComponent();
ArtificialHorizonComponent* artificialHorizon();
- inline SyncedCatalogComponent* miscObjectComponent() { return m_miscObjectComponent; }
+ inline SyncedCatalogComponent* internetResolvedComponent() { return m_internetResolvedComponent; }
//Accessors for StarComponent
SkyObject* findStarByGenetiveName( const QString name );
@@ -230,7 +230,7 @@ private:
TargetListComponent *m_StarHopRouteList;
SatellitesComponent *m_Satellites;
SupernovaeComponent *m_Supernovae;
- SyncedCatalogComponent *m_miscObjectComponent;
+ SyncedCatalogComponent *m_internetResolvedComponent;
SkyMesh* m_skyMesh;
SkyLabeler* m_skyLabeler;