Kstars
observinglist.cpp
68 : QDialog((QWidget *)KStars::Instance()), LogObject(nullptr), m_CurrentObject(nullptr), isModified(false), m_dl(nullptr),
92 QStringList() << i18n("Name") << i18n("Alternate Name") << i18nc("Right Ascension", "RA (J2000)")
96 QStringList() << i18n("Name") << i18n("Alternate Name") << i18nc("Right Ascension", "RA (J2000)")
136 connect(ui->SessionView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
177 .scaled(ui->ImagePreview->width(), ui->ImagePreview->height(), Qt::KeepAspectRatio, Qt::FastTransformation);
210 // qCDebug(KSTARS) << "Updating altitude for " << p.ra().toHMSString() << " " << p.dec().toDMSString() << " alt = " << p.alt().toDMSString() << " info to " << itemText;
262 KSNotification::sorry(i18n("Stars and objects whose names KStars does not know are not supported in the observing lists"));
284 _obj->clone()); // Use a clone in case the original SkyObject is deleted due to change in catalog configuration.
289 KStars::Instance()->statusBar()->showMessage(i18n("%1 is already in the session plan.", finalObjectName), 0);
293 // JM: If we are loading observing list from disk, solar system objects magnitudes are not calculated until later
295 if ((obj->type() == SkyObject::COMET || obj->type() == SkyObject::ASTEROID || obj->type() == SkyObject::MOON ||
306 smag = QString::number(obj->mag(), 'f', 2); // The lower limit to avoid display of unrealistic comet magnitudes
319 // Fill itemlist with items that are common to both wishlist additions and session plan additions
324 keyItem->setData(QVariant::fromValue<void *>(static_cast<void *>(obj.data())), Qt::UserRole + 1);
326 << keyItem // NOTE: The rest of the methods assume that the SkyObject pointer is available in the first column!
345 // - Weight by declination - latitude (in the northern hemisphere, southern objects get higher precedence)
347 SkyPoint p = obj->recomputeHorizontalCoords(KStarsDateTime::currentDateTimeUtc(), geo); // Current => now
352 KStars::Instance()->statusBar()->showMessage(i18n("Added %1 to observing list.", finalObjectName), 0);
382 KStarsData::Instance()->skyComposite()->constellationBoundary()->constellationName(obj.data())))
390 KStars::Instance()->statusBar()->showMessage(i18n("Added %1 to session list.", finalObjectName), 0);
511 getActiveSortModel()->mapSelectionToSource(getActiveView()->selectionModel()->selection()).indexes();
582 QString ImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
590 ImagePreviewHash[o.data()] = QPixmap(ksdi.getFileName()).scaledToHeight(ui->ImagePreview->width());
592 //ui->ImagePreview->setPixmap(QPixmap(ksdi.getFileName()).scaledToHeight(ui->ImagePreview->width()));
621 labelText += ":</b> " + i18nc("%1 magnitude of object, %2 type of sky object (planet, asteroid "
776 i18n("Specify a list of objects with one object on each line to add. The names must be understood to KStars, or if the internet resolver is enabled in settings, to the CDS Sesame resolver. Objects that are internet resolved will be added to the database."),
808 i18np("Batch add: %1 object not found", "Batch add: %1 objects not found", failedObjects.size()),
809 i18np("%1 object could not be found in the database or resolved, and hence could not be added. See the details for more.",
830 // TODO: Think and see if there's a more efficient way to do this. I can't seem to think of any, but this code looks like it could be improved. - Akarsh
833 m_SessionSortModel->mapSelectionToSource(ui->SessionView->selectionModel()->selection()).indexes() :
883 QUrl fileURL = QFileDialog::getOpenFileUrl(KStars::Instance(), i18nc("@title:window", "Open Observing List"), QUrl(),
938 KSNotification::sorry(i18n("The specified file is invalid. We expect an XML file based on the OpenAstronomyLog schema."));
999 if (KMessageBox::questionYesNo(this, message, i18n("Save Current session?"), KStandardGuiItem::save(),
1011 QUrl fileURL = QFileDialog::getSaveFileUrl(KStars::Instance(), i18nc("@title:window", "Save Observing List"), QUrl(),
1028 &fileContents); // We first write to a QString to prevent truncating the file in case there is a crash.
1055 f.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("wishlist.obslist"));
1058 qWarning() << "Cannot save wish list to file!"; // TODO: This should be presented as a message box to the user
1060 i18n("Could not open the observing wishlist file %1 for writing. Your wishlist changes will not be saved. Check if the location is writable and not full.",
1072 f.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("wishlist.obslist"));
1107 i18n("If you cancel this operation, your wishlist will be truncated and the following objects will be removed from the wishlist when you exit KStars. Are you sure this is okay?"),
1149 i18np("Observing wishlist truncated: %1 object not found", "Observing wishlist truncated: %1 objects not found", failedObjects.size()),
1150 i18np("%1 object could not be found in the database, and will be removed from the observing wish list. We recommend that you copy its name as a backup so you can add it later.", "%1 objects could not be found in the database, and will be removed from the observing wish list. We recommend that you copy the detailed list as a backup, whereby you can later use the Batch Add feature in the Observation Planner to add them back using internet search.", failedObjects.size()),
1340 int width = QInputDialog::getInt(this, i18n("Customized DSS Download"), i18n("Specify image width (arcminutes): "),
1352 QInputDialog::getItem(this, i18n("Customized DSS Download"), i18n("Specify version: "), strList, 0, false, &ok);
1354 QUrl srcUrl(KSDssDownloader::getDSSURL(currentObject()->ra0(), currentObject()->dec0(), width, height, "gif",
1375 std::function<void(bool)> slot = std::bind(&ObservingList::downloadReady, this, std::placeholders::_1);
1394 if( QFile( QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(m_currentImageFileName) ).size() > 13000)
1398 ui->ImagePreview->setPixmap(QPixmap(getCurrentImagePath()).scaledToHeight(ui->ImagePreview->width()));
1421 QString currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
1426 currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentThumbImageFileName);
1439 m_currentImageFileName = "Image_J" + RAString.remove(' ').remove( ':' ) + DecString.remove(' ').remove( ':' ); // Note: Changed naming convention to standard 2016-08-25 asimha; old images shall have to be re-downloaded.
1459 QString currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
1465 return QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(m_currentImageFileName);
1518 if (KMessageBox::warningYesNo(nullptr, i18n("This will delete all saved images. Are you sure you want to do this?"),
1616 QPointer<ThumbnailPicker> tp = new ThumbnailPicker(currentObject(), *pm, this, 200, 200, i18n("Image Chooser"));
1647 QFileInfo const f(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(
1685 m_WishListSortModel->mapSelectionToSource(ui->WishListView->selectionModel()->selection()).indexes();
1694 true); // FIXME: Better if there is a QSharedPointer override for this, although the check will ensure that we don't duplicate.
1752 // qCDebug(KSTARS) << "Updating altitudes in observation planner @ JD - J2000 = " << double( now.djd() - J2000 );
1760 m_WishListSortModel->mapToSource(m_WishListSortModel->index(irow, m_WishListSortModel->columnCount() - 1));
a dms subclass that caches its sine and cosine values every time the angle is changed.
Definition cachingdms.h:19
DetailDialog is a window showing detailed information for a selected object.
Definition detaildialog.h:71
static CatalogObject * resolveAndAdd(CatalogsDB::DBManager &db_manager, const QString &query)
Resolves an object using the internet and adds it to the database.
Definition finddialog.cpp:463
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
Lines
BottomAxis
TopAxis
A class that implements methods to find sun rise, sun set, twilight begin / end times,...
Definition ksalmanac.h:27
void startSingleDownload(const QUrl srcUrl, const QString &destFileName, KSDssImage::Metadata &md)
Stateful single-download of a supplied URL.
Definition ksdssdownloader.cpp:218
static QString getDSSURL(const SkyPoint *const p, const QString &version="all", struct KSDssImage::Metadata *md=nullptr)
High-level method to create a URL to obtain a DSS image for a given SkyPoint.
Definition ksdssdownloader.cpp:49
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition kstarsdatetime.h:36
void setDate(const QDate &d)
Assign the Date according to a QDate object.
Definition kstarsdatetime.cpp:144
static KStarsDateTime currentDateTimeUtc()
Definition kstarsdatetime.cpp:82
static KStarsDateTime currentDateTime()
Definition kstarsdatetime.cpp:73
void setTime(const QTime &t)
Assign the Time according to a QTime object.
Definition kstarsdatetime.cpp:161
Dialog for changing the geographic location of the observer.
Definition locationdialog.h:61
void slotUpdateAltitudes()
Recalculate and update the values of the altitude in the wishlist for the current time.
Definition observinglist.cpp:1748
void saveThumbImage()
saves a thumbnail image for the details dialog from the downloaded image
Definition observinglist.cpp:1645
void saveCurrentList()
If the current list has unsaved changes, ask the user about saving it.
Definition observinglist.cpp:990
void slotSaveSessionAs(bool nativeSave=true)
save the current observing session plan to disk, specify filename.
Definition observinglist.cpp:1006
void slotOALExport()
Export a target list to the oal compliant format.
Definition observinglist.cpp:1672
QString getCurrentImagePath()
Returns a path to the current image, or a writable image.
Definition observinglist.cpp:1457
QList< QSharedPointer< SkyObject > > & sessionList()
Definition observinglist.h:89
void setCurrentImage(const SkyObject *o)
Sets the image parameters for the current object o The passed object for setting the parameters.
Definition observinglist.cpp:1411
void slotUpdate()
Updates the tableviews for the new geolocation and date.
Definition observinglist.cpp:1297
QString getObjectName(const SkyObject *o, bool translated=true)
get object name.
Definition observinglist.cpp:1731
void slotSaveAllImages()
Downloads the images of all the objects in the session list Note: This downloads the SDSS image,...
Definition observinglist.cpp:1468
void setSaveImagesButton()
decides on whether to enable the SaveImages button or not
Definition observinglist.cpp:1544
void slotAddObject(const SkyObject *o=nullptr, bool session=false, bool update=false)
add a new object to list o pointer to the object to add to the list session flag toggle adding the ob...
Definition observinglist.cpp:242
void slotGetImage(bool _dss=false, const SkyObject *o=nullptr)
Downloads the corresponding DSS or SDSS image from the web and displays it.
Definition observinglist.cpp:1363
void slotLocation()
Opens the Location dialog to set the GeoLocation for the sessionlist.
Definition observinglist.cpp:1286
void slotRemoveSelectedObjects()
Remove skyobjects which are highlighted in the observing list tool from the observing list.
Definition observinglist.cpp:460
bool contains(const SkyObject *o, bool session=false)
Definition observinglist.h:173
void slotAddToEkosScheduler()
slotAddToEkosScheduler Add object to Ekos scheduler
Definition observinglist.cpp:714
void slotClearList()
slotClearList Remove all objects from current list
Definition observinglist.cpp:958
void slotDeleteAllImages()
Removes all the save DSS/SDSS images from the disk.
Definition observinglist.cpp:1516
void saveImage(QUrl url, QString filename, const SkyObject *o=nullptr)
saves the image synchronously from a given URL into a given file url the url from which the image has...
Definition observinglist.cpp:1490
void slotCustomDSS()
Present the user with options to get the right DSS image for the job.
Definition observinglist.cpp:1331
void selectObject(const SkyObject *o)
make a selection in the session view
Definition observinglist.cpp:1710
SkyObject * findObjectByName(QString name)
return the object with the name as the passed QString from the Session List, return null otherwise
Definition observinglist.cpp:1700
double findAltitude(SkyPoint *p, double hour=0)
Return the altitude of the given SkyObject for the given hour.
Definition observinglist.cpp:1251
void slotSetTime()
Takes the time from the QTimeEdit box and sets it as the time parameter in the tableview of the Sessi...
Definition observinglist.cpp:1323
void slotNewSelection()
Tasks needed when changing the selected object Save the user log of the previous selected object,...
Definition observinglist.cpp:495
void plot(SkyObject *o)
Plot the SkyObject's Altitude vs Time in the AVTPlotWidget.
Definition observinglist.cpp:1218
void slotChangeTab(int index)
toggle the setEnabled flags according to current view set the m_currentItem to nullptr and clear sele...
Definition observinglist.cpp:1263
bool eventFilter(QObject *obj, QEvent *event) override
This is the declaration of the event filter function which is installed on the KImageFilePreview and ...
Definition observinglist.cpp:1555
void slotRemoveObject(const SkyObject *o=nullptr, bool session=false, bool update=false)
Remove skyobject from the observing list.
Definition observinglist.cpp:396
Sort best observation times by reimplementing lessThan() to work on the transit times of objects.
Definition sessionsortfilterproxymodel.h:28
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
SkyPoint recomputeHorizontalCoords(const KStarsDateTime &dt, const GeoLocation *geo) const
Like recomputeCoords, but also calls EquatorialToHorizontal before returning.
Definition skyobject.cpp:329
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo) const
The same iteration technique described in riseSetTime() is used here.
Definition skyobject.cpp:239
void EquatorialToHorizontal(const CachingDms *LST, const CachingDms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates,...
Definition skypoint.cpp:77
What's up tonight dialog is a window which lists all sky objects that will be visible during the next...
Definition wutdialog.h:40
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
KIOCORE_EXPORT CopyJob * move(const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
GeoCoordinates geo(const QVariant &location)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KGuiItem save()
KGuiItem discard()
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
QDate date() const const
Accepted
void accepted()
virtual int exec()
QString filePath(const QString &fileName) const const
QString fileName() const const
QString filePath() const const
bool hasNext() const const
QString next()
MouseButtonRelease
bool exists() const const
bool remove()
QUrl getOpenFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, Options options, const QStringList &supportedSchemes)
QUrl getSaveFileUrl(QWidget *parent, const QString &caption, const QUrl &dir, const QString &filter, QString *selectedFilter, Options options, const QStringList &supportedSchemes)
void clear()
bool contains(const Key &key) const const
iterator insert(const Key &key, const T &value)
bool remove(const Key &key)
T value(const Key &key) const const
Interactive
QIcon fromTheme(const QString &name)
int getInt(QWidget *parent, const QString &title, const QString &label, int value, int min, int max, int step, bool *ok, Qt::WindowFlags flags)
QString getItem(QWidget *parent, const QString &title, const QString &label, const QStringList &items, int current, bool editable, bool *ok, Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
QString getMultiLineText(QWidget *parent, const QString &title, const QString &label, const QString &text, bool *ok, Qt::WindowFlags flags, Qt::InputMethodHints inputMethodHints)
ReadOnly
void append(QList< T > &&value)
void clear()
void removeAt(qsizetype i)
int column() const const
QVariant data(int role) const const
int row() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
objectName
QPixmap scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QPixmap scaledToHeight(int height, Qt::TransformationMode mode) const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QItemSelection mapSelectionToSource(const QItemSelection &proxySelection) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
virtual QVariant data(int role) const const
AppLocalDataLocation
QString arg(Args &&... args) const const
void clear()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString number(double n, char format, int precision)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
KeepAspectRatio
ArrowCursor
StrongFocus
white
UserRole
Key_Delete
RightButton
FastTransformation
WA_LayoutUsesWidgetRect
Tool
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void start()
QUrl fromLocalFile(const QString &localFile)
QString toString() const const
T value() const const
void setCursor(const QCursor &)
void setEnabled(bool)
virtual bool event(QEvent *event) override
height
void hide()
pos
void repaint()
void show()
size
void update()
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.