20 #ifndef _SEARCHDIALOG_HPP_ 21 #define _SEARCHDIALOG_HPP_ 27 #include "StelDialog.hpp" 28 #include "VecMath.hpp" 31 class Ui_searchDialogForm;
35 bool operator()(
const QString &s1,
const QString &s2)
const 37 return s1.length() < s2.length();
52 QString getSelected(
void);
53 void setValues(
const QStringList&);
54 bool isEmpty()
const {
return values.isEmpty();}
55 void appendValues(
const QStringList&);
60 void selectPrevious();
69 QT_FORWARD_DECLARE_CLASS(QListWidgetItem)
76 Q_ENUMS(CoordinateSystem)
95 bool eventFilter(QObject *
object, QEvent *event);
100 static QString substituteGreek(
const QString& keyString);
102 static QString getGreekLetterByName(
const QString& potentialGreekLetterName);
108 void setSimpleStyle();
113 currentCoordinateSystem = cs;
118 return currentCoordinateSystem;
121 QString getCurrentCoordinateSystemKey(
void)
const;
123 void setCurrentCoordinateSystemKey(QString key);
125 void setCoordinateSystem(
int csID);
126 void populateCoordinateSystemsList();
127 void populateCoordinateAxis();
130 Ui_searchDialogForm* ui;
132 virtual void createDialogContent();
135 void greekLetterClicked();
137 void onSimbadStatusChanged();
139 void onSearchTextChanged(
const QString& text);
142 void gotoObject(
const QString& nameI18n);
144 void gotoObject(QListWidgetItem* item);
146 void searchListChanged(
const QString& newText);
149 void manualPositionChanged();
152 void enableSimbadSearch(
bool enable);
155 void enableStartOfWordsAutofill(
bool enable);
158 void enableLockPosition(
bool enable);
161 void setHasSelectedFlag();
164 void selectSimbadServer(
int index);
167 void updateListWidget(
int index);
170 void updateListTab();
172 void showContextMenu(
const QPoint &pt);
177 class SearchDialogStaticData
181 QHash<QString, QString> greekLetters;
183 SearchDialogStaticData()
185 greekLetters.insert(
"alpha", QString(QChar(0x03B1)));
186 greekLetters.insert(
"beta", QString(QChar(0x03B2)));
187 greekLetters.insert(
"gamma", QString(QChar(0x03B3)));
188 greekLetters.insert(
"delta", QString(QChar(0x03B4)));
189 greekLetters.insert(
"epsilon", QString(QChar(0x03B5)));
191 greekLetters.insert(
"zeta", QString(QChar(0x03B6)));
192 greekLetters.insert(
"eta", QString(QChar(0x03B7)));
193 greekLetters.insert(
"theta", QString(QChar(0x03B8)));
194 greekLetters.insert(
"iota", QString(QChar(0x03B9)));
195 greekLetters.insert(
"kappa", QString(QChar(0x03BA)));
197 greekLetters.insert(
"lambda", QString(QChar(0x03BB)));
198 greekLetters.insert(
"mu", QString(QChar(0x03BC)));
199 greekLetters.insert(
"nu", QString(QChar(0x03BD)));
200 greekLetters.insert(
"xi", QString(QChar(0x03BE)));
201 greekLetters.insert(
"omicron", QString(QChar(0x03BF)));
203 greekLetters.insert(
"pi", QString(QChar(0x03C0)));
204 greekLetters.insert(
"rho", QString(QChar(0x03C1)));
205 greekLetters.insert(
"sigma", QString(QChar(0x03C3)));
206 greekLetters.insert(
"tau", QString(QChar(0x03C4)));
207 greekLetters.insert(
"upsilon", QString(QChar(0x03C5)));
209 greekLetters.insert(
"phi", QString(QChar(0x03C6)));
210 greekLetters.insert(
"chi", QString(QChar(0x03C7)));
211 greekLetters.insert(
"psi", QString(QChar(0x03C8)));
212 greekLetters.insert(
"omega", QString(QChar(0x03C9)));
215 static SearchDialogStaticData staticData;
219 QMap<QString, Vec3d> simbadResults;
221 class QSettings* conf;
224 bool flagHasSelectedText;
226 bool useStartOfWords;
227 bool useLockPosition;
230 QString simbadServerUrl;
231 void populateSimbadServerList();
237 static QString extSearchText;
241 #endif // _SEARCHDIALOG_HPP_ void setCurrentCoordinateSystem(CoordinateSystem cs)
Set the current coordinate system.
static const char * DEF_SIMBAD_URL
URL of the default SIMBAD server (Strasbourg).
Base class for all the GUI windows in Stellarium.
Contains all the information about a current simbad lookup query.
Display a list of results matching the search string, and allow to tab through those selections...
Manage the selection and queries on one or more StelObjects.
CoordinateSystem getCurrentCoordinateSystem() const
Get the current coordinate system.
CoordinateSystem
Available coordinate systems.
The sky object search dialog.
Provides lookup features into the online Simbad service from CDS.