Add obj type in search result and indicating SIMBAD result#4635
Add obj type in search result and indicating SIMBAD result#4635alex-w merged 6 commits intoStellarium:masterfrom
Conversation
|
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
|
I’m not sure - should be object type translatable in list of matches (in a DisplayRole list)? P.S. Of course, user can find objects by their designation, English name or localized name |
I see answer from SIMBAD only and I should ask - where is locally item? |
What I meant is Kepler-451 is Gaia DR3 2080063931448749824 (Gaia ID retrieved from SIMBAD). So searching Kepler-451 will get you to Gaia DR3 2080063931448749824 which has proper motion, distance, etc. in Stellarium. As opposed to searching Kepler-452b which will point to a custom object. |
| class SimbadSearcher* simbadSearcher; | ||
| class SimbadLookupReply* simbadReply; | ||
| QMap<QString, Vec3d> simbadResults; //! Simbad object name and J2000.0 coordinates | ||
| QMap<QString, QString> simbadObjectTypes; //! Simbad object name and object type |
There was a problem hiding this comment.
Why does this have to be kept as a data member? The only time it's used is when it's just been written, never re-used anywhere else.
There was a problem hiding this comment.
simbadObjectTypes is used in onSimbadStatusChanged() and gotoObject() now (after you made the review).
|
If SIMBAD object types is a stable list, it may make sense to declare all of them with |
It's not very stable, but yes, it has a low temp of changes and we can add all these items as data for translations (to use in |
|
I fear the feature for recent objects should be updated too to avoid troubles of search the synonyms - at the moment it storing the list of names only. |
|
Hello @henrysky! Thank you for the suggested improvement. |
- SIMBAD object types are translatable now - added few SIMBAD object types with context
|
@henrysky SIMBAD object types are translatable now (the taxonomy is not completed yet) |
What are the obstacles? The following should complete the list, according to the diff --git a/src/translations.h b/src/translations.h
index 54dd07e16e..7b178b2909 100644
--- a/src/translations.h
+++ b/src/translations.h
@@ -634,6 +634,72 @@ class Translations
NC_("LBV=Luminous Blue Variable", "SIMBAD object type");
NC_("Neutron Star", "SIMBAD object type");
NC_("Pulsar", "SIMBAD object type");
+ NC_("Young Stellar Object", "SIMBAD object type");
+ NC_("Orion Variable", "SIMBAD object type");
+ NC_("T Tauri Star", "SIMBAD object type");
+ NC_("Herbig Ae/Be Star", "SIMBAD object type");
+ NC_("Outflow", "SIMBAD object type");
+ NC_("Herbig-Haro Object", "SIMBAD object type");
+ NC_("Main Sequence Star", "SIMBAD object type");
+ NC_("Be Star", "SIMBAD object type");
+ NC_("Blue Straggler", "SIMBAD object type");
+ NC_("SX Phe Variable", "SIMBAD object type");
+ NC_("gamma Dor Variable", "SIMBAD object type");
+ NC_("delta Sct Variable", "SIMBAD object type");
+ NC_("Evolved Star", "SIMBAD object type");
+ NC_("Red Giant Branch star", "SIMBAD object type");
+ NC_("Hot Subdwarf", "SIMBAD object type");
+ NC_("Horizontal Branch Star", "SIMBAD object type");
+ NC_("RR Lyrae Variable", "SIMBAD object type");
+ NC_("Red Clump Star", "SIMBAD object type");
+ NC_("Type II Cepheid Variable", "SIMBAD object type");
+ NC_("Cepheid Variable", "SIMBAD object type");
+ NC_("Classical Cepheid Variable", "SIMBAD object type");
+ NC_("Carbon Star", "SIMBAD object type");
+ NC_("S Star", "SIMBAD object type");
+ NC_("Long-Period Variable", "SIMBAD object type");
+ NC_("Asymptotic Giant Branch Star", "SIMBAD object type");
+ NC_("Mira Variable", "SIMBAD object type");
+ NC_("O-rich AGB Star", "SIMBAD object type");
+ NC_("OH/IR Star", "SIMBAD object type");
+ NC_("Post-AGB Star", "SIMBAD object type");
+ NC_("RV Tauri Variable", "SIMBAD object type");
+ NC_("Planetary Nebula", "SIMBAD object type");
+ NC_("White Dwarf", "SIMBAD object type");
+ NC_("ELMWD=Extremely Low Mass White Dwarf", "SIMBAD object type");
+ NC_("Chemically Peculiar Star", "SIMBAD object type");
+ NC_("alpha2 CVn Variable", "SIMBAD object type");
+ NC_("R CrB Variable", "SIMBAD object type");
+ NC_("CH Star", "SIMBAD object type");
+ NC_("Barium Star", "SIMBAD object type");
+ NC_("Dwarf Carbon Star", "SIMBAD object type");
+ NC_("Carbon-Enhanced Metal Poor Star", "SIMBAD object type");
+ NC_("Double or Multiple Star", "SIMBAD object type");
+ NC_("Eclipsing Binary", "SIMBAD object type");
+ NC_("Ellipsoidal Variable", "SIMBAD object type");
+ NC_("Spectroscopic Binary", "SIMBAD object type");
+ NC_("RS CVn Variable", "SIMBAD object type");
+ NC_("BY Dra Variable", "SIMBAD object type");
+ NC_("Symbiotic Star", "SIMBAD object type");
+ NC_("X-ray Binary", "SIMBAD object type");
+ NC_("Low Mass X-ray Binary", "SIMBAD object type");
+ NC_("High Mass X-ray Binary", "SIMBAD object type");
+ NC_("Cataclysmic Binary", "SIMBAD object type");
+ NC_("Classical Nova", "SIMBAD object type");
+ NC_("SuperNova", "SIMBAD object type");
+ NC_("Low-mass Star", "SIMBAD object type");
+ NC_("Brown Dwarf", "SIMBAD object type");
+ NC_("Extra-solar Planet", "SIMBAD object type");
+ NC_("Variable Star", "SIMBAD object type");
+ NC_("Irregular Variable", "SIMBAD object type");
+ NC_("Irregular Variable with rapid variations", "SIMBAD object type");
+ NC_("Eruptive Variable", "SIMBAD object type");
+ NC_("Rotating Variable", "SIMBAD object type");
+ NC_("Pulsating Variable", "SIMBAD object type");
+ NC_("Star showing Eclipses by its Planet", "SIMBAD object type");
+ NC_("Emission-line Star", "SIMBAD object type");
+ NC_("High Proper Motion Star", "SIMBAD object type");
+ NC_("High Velocity Star", "SIMBAD object type");
NC_("Cluster of Stars", "SIMBAD object type");
NC_("Globular Cluster", "SIMBAD object type");
NC_("Open Cluster", "SIMBAD object type");
@@ -671,6 +737,11 @@ class Translations
NC_("Quasar", "SIMBAD object type");
NC_("Blazar", "SIMBAD object type");
NC_("BL Lac", "SIMBAD object type");
+ NC_("ULIRG, Ultra Luminous Infrared Galaxy", "SIMBAD object type");
+ NC_("Galaxy in Pair of Galaxies", "SIMBAD object type");
+ NC_("Galaxy towards a Group of Galaxies", "SIMBAD object type");
+ NC_("Galaxy towards a Cluster of Galaxies", "SIMBAD object type");
+ NC_("Brightest Galaxy in a Cluster (BCG)", "SIMBAD object type");
NC_("Interacting Galaxies", "SIMBAD object type");
NC_("Pair of Galaxies", "SIMBAD object type");
NC_("Group of Galaxies", "SIMBAD object type");
@@ -680,12 +751,42 @@ class Translations
NC_("Supercluster of Galaxies", "SIMBAD object type");
NC_("Underdense Region of the Universe", "SIMBAD object type");
NC_("Gravitational Source", "SIMBAD object type");
+ NC_("(Micro)Lensing Event", "SIMBAD object type");
+ NC_("Gravitational Lens System (lens+images)", "SIMBAD object type");
NC_("Gravitational Lens", "SIMBAD object type");
+ NC_("Gravitationally Lensed Image", "SIMBAD object type");
+ NC_("Gravitationally Lensed Image of a Galaxy", "SIMBAD object type");
+ NC_("Gravitationally Lensed Image of a Quasar", "SIMBAD object type");
NC_("Black Hole", "SIMBAD object type");
- NC_("Gamma-ray Source", "SIMBAD object type");
- NC_("X-ray Source ", "SIMBAD object type");
- NC_("UV-emission Source", "SIMBAD object type");
+ NC_("Gravitational Wave Event", "SIMBAD object type");
+ NC_("Transient Event", "SIMBAD object type");
+ NC_("Variable source", "SIMBAD object type");
+ NC_("Radio Source", "SIMBAD object type");
+ NC_("Metric Radio Source", "SIMBAD object type");
+ NC_("Centimetric Radio Source", "SIMBAD object type");
+ NC_("Millimetric Radio Source", "SIMBAD object type");
+ NC_("Sub-Millimetric Source", "SIMBAD object type");
+ NC_("HI (21cm) Source", "SIMBAD object type");
+ NC_("Radio Burst", "SIMBAD object type");
NC_("Maser", "SIMBAD object type");
+ NC_("Infra-Red Source", "SIMBAD object type");
+ NC_("Far-IR source (λ >= 30 µm)", "SIMBAD object type");
+ NC_("Mid-IR Source (3 to 30 µm)", "SIMBAD object type");
+ NC_("Near-IR Source (λ < 3 µm)", "SIMBAD object type");
+ NC_("Optical Source", "SIMBAD object type");
+ NC_("Emission Object", "SIMBAD object type");
+ NC_("Blue Object", "SIMBAD object type");
+ NC_("UV-emission Source", "SIMBAD object type");
+ NC_("X-ray Source", "SIMBAD object type");
+ NC_("Ultra-luminous X-ray Source", "SIMBAD object type");
+ NC_("Gamma-ray Source", "SIMBAD object type");
+ NC_("Gamma-ray Burst", "SIMBAD object type");
+ NC_("Composite Object, Blend", "SIMBAD object type");
+ NC_("Not an Object (Error, Artefact, ...)", "SIMBAD object type");
+ NC_("Part of Cloud", "SIMBAD object type");
+ NC_("Part of a Galaxy", "SIMBAD object type");
+ NC_("Object of Unknown Nature", "SIMBAD object type");
+ NC_("Region defined in the Sky", "SIMBAD object type");
// =====================================================================
// Translatable UI elements with comments for translators (extracomments) |
I'm not sure that all of them are needed.
Good patch, please commit it |
How do I push to this branch? GitHub starts asking for a password when I try... |
Ouch... GH allowing do it to me |
|
I was trying to check what type ULIRGs would have, and discovered that Gaia DR3 6286990861805968384 (AKA IRAS 14348-1447) is shown as a "custom object" in the info panel. Why is it so? |
The type “custom object” is assigned to any object, which found via SIMBAD and not exists in our local databases. But (!) now search tool retrieved object type and we can set correct object type for these objects (at least for actual session). |
|
(Update) Fixed in 1ed8077.
|
|
With this PR, when I type a name into the Search input field, Stellarium hangs for a couple seconds, while without it it's much more responsive (although not smooth either). |
…rong coordinates when re-load
| if (!objType.isEmpty()) | ||
| recentObjectSearchesData.objectTypes[nameI18n] = QString("SIMBAD; %1").arg(qc_(objType, "SIMBAD object type")); | ||
| else | ||
| recentObjectSearchesData.objectTypes[nameI18n] = q_("SIMBAD"); |
|
@henrysky please fix compiling with Qt5 P.S. The solution is acceptable, but I fear in future it will need cosmetic fix for l10n support |
|
Thanks! |
|
Hello @henrysky! Please check the fresh version (development snapshot) of Stellarium: |
|
Hello @henrysky! Please check the latest stable version of Stellarium: |
The Search dialog is currently implemented in a very suboptimal way, especially since #4635, when it started triggering searches by name in its CompletionListModel::data method. The search is supposed to get object type for each item found, which is only a name of the object. What the dialog would really want is to have object pointers in the search results, not simply names. This requires a huge refactoring of the search API in StelObjectModule, so that the object listing methods return the object pointers. This is exactly what this change does. In addition to the pointers the API still returns the names, because it looks like the right names for search results are not always trivial to find out from the object itself. Fixes #4655.
The Search dialog is currently implemented in a very suboptimal way, especially since #4635, when it started triggering searches by name in its CompletionListModel::data method. The search is supposed to get object type for each item found, which is only a name of the object. What the dialog would really want is to have object pointers in the search results, not simply names. This requires a huge refactoring of the search API in StelObjectModule, so that the object listing methods return the object pointers. This is exactly what this change does. In addition to the pointers the API still returns the names, because it looks like the right names for search results are not always trivial to find out from the object itself. Fixes #4655.
The Search dialog is currently implemented in a very suboptimal way, especially since #4635, when it started triggering searches by name in its CompletionListModel::data method. The search is supposed to get object type for each item found, which is only a name of the object. What the dialog would really want is to have object pointers in the search results, not simply names. This requires a huge refactoring of the search API in StelObjectModule, so that the object listing methods return the object pointers. This is exactly what this change does. In addition to the pointers the API still returns the names, because it looks like the right names for search results are not always trivial to find out from the object itself. Fixes #4655.
The Search dialog is currently implemented in a very suboptimal way, especially since #4635, when it started triggering searches by name in its CompletionListModel::data method. The search is supposed to get object type for each item found, which is only a name of the object. What the dialog would really want is to have object pointers in the search results, not simply names. This requires a huge refactoring of the search API in StelObjectModule, so that the object listing methods return the object pointers. This is exactly what this change does. In addition to the pointers the API still returns the names, because it looks like the right names for search results are not always trivial to find out from the object itself. Fixes #4655.



Description
I have
Fixes #4531
Screenshots (if appropriate):
Searching

Hercules:Searching

M31which can be from local or SIMBAD:Searching

Kepler-451which exists locally (with Gaia DR3 ID from SIMBAD):Searching

Kepler-452bwhich does not exist locally:Type of change
How Has This Been Tested?
See above
Test Configuration:
Checklist: