Kstars
observinglist.cpp
70 : QDialog((QWidget *)KStars::Instance()), LogObject(nullptr), m_CurrentObject(nullptr), isModified(false), m_dl(nullptr),
94 QStringList() << i18n("Name") << i18n("Alternate Name") << i18nc("Right Ascension", "RA (J2000)")
98 QStringList() << i18n("Name") << i18n("Alternate Name") << i18nc("Right Ascension", "RA (J2000)")
138 connect(ui->SessionView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
179 .scaled(ui->ImagePreview->width(), ui->ImagePreview->height(), Qt::KeepAspectRatio, Qt::FastTransformation);
212 // qCDebug(KSTARS) << "Updating altitude for " << p.ra().toHMSString() << " " << p.dec().toDMSString() << " alt = " << p.alt().toDMSString() << " info to " << itemText;
264 KSNotification::sorry(i18n("Stars and objects whose names KStars does not know are not supported in the observing lists"));
286 _obj->clone()); // Use a clone in case the original SkyObject is deleted due to change in catalog configuration.
291 KStars::Instance()->statusBar()->showMessage(i18n("%1 is already in the session plan.", finalObjectName), 0);
295 // JM: If we are loading observing list from disk, solar system objects magnitudes are not calculated until later
297 if ((obj->type() == SkyObject::COMET || obj->type() == SkyObject::ASTEROID || obj->type() == SkyObject::MOON ||
308 smag = QString::number(obj->mag(), 'f', 2); // The lower limit to avoid display of unrealistic comet magnitudes
321 // Fill itemlist with items that are common to both wishlist additions and session plan additions
326 keyItem->setData(QVariant::fromValue<void *>(static_cast<void *>(obj.data())), Qt::UserRole + 1);
328 << keyItem // NOTE: The rest of the methods assume that the SkyObject pointer is available in the first column!
347 // - Weight by declination - latitude (in the northern hemisphere, southern objects get higher precedence)
349 SkyPoint p = obj->recomputeHorizontalCoords(KStarsDateTime::currentDateTimeUtc(), geo); // Current => now
354 KStars::Instance()->statusBar()->showMessage(i18n("Added %1 to observing list.", finalObjectName), 0);
384 KStarsData::Instance()->skyComposite()->constellationBoundary()->constellationName(obj.data())))
392 KStars::Instance()->statusBar()->showMessage(i18n("Added %1 to session list.", finalObjectName), 0);
513 getActiveSortModel()->mapSelectionToSource(getActiveView()->selectionModel()->selection()).indexes();
584 QString ImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
592 ImagePreviewHash[o.data()] = QPixmap(ksdi.getFileName()).scaledToHeight(ui->ImagePreview->width());
594 //ui->ImagePreview->setPixmap(QPixmap(ksdi.getFileName()).scaledToHeight(ui->ImagePreview->width()));
623 labelText += ":</b> " + i18nc("%1 magnitude of object, %2 type of sky object (planet, asteroid "
700 KSNotification::error(i18n("Mount %1 is offline. Please connect and retry again.", oneDevice->getDeviceName()));
778 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."),
810 i18np("Batch add: %1 object not found", "Batch add: %1 objects not found", failedObjects.size()),
811 i18np("%1 object could not be found in the database or resolved, and hence could not be added. See the details for more.",
827 // 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
830 m_SessionSortModel->mapSelectionToSource(ui->SessionView->selectionModel()->selection()).indexes() :
880 QUrl fileURL = QFileDialog::getOpenFileUrl(KStars::Instance(), i18nc("@title:window", "Open Observing List"), QUrl(),
935 KSNotification::sorry(i18n("The specified file is invalid. We expect an XML file based on the OpenAstronomyLog schema."));
962 if (KMessageBox::warningContinueCancel(this, message, i18n("Clear all?")) == KMessageBox::Continue)
996 if (KMessageBox::warningContinueCancel(this, message, i18n("Save Current session?"), KStandardGuiItem::save(),
1008 QUrl fileURL = QFileDialog::getSaveFileUrl(KStars::Instance(), i18nc("@title:window", "Save Observing List"), QUrl(),
1025 &fileContents); // We first write to a QString to prevent truncating the file in case there is a crash.
1052 f.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("wishlist.obslist"));
1055 qWarning() << "Cannot save wish list to file!"; // TODO: This should be presented as a message box to the user
1057 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.",
1069 f.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("wishlist.obslist"));
1104 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?"),
1146 i18np("Observing wishlist truncated: %1 object not found", "Observing wishlist truncated: %1 objects not found", failedObjects.size()),
1147 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()),
1173 if (KMessageBox::warningContinueCancel(nullptr, message, i18n("Could Not Open File"), KGuiItem(i18n("Try Different")),
1337 int width = QInputDialog::getInt(this, i18n("Customized DSS Download"), i18n("Specify image width (arcminutes): "),
1349 QInputDialog::getItem(this, i18n("Customized DSS Download"), i18n("Specify version: "), strList, 0, false, &ok);
1351 QUrl srcUrl(KSDssDownloader::getDSSURL(currentObject()->ra0(), currentObject()->dec0(), width, height, "gif",
1391 if( QFile( QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(m_currentImageFileName) ).size() > 13000)
1395 ui->ImagePreview->setPixmap(QPixmap(getCurrentImagePath()).scaledToHeight(ui->ImagePreview->width()));
1418 QString currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
1423 currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentThumbImageFileName);
1436 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.
1456 QString currentImagePath = KSPaths::locate(QStandardPaths::AppLocalDataLocation, m_currentImageFileName);
1462 return QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(m_currentImageFileName);
1515 if (KMessageBox::warningContinueCancel(nullptr, i18n("This will delete all saved images. Are you sure you want to do this?"),
1613 QPointer<ThumbnailPicker> tp = new ThumbnailPicker(currentObject(), *pm, this, 200, 200, i18n("Image Chooser"));
1644 QFileInfo const f(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath(
1682 m_WishListSortModel->mapSelectionToSource(ui->WishListView->selectionModel()->selection()).indexes();
1691 true); // FIXME: Better if there is a QSharedPointer override for this, although the check will ensure that we don't duplicate.
1749 // qCDebug(KSTARS) << "Updating altitudes in observation planner @ JD - J2000 = " << double( now.djd() - J2000 );
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:464
Contains all relevant information for specifying a location on Earth: City Name, State/Province name,...
Definition geolocation.h:28
void addPoint(const QPointF &p, const QString &label=QString(), double barWidth=0.0)
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
std::pair< bool, QString > updateUserLog(const QString &name, const QString &newLog)
Update the user log of the object with the name to contain newLog (find and replace).
Definition kstarsdata.cpp:1707
const SkyObjectUserdata::Data & getUserData(const QString &name)
Get a reference to the user data of an object with the name name.
Definition kstarsdata.cpp:1771
Extension of QDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day,...
Definition kstarsdatetime.h:36
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:1745
void saveThumbImage()
saves a thumbnail image for the details dialog from the downloaded image
Definition observinglist.cpp:1642
void saveCurrentList()
If the current list has unsaved changes, ask the user about saving it.
Definition observinglist.cpp:987
void slotSaveSessionAs(bool nativeSave=true)
save the current observing session plan to disk, specify filename.
Definition observinglist.cpp:1003
void slotOALExport()
Export a target list to the oal compliant format.
Definition observinglist.cpp:1669
QString getCurrentImagePath()
Returns a path to the current image, or a writable image.
Definition observinglist.cpp:1454
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:1408
void slotUpdate()
Updates the tableviews for the new geolocation and date.
Definition observinglist.cpp:1294
QString getObjectName(const SkyObject *o, bool translated=true)
get object name.
Definition observinglist.cpp:1728
void slotSaveAllImages()
Downloads the images of all the objects in the session list Note: This downloads the SDSS image,...
Definition observinglist.cpp:1465
void setSaveImagesButton()
decides on whether to enable the SaveImages button or not
Definition observinglist.cpp:1541
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:244
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:1360
void slotLocation()
Opens the Location dialog to set the GeoLocation for the sessionlist.
Definition observinglist.cpp:1283
void slotRemoveSelectedObjects()
Remove skyobjects which are highlighted in the observing list tool from the observing list.
Definition observinglist.cpp:462
bool contains(const SkyObject *o, bool session=false)
Definition observinglist.h:173
void slotAddToEkosScheduler()
slotAddToEkosScheduler Add object to Ekos scheduler
Definition observinglist.cpp:716
void slotClearList()
slotClearList Remove all objects from current list
Definition observinglist.cpp:955
void slotDeleteAllImages()
Removes all the save DSS/SDSS images from the disk.
Definition observinglist.cpp:1513
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:1487
void slotCustomDSS()
Present the user with options to get the right DSS image for the job.
Definition observinglist.cpp:1328
void selectObject(const SkyObject *o)
make a selection in the session view
Definition observinglist.cpp:1707
SkyObject * findObjectByName(QString name)
return the object with the name as the passed QString from the Session List, return null otherwise
Definition observinglist.cpp:1697
double findAltitude(SkyPoint *p, double hour=0)
Return the altitude of the given SkyObject for the given hour.
Definition observinglist.cpp:1248
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:1320
void slotNewSelection()
Tasks needed when changing the selected object Save the user log of the previous selected object,...
Definition observinglist.cpp:497
void plot(SkyObject *o)
Plot the SkyObject's Altitude vs Time in the AVTPlotWidget.
Definition observinglist.cpp:1215
void slotChangeTab(int index)
toggle the setEnabled flags according to current view set the m_currentItem to nullptr and clear sele...
Definition observinglist.cpp:1260
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:1552
void slotRemoveObject(const SkyObject *o=nullptr, bool session=false, bool update=false)
Remove skyobject from the observing list.
Definition observinglist.cpp:398
Sort best observation times by reimplementing lessThan() to work on the transit times of objects.
Definition sessionsortfilterproxymodel.h:28
void setClickedPoint(const SkyPoint *f)
Set the ClickedPoint to the skypoint given as an argument.
Definition skymap.cpp:1021
void setClickedObject(SkyObject *o)
Set the ClickedObject pointer to the argument.
Definition skymap.cpp:366
void forceUpdate(bool now=false)
Recalculates the positions of objects in the sky, and then repaints the sky map.
Definition skymap.cpp:1186
SkyObject * clickedObject() const
Retrieve the object nearest to a mouse click event.
Definition skymap.h:244
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
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)
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &title=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Notify)
Continue
Cancel
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KGuiItem save()
KGuiItem discard()
bool removeRow(int row, const QModelIndex &parent)
void addWidget(QWidget *widget, int stretch, Qt::Alignment alignment)
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)
bool save(QIODevice *device, const char *format, int quality) const const
QImage scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
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
QModelIndexList indexes() const const
void append(QList< T > &&value)
void clear()
bool isEmpty() const const
void removeAt(qsizetype i)
qsizetype size() const const
QStatusBar * statusBar() const const
void setDetailedText(const QString &text)
virtual int exec() override
void setDefaultButton(QPushButton *button)
int column() const const
QVariant data(int role) const const
int row() const const
int globalX() const const
int globalY() 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
Qt::MouseButton button() 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
virtual void setData(const QVariant &value, int role)
QString text() const const
QStandardItem * item(int row, int column) const const
virtual int rowCount(const QModelIndex &parent) const const override
AppLocalDataLocation
void showMessage(const QString &message, int timeout)
QString arg(Args &&... args) const const
void clear()
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QChar * data()
bool isEmpty() const const
QString number(double n, char format, int precision)
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString toLower() const const
qsizetype indexOf(const QRegularExpression &re, qsizetype from) const const
QString join(QChar separator) const const
KeepAspectRatio
ArrowCursor
StrongFocus
white
UserRole
Key_Delete
RightButton
FastTransformation
WA_LayoutUsesWidgetRect
Tool
bool atEnd() const const
QString readAll()
QString readLine(qint64 maxlen)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
void start()
QUrl fromLocalFile(const QString &localFile)
bool isValid() const const
QString toLocalFile() const const
QVariant fromValue(T &&value)
QString toString() 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
Structure to hold some DSS image metadata.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:47:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.