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

Since V0.21.2, this class manages the ObservingLists, successor of the Bookmarks feature available since 0.15. More...

#include <ObsListDialog.hpp>

Data Structures

struct  observingListItem
 

Public Types

enum  ObsListColumns {
  ColumnUUID , ColumnDesignation , ColumnNameI18n , ColumnType ,
  ColumnRa , ColumnDec , ColumnMagnitude , ColumnConstellation ,
  ColumnDate , ColumnLocation , ColumnLandscapeID , ColumnCount
}
 

Public Slots

void retranslate () override
 
bool getFlagUseJD ()
 
bool getFlagUseLandscape ()
 
bool getFlagUseLocation ()
 
bool getFlagUseFov ()
 
void setFlagUseJD (bool b)
 
void setFlagUseLandscape (bool b)
 
void setFlagUseLocation (bool b)
 
void setFlagUseFov (bool b)
 
- 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 flagUseJDChanged (bool b)
 
void flagUseLandscapeChanged (bool b)
 
void flagUseLocationChanged (bool b)
 
void flagUseFovChanged (bool b)
 
- Signals inherited from StelDialog
void visibleChanged (bool)
 

Public Member Functions

 ObsListDialog (QObject *parent)
 
- 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
 

Protected Member Functions

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

Protected Attributes

Ui_obsListDialogForm * 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 flagUseJD
 Property. Store/retrieve date.
 
bool flagUseLandscape
 Property. Store/retrieve landscape.
 
bool flagUseLocation
 Property. Store/retrieve location.
 
bool flagUseFov
 Property. Store/retrieve field of view.
 
- 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

Since V0.21.2, this class manages the ObservingLists, successor of the Bookmarks feature available since 0.15.

Note
The old Bookmarks.json format should now be seen as deprecated. Updated in Version 1.0: ObservingLists Version 2.0 Updated in Version 23.1: ObservingLists Version 2.1

This tool manages Observing Lists based on a unique list identifier, the OLUD = Observing List Unique Designation Old bookmarks.json files are auto-imported at first run. The old file is then not touched any further and could still be used in older versions of Stellarium. This first bookmarks list is then the first stored ObservingList. You can create new lists, edit them, delete them, import/export them and exchange with other users etc. You can also highlight all bookmarked objects of the active list

When creating an entry for a selected object, you can optionally store current time, location, landscapeID and field of view. This helps to retrieve the possible same view if location and/or time matter, e.g. for a list of Solar eclipses with their locations and landscapes. Obviously, a list of favourite DSOs would not need those data (but maybe FoV is still meaningful). On retrieval, the same optional elements can again be selected, so you can retrieve an object without stored time or location, if that is meaningful. If location or landscape IDs cannot be found, they are not changed.

An observingList.json looks like this: { "defaultListOlud": "{6d297068-a644-4d1b-9d2d-9c2dd64eef53}", "observingLists": { "{84744f7b-c353-45b0-8394-69af2a1e0917}": { // List OLUD. This is a unique ID "creation date": "2022-09-29 20:05:07", "last edit": "2022-11-29 22:15:38", "description": "Bookmarks of previous Stellarium version.", "name": "bookmarks list", "objects": [ // List is stored alphabetized, but given here in contextualized order for clarity. { "designation": "HIP 57632", // Catalog name. Object should be found by one of StelObjectModuleSubclasses->getStelObjectType(designation, type) "type": "Star" // Object type code (actually its class name in Stellarium) given by StelObjectModuleSubclasses->getStelObjectType() or StelObject->getType() "objtype" : "binary, pulsating variable" // More extensive description, localized. This will be re-read on program start to ensure current language. "name": "Denebola", // Primary English name of the object. This will be re-read on program start to ensure current language. "nameI18n": "Denebola", // Translated name at time of addition to the list. Added for reference when using the exported list elsewhere. The name is retranslated in Stellarium after loading because user language may have changed. "ra": "11h49m05.0s", // Optional. Right Ascension in J2000.0 frame. Good if moving object is stored. If empty, current coordinates will be added on loading. "dec": "+14°34'15\"", // Optional. Declination in J2000.0 frame. Good if moving object is stored. If empty, current coordinates will be added on loading. "constellation": "Leo", // Optional. Good if moving object is stored. "magnitude": "2.10", // Optional. Good if moving object is stored. "fov": 0, // Optional. Good if event is stored. "jd": 0, // Optional. Good if event is stored. "landscapeID": "", // Optional. Good if event is stored. "location": "", // Optional. Good if event is stored. "isVisibleMarker": false, // UNKNOWN PURPOSE or NO PROPER IMPLEMENTATION OF WHATEVER THIS SHOULD DO }, ... <other objects> ], "sorting": "" }, // end of list 84744f7b-... "{bd40274c-a321-40c1-a6f3-bc8f11026326}": { // List OLUD of next list. "creation date": "2022-12-21 11:12:39", "last edit": "2023-07-29 22:23:38", "description": "test of unification", "name": "mine_edited", "objects": [ { "constellation": "Cyg", "dec": "+45°16'59\"", "designation": "HIP 102098", "fov": 0, "isVisibleMarker": true, "jd": 0, "landscapeID": "", "location": "", "magnitude": "1.25", "name": "Deneb", // Used to be nameI18n, but this is a bad idea for list exchange! "ra": "20h41m24.4s", "type": "Star" "objType": "double star, pulsating variable star" }, ... <other objects> ], "sorting": "" }, ... <other observingLists> }, "shortName": "Observing list for Stellarium", "version": "2.0" }

Updated for 23.1: Integrated functions of extra edit dialog, deep refactoring. You cannot delete the default list. Choose another list as default before deleting the displayed one. You cannot delete the last list. Importing a JSON file with observingLists will import all lists and unconditionally overwrite existing lists with the same OLUD. Exporting writes an observingList file with only the currently displayed list.

Fix a confusion introduced in the 1.* series: The ObsList has entries

Member Enumeration Documentation

◆ ObsListColumns

Enumerator
ColumnDesignation 

UUID of object.

ColumnNameI18n 

English name or catalog designation of object.

ColumnType 

Localized name/nickname of object.

ColumnRa 

Localized detailed Type of the object.

ColumnDec 

Right ascension of the object.

ColumnMagnitude 

Declination of the object.

ColumnConstellation 

Magnitude of the object.

ColumnDate 

Constellation in which the object is located.

ColumnLocation 

Date.

ColumnLandscapeID 

Location where the object is observed.

ColumnCount 

LandscapeID linked to object observation.

Total number of columns