Stellarium  HEAD
Data Structures | Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties
SearchDialog Class Reference

The sky object search dialog. More...

#include <SearchDialog.hpp>

Public Types

enum  CoordinateSystem {
  equatorialJ2000 , equatorial , horizontal , galactic ,
  supergalactic , ecliptic , eclipticJ2000
}
 Available coordinate systems.
 

Public Slots

void retranslate () override
 
void setVisible (bool v) override
 On the first call with "true" populates the window contents. Also sets focus to entry line.
 
void setSimpleStyle ()
 This style only displays the text search field and the search button.
 
void setCurrentCoordinateSystem (SearchDialog::CoordinateSystem cs)
 Set the current coordinate system.
 
void setCurrentCoordinateSystemKey (QString key)
 Set the current coordinate system from its key.
 
void setRecentSearchSize (int maxSize)
 Called when user wants to change recent search list size.
 
void setCoordinateSystem (int csID)
 
void populateCoordinateSystemsList ()
 
void populateCoordinateAxis ()
 
void populateRecentSearch ()
 
- Public Slots inherited from StelDialog
virtual void styleChanged (const QString &style)
 Apply application style change.
 
virtual void retranslate ()=0
 Retranslate the content of the dialog. More...
 
virtual void setVisible (bool)
 On the first call with "true" populates the window contents.
 
virtual void close ()
 Closes the window (the window widget is not deleted, just not visible).
 
void handleMovedTo (QPoint newPos)
 Adds dialog location to config.ini; should be connected in createDialogContent()
 
virtual void handleDialogSizeChanged (QSizeF size)
 Stores dialog sizes into config.ini; should be connected from the proxy. More...
 

Signals

void simbadUseChanged (bool use)
 
void simbadQueryDistChanged (int dist)
 
void simbadQueryCountChanged (int count)
 
void simbadGetsIdsChanged (bool b)
 
void simbadGetsSpecChanged (bool b)
 
void simbadGetsDistChanged (bool b)
 
void simbadGetsMorphoChanged (bool b)
 
void simbadGetsTypesChanged (bool b)
 
void simbadGetsDimsChanged (bool b)
 
- Signals inherited from StelDialog
void visibleChanged (bool)
 

Public Member Functions

 SearchDialog (QObject *parent)
 
bool eventFilter (QObject *object, QEvent *event) override
 
SearchDialog::CoordinateSystem getCurrentCoordinateSystem () const
 Get the current coordinate system.
 
QString getCurrentCoordinateSystemKey (void) const
 Get the current coordinate system key.
 
int getRecentSearchSize () const
 Returns current max size of recent search list.
 
QStringList listMatchingRecentObjects (const QString &objPrefix, int maxNbItem=20, bool useStartOfWords=false) const
 Find and return the list of at most maxNbItem objects auto-completing the passed object name. More...
 
- Public Member Functions inherited from StelDialog
 StelDialog (const QString &dialogName=QString("Default"), QObject *parent=nullptr)
 
bool visible () const
 Returns true if the dialog contents have been constructed and are currently shown.
 
QString getDialogName () const
 

Static Public Member Functions

static QString substituteGreek (const QString &keyString)
 Replaces all occurrences of substrings describing Greek letters (i.e. More...
 
static QString getGreekLetterByName (const QString &potentialGreekLetterName)
 Returns the Greek unicode character for the specified letter string (i.e. "alpha", "beta", ...)
 

Static Public Attributes

static const char * DEF_SIMBAD_URL
 URL of the default SIMBAD server (Strasbourg).
 
static QString extSearchText
 

Protected Member Functions

void createDialogContent () override
 Initialize the dialog widgets and connect the signals/slots.
 

Protected Attributes

Ui_searchDialogForm * ui
 
- Protected Attributes inherited from StelDialog
QWidget * dialog
 The main dialog.
 
class CustomProxyproxy
 
QString dialogName
 The name should be set in derived classes' constructors and can be used to store and retrieve the panel locations.
 
QList< QWidget * > kineticScrollingList
 A list of widgets where kinetic scrolling can be activated or deactivated The list must be filled once, in the constructor or init() of fillDialog() etc. More...
 

Properties

bool useSimbad
 
int simbadDist
 Properties for SIMBAD position query. More...
 
int simbadCount
 At max, retrieve so many results.
 
bool simbadGetIds
 get all IDs for object
 
bool simbadGetSpec
 get spectral data
 
bool simbadGetMorpho
 get morphological description
 
bool simbadGetTypes
 get object types
 
bool simbadGetDims
 get dimensions
 
- Properties inherited from StelDialog
bool visible
 

Additional Inherited Members

- Protected Slots inherited from StelDialog
bool askConfirmation (const QString &message=q_("Are you sure? This will delete your customized data."))
 
void messageBox (const QString &title, const QString &message)
 
void enableKineticScrolling (bool b)
 enable kinetic scrolling. This should be connected to StelApp's StelGui signal flagUseKineticScrollingChanged.
 
void handleFontChanged ()
 connect from StelApp to handle font and font size changes.
 
void handleColorSchemeChanged ()
 connect from StelApp to handle CSS style changes
 
virtual void updateNightModeProperty (bool n)
 
- Static Protected Member Functions inherited from StelDialog
static void connectCheckBox (QAbstractButton *checkBox, const QString &actionName)
 Helper function to connect a checkbox to the StelAction with the specified name.
 
static void connectCheckBox (QAbstractButton *checkBox, StelAction *action)
 Helper function to connect a checkbox to the given StelAction.
 
static void connectIntProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to an integer StelProperty. More...
 
static void connectIntProperty (QSpinBox *spinBox, const QString &propName)
 Helper function to connect a QSpinBox to an integer StelProperty. More...
 
static void connectIntProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to an integer StelProperty. More...
 
static void connectIntProperty (QSlider *slider, const QString &propName, int minValue, int maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectDoubleProperty (QDoubleSpinBox *spinBox, const QString &propName)
 Helper function to connect a QDoubleSpinBox to an double or float StelProperty. More...
 
static void connectDoubleProperty (AngleSpinBox *spinBox, const QString &propName)
 Helper function to connect an AngleSpinBox to a double or float StelProperty representing decimal degrees. More...
 
static void connectDoubleProperty (QSlider *slider, const QString &propName, double minValue, double maxValue)
 Helper function to connect a QSlider to an double or float StelProperty. More...
 
static void connectStringProperty (QComboBox *comboBox, const QString &propName)
 Helper function to connect a QComboBox to a QString StelProperty. More...
 
static void connectStringProperty (QLineEdit *lineEdit, const QString &propName)
 Helper function to connect a QLineEdit to a QString StelProperty. More...
 
static void connectBoolProperty (QAbstractButton *checkBox, const QString &propName)
 Helper function to connect a checkbox to a bool StelProperty. More...
 
static void connectBoolProperty (QGroupBox *checkBox, const QString &propName)
 Helper function to connect a groupbox to a bool StelProperty. More...
 

Detailed Description

The sky object search dialog.

Member Function Documentation

◆ listMatchingRecentObjects()

QStringList SearchDialog::listMatchingRecentObjects ( const QString &  objPrefix,
int  maxNbItem = 20,
bool  useStartOfWords = false 
) const

Find and return the list of at most maxNbItem objects auto-completing the passed object name.

Parameters
maxNbItemthe maximum number of returned object names.
useStartOfWordsthe autofill mode for returned objects names
Returns
a list of matching object names by order of recent searches, or an empty list if nothing match

◆ substituteGreek()

static QString SearchDialog::substituteGreek ( const QString &  keyString)
static

Replaces all occurrences of substrings describing Greek letters (i.e.

"alpha", "beta", ...) with the actual Greek unicode characters.

Property Documentation

◆ simbadDist

int SearchDialog::simbadDist
readwrite

Properties for SIMBAD position query.

Distance from queried coordinates