Kstars
wiview.cpp
73 WI_Location = QCoreApplication::applicationDirPath() + "/../Resources/kstars/tools/whatsinteresting/qml/wiview.qml";
75 WI_Location = KSPaths::locate(QStandardPaths::AppLocalDataLocation, "tools/whatsinteresting/qml/wiview.qml");
77 WI_Location = KSPaths::locate(QStandardPaths::GenericDataLocation, "tools/whatsinteresting/qml/wiview.qml");
79 WI_Location = KSPaths::locate(QStandardPaths::AppLocalDataLocation, "tools/whatsinteresting/qml/wiview.qml");
237 telType = (equip == ObsConditions::Telescope) ? KStars::Instance()->getWIEquipSettings()->getTelType() :
335 KMessageBox::warningContinueCancel(nullptr, "Are you sure you want your telescope to slew to this object?",
354 KSNotification::error(i18n("Mount %1 is offline. Please connect and retry again.", oneDevice->getDeviceName()));
381 DetailDialog *detail = new DetailDialog(so, kstars->data()->lt(), kstars->data()->geo(), kstars);
527 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex + 1) % modelSize);
529 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex - 1 + modelSize) % modelSize);
612 else if (soitem->getType() == SkyObjItem::Planet && soitem->getName() != i18n("Sun") && soitem->getName() != i18n("Moon"))
637 QUrl url("https://en.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=" + name);
664 "\n<p style=text-align:right>Source: (<a href='" + QString("https://en.wikipedia.org/wiki/") + name + "'>" +
665 "Wikipedia</a>)"; //Note the \n is so that the description is put on another line in the file. Doesn't affect the display but allows the source to be loaded in the details but not the list.
675 ";} a {text-decoration: none;color:" + linkColor + ";}</style></HEAD><BODY>" + html + "</BODY></HTML>";
689 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
720 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
739 "</caption>"); //Start looking for the image AFTER the caption. Planets have images in their caption.
773 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
801 QString html = "<BR>Sorry, No Wikipedia article with this object name seems to exist. It is possible that "
832 //This if statement should correct for a situation like for the planets where there is a single internal table inside the infoText Box.
839 //This next section is for the headers in the colored boxes. It turns them black instead of white because they are more visible that way.
845 infoText.replace("//", "http://"); //This is to fix links on wikipedia which are missing http from the url
849 //This section is intended to remove links from the object name header at the top. The links break up the header.
871 infoText.remove(mathLeft, mathRight); //This removes an image that doesn't render properly for some DSOs.
873 infoText.replace("style=\"width:22em\"", "style=\"width:100%;background-color: black;color: white;\"");
874 infoText = infoText + "<BR>(Source: <a href='" + "https://en.wikipedia.org/w/index.php?title=" + name +
879 "</caption>"); //Start looking for the image AFTER the caption. Planets have images in their caption.
889 "https://upload.wikimedia.org"); //Although they will display, the images apparently don't download properly unless they are https.
903 ";} a {text-decoration: none;color:" + linkColor + ";}</style></HEAD><BODY>" + html + "</BODY></HTML>";
914 QDir filePath(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/descriptions");
937 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("image_url.dat"));
973 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("info_url.dat"));
1009 QDir filePath(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/descriptions");
DetailDialog is a window showing detailed information for a selected object.
Definition detaildialog.h:71
Manages models for QML listviews of different types of sky-objects.
Definition modelmanager.h:28
void loadCatalog(const QString &name)
Load objects from the dso db for the catalog with name can be used to retreive the object lists later...
Definition modelmanager.cpp:278
This class deals with the observing conditions of the night sky.
Definition obsconditions.h:22
void setObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType)
Set new observing conditions.
Definition obsconditions.cpp:101
SkyObject * findByName(const QString &name, bool exact=true) override
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument.
Definition skymapcomposite.cpp:563
void setDestination(const SkyPoint &f)
sets the destination point of the sky map.
Definition skymap.cpp:993
void setFocusObject(SkyObject *o)
Set the FocusObject pointer to the argument.
Definition skymap.cpp:371
void setFocusPoint(SkyPoint *f)
set the FocusPoint; the position that is to be the next Destination.
Definition skymap.h:204
QString getSurfaceBrightness() const
Get surface-brightness of sky-object associated with the SkyObjItem as a QString to be displayed on t...
Definition skyobjitem.cpp:189
int getType() const
Get category of sky-object associated with the SkyObjItem as an integer.
Definition skyobjitem.h:99
QString getSummary(bool includeDescription) const
Get Summary Description for the SkyObjItem.
Definition skyobjitem.cpp:175
QString getTypeName() const
Get category of sky-object associated with the SkyObjItem as a QString.
Definition skyobjitem.h:93
QString getName() const
Get name of sky-object associated with the SkyObjItem.
Definition skyobjitem.h:69
QString getSize() const
Get size of sky-object associated with the SkyObjItem as a QString to be displayed on the details-vie...
Definition skyobjitem.cpp:214
float getMagnitude() const
Get magnitude of sky-object associated with the SkyObjItem.
Definition skyobjitem.cpp:261
QString getLongName() const
Get longname of sky-object associated with the SkyObjItem.
Definition skyobjitem.h:87
QString getDescName() const
Get longname of sky-object associated with the SkyObjItem.
Definition skyobjitem.h:75
QString getPosition() const
Get current position of sky-object associated with the SkyObjItem.
Definition skyobjitem.h:105
Represents a model for the list of interesting sky-objects to be displayed in the QML interface.
Definition skyobjlistmodel.h:20
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Overridden method from QAbstractItemModel.
Definition skyobjlistmodel.cpp:38
SkyObjItem * getSkyObjItem(int index)
Get sky-object item referred to by index.
Definition skyobjlistmodel.cpp:60
Provides all necessary information about an object in the sky: its coordinates, name(s),...
Definition skyobject.h:42
QString gname(bool useGreekChars=true) const
Returns the genetive name of the star.
Definition starobject.cpp:559
ObsConditions::TelescopeType getTelType()
Inline method to return telescope type.
Definition wiequipsettings.h:47
void loadDetailsView(SkyObjItem *soitem, int index)
Load details-view for selected sky-object.
Definition wiview.cpp:505
void onReloadIconClicked()
public slot - Reload list of visible sky-objects.
Definition wiview.cpp:393
void onSoListItemClicked(int index)
public slot - Act upon signal emitted when an item is selected from list of sky-objects.
Definition wiview.cpp:282
void onDetailsButtonClicked()
public slot - Open Details Dialog to show more details for current sky-object.
Definition wiview.cpp:374
void onNextObjClicked()
public slot - Show details-view for next sky-object from list of current sky-objects's category.
Definition wiview.cpp:289
void onCenterButtonClicked()
public slot - Slew map to current sky-object in the details view.
Definition wiview.cpp:317
void onCategorySelected(QString model)
public slot - Act upon signal emitted when category of sky-object is selected from category selection...
Definition wiview.cpp:254
WIView(QWidget *parent=nullptr)
Constructor - Store QML components as QObject pointers.
Definition wiview.cpp:40
void onSlewTelescopeButtonClicked()
public slot - Slew map to current sky-object in the details view.
Definition wiview.cpp:332
void onPrevObjClicked()
public slot - Show details-view for previous sky-object from list of current sky-objects's category.
Definition wiview.cpp:303
QString xi18n(const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Type type(const QSqlDatabase &db)
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
QString name(StandardAction id)
KGuiItem cont()
KGuiItem cancel()
QString applicationDirPath()
virtual int exec()
bool exists(const QString &fileName)
bool open(FILE *fh, OpenMode mode, FileHandleFlags handleFlags)
void setFileName(const QString &name)
virtual void close() override
bool loadFromData(QByteArrayView data, const char *format)
bool save(QIODevice *device, const char *format, int quality) const const
QByteArray readAll()
ReadOnly
const_reference at(qsizetype i) const const
void replace(qsizetype i, parameter_type value)
qsizetype size() const const
AcceptRole
QPushButton * addButton(StandardButton button)
QAbstractButton * clickedButton() const const
virtual int exec() override
void setDefaultButton(QPushButton *button)
void setText(const QString &text)
NoError
virtual void abort()=0
NetworkError error() const const
void finished()
QVariant header(QNetworkRequest::KnownHeaders header) const const
ContentTypeHeader
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void deleteLater()
T findChild(const QString &name, Qt::FindChildOptions options) const const
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
void setContextObject(QObject *object)
void setContextProperty(const QString &name, QObject *value)
SizeRootObjectToView
void setResizeMode(ResizeMode)
QQmlContext * rootContext() const const
QQuickItem * rootObject() const const
void setSource(const QUrl &url)
AppLocalDataLocation
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString mid(qsizetype position, qsizetype n) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString toLower() const const
QString toUpper() const const
QString join(QChar separator) const const
WindowCloseButtonHint
QFuture< T > run(Function function,...)
singleShot
QUrl fromLocalFile(const QString &localFile)
QString url(FormattingOptions options) const const
QString toString() const const
size
visible
void setFlags(Qt::WindowFlags flags)
void show()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.