1 /* 2 * Stellarium 3 * Copyright (C) 2020 Jocelyn GIROD 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #ifndef OBSERVINGLISTCOMMON_H 21 #define OBSERVINGLISTCOMMON_H 22 23 struct observingListItem { 24 QString name; 25 QString nameI18n; 26 QString type; 27 QString ra; 28 QString dec; 29 QString magnitude; 30 QString constellation; 31 QString jd; 32 QString location; 33 double fov; 34 bool isVisibleMarker; 35 }; 36 Q_DECLARE_METATYPE ( observingListItem ) 37 38 enum ObsListColumns { 39 ColumnUUID, //! UUID of object 40 ColumnName, //! Name or designation of object 41 ColumnNameI18n, //! Localized name of object 42 ColumnType, //! Type of the object 43 ColumnRa, //! Right ascencion of the object 44 ColumnDec, //! Declination of the object 45 ColumnMagnitude, //! Magnitude of the object 46 ColumnConstellation, //! Constellation in which the object is located 47 ColumnJD, //! Date in julian day 48 ColumnLocation, //! Location where the object is observed 49 ColumnCount //! Total number of columns 50 }; 51 52 static constexpr char const * JSON_FILE_NAME = "observingList.json"; 53 static constexpr char const * FILE_VERSION = "1.0"; 54 55 static constexpr char const * KEY_DEFAULT_LIST_UUID = "defaultListUuid"; 56 static constexpr char const * KEY_OBSERVING_LISTS = "observingLists"; 57 static constexpr char const * KEY_NAME = "name"; 58 static constexpr char const * KEY_JD = "jd"; 59 static constexpr char const * KEY_DESCRIPTION = "description"; 60 static constexpr char const * KEY_OBJECTS = "objects"; 61 static constexpr char const * KEY_DESIGNATION = "designation"; 62 static constexpr char const * KEY_SORTING = "sorting"; 63 static constexpr char const * KEY_LOCATION = "location"; 64 static constexpr char const * KEY_VERSION = "version"; 65 static constexpr char const * KEY_SHORT_NAME = "shortName"; 66 67 static constexpr char const * SORTING_BY_NAME = "name"; 68 static constexpr char const * SORTING_BY_TYPE = "type"; 69 static constexpr char const * SORTING_BY_RA = "right ascension"; 70 static constexpr char const * SORTING_BY_DEC = "declination"; 71 static constexpr char const * SORTING_BY_MAGNITUDE = "magnitude"; 72 static constexpr char const * SORTING_BY_CONSTTELLATION = "constellation"; 73 74 75 #endif // OBSLISTDIALOG_H 76