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() :
293 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex + 1) % modelSize);
307 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex - 1 + modelSize) % modelSize);
331 KMessageBox::warningContinueCancel(nullptr, "Are you sure you want your telescope to slew to this object?",
350 KSNotification::error(i18n("Mount %1 is offline. Please connect and retry again.", oneDevice->getDeviceName()));
377 DetailDialog *detail = new DetailDialog(so, kstars->data()->lt(), kstars->data()->geo(), kstars);
523 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex + 1) % modelSize);
525 m_ModManager->returnModel(m_CurrentObjectListName)->getSkyObjItem((m_CurIndex - 1 + modelSize) % modelSize);
550 "<BR><BR>No Wikipedia information. <BR> Please try to download it using the orange download button below.");
608 else if (soitem->getType() == SkyObjItem::Planet && soitem->getName() != i18n("Sun") && soitem->getName() != i18n("Moon"))
633 QUrl url("https://en.wikipedia.org/w/api.php?format=xml&action=query&prop=extracts&exintro&explaintext&redirects=1&titles=" + name);
660 "\n<p style=text-align:right>Source: (<a href='" + QString("https://en.wikipedia.org/wiki/") + name + "'>" +
661 "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.
671 ";} a {text-decoration: none;color:" + linkColor + ";}</style></HEAD><BODY>" + html + "</BODY></HTML>";
685 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
716 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
735 "</caption>"); //Start looking for the image AFTER the caption. Planets have images in their caption.
769 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("descriptions/" + fname));
797 QString html = "<BR>Sorry, No Wikipedia article with this object name seems to exist. It is possible that "
828 //This if statement should correct for a situation like for the planets where there is a single internal table inside the infoText Box.
835 //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.
841 infoText.replace("//", "http://"); //This is to fix links on wikipedia which are missing http from the url
845 //This section is intended to remove links from the object name header at the top. The links break up the header.
867 infoText.remove(mathLeft, mathRight); //This removes an image that doesn't render properly for some DSOs.
869 infoText.replace("style=\"width:22em\"", "style=\"width:100%;background-color: black;color: white;\"");
870 infoText = infoText + "<BR>(Source: <a href='" + "https://en.wikipedia.org/w/index.php?title=" + name +
875 "</caption>"); //Start looking for the image AFTER the caption. Planets have images in their caption.
885 "https://upload.wikimedia.org"); //Although they will display, the images apparently don't download properly unless they are https.
899 ";} a {text-decoration: none;color:" + linkColor + ";}</style></HEAD><BODY>" + html + "</BODY></HTML>";
910 QDir filePath(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/descriptions");
933 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("image_url.dat"));
969 file.setFileName(QDir(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation)).filePath("info_url.dat"));
1005 QDir filePath(KSPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/descriptions");
SizeRootObjectToView
QQmlContext * rootContext() const const
QString getPosition() const
Get current position of sky-object associated with the SkyObjItem.
Definition: skyobjitem.h:105
void setDefaultButton(QPushButton *button)
float getMagnitude() const
Get magnitude of sky-object associated with the SkyObjItem.
Definition: skyobjitem.cpp:261
QFuture< T > run(Function function,...)
Definition: detaildialog.h:70
QString toUpper() const const
SkyObject * getSkyObject()
Get sky-object associated with the SkyObjItem.
Definition: skyobjitem.h:123
void onPrevObjClicked()
public slot - Show details-view for previous sky-object from list of current sky-objects's category.
Definition: wiview.cpp:299
void show()
ReadOnly
QString fromUtf8(const char *str, int size)
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)
int getType() const
Get category of sky-object associated with the SkyObjItem as an integer.
Definition: skyobjitem.h:99
Type type(const QSqlDatabase &db)
virtual bool open(QIODevice::OpenMode mode) override
singleShot
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
void onNextObjClicked()
public slot - Show details-view for next sky-object from list of current sky-objects's category.
Definition: wiview.cpp:285
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Overridden method from QAbstractItemModel.
Definition: skyobjlistmodel.cpp:38
QAbstractButton * clickedButton() const const
QNetworkReply::NetworkError error() const const
QString getDescName() const
Get longname of sky-object associated with the SkyObjItem.
Definition: skyobjitem.h:75
QString url(QUrl::FormattingOptions options) const const
QString applicationDirPath()
void setContextProperty(const QString &name, QObject *value)
QString xi18n(const char *text, const TYPE &arg...)
void replace(int i, const T &value)
bool exists() const const
void setFocusObject(SkyObject *o)
Set the FocusObject pointer to the argument.
Definition: skymap.cpp:368
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setFlags(Qt::WindowFlags flags)
QQuickItem * rootObject() const const
SkyObjItem * getSkyObjItem(int index)
Get sky-object item referred to by index.
Definition: skyobjlistmodel.cpp:60
void onCenterButtonClicked()
public slot - Slew map to current sky-object in the details view.
Definition: wiview.cpp:313
QString getSummary(bool includeDescription) const
Get Summary Description for the SkyObjItem.
Definition: skyobjitem.cpp:175
KGuiItem cancel()
void onDetailsButtonClicked()
public slot - Open Details Dialog to show more details for current sky-object.
Definition: wiview.cpp:370
void setObsConditions(int bortle, double aperture, Equipment equip, TelescopeType telType)
Set new observing conditions.
Definition: obsconditions.cpp:101
void setDestination(const SkyPoint &f)
sets the destination point of the sky map.
Definition: skymap.cpp:983
visible
WindowCloseButtonHint
int size() const const
void deleteLater()
QString gname(bool useGreekChars=true) const
Returns the genetive name of the star.
Definition: starobject.cpp:559
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:558
QString i18n(const char *text, const TYPE &arg...)
Definition: skyobjlistmodel.h:19
Manages models for QML listviews of different types of sky-objects.
Definition: modelmanager.h:27
QString getLongName() const
Get longname of sky-object associated with the SkyObjItem.
Definition: skyobjitem.h:87
bool isEmpty() const const
QUrl fromLocalFile(const QString &localFile)
void loadDetailsView(SkyObjItem *soitem, int index)
Load details-view for selected sky-object.
Definition: wiview.cpp:501
AcceptRole
const T & at(int i) const const
void setFocusPoint(SkyPoint *f)
set the FocusPoint; the position that is to be the next Destination.
Definition: skymap.h:204
void setFileName(const QString &name)
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:274
WIView(QWidget *parent=nullptr)
Constructor - Store QML components as QObject pointers.
Definition: wiview.cpp:40
virtual int exec()
QString join(const QString &separator) const const
virtual void close() override
int indexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
This is the main window for KStars. In addition to the GUI elements, the class contains the program c...
Definition: kstars.h:90
void onSlewTelescopeButtonClicked()
public slot - Slew map to current sky-object in the details view.
Definition: wiview.cpp:328
void onCategorySelected(QString model)
public slot - Act upon signal emitted when category of sky-object is selected from category selection...
Definition: wiview.cpp:254
QString & replace(int position, int n, QChar after)
void onReloadIconClicked()
public slot - Reload list of visible sky-objects.
Definition: wiview.cpp:389
QString & remove(int position, int n)
QVariant header(QNetworkRequest::KnownHeaders header) const const
void addButton(QAbstractButton *button, QMessageBox::ButtonRole role)
T findChild(const QString &name, Qt::FindChildOptions options) const const
void setSource(const QUrl &url)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
QString getTypeName() const
Get category of sky-object associated with the SkyObjItem as a QString.
Definition: skyobjitem.h:93
bool setProperty(const char *name, const QVariant &value)
QString toLower() const const
virtual int exec() override
void setText(const QString &text)
AppLocalDataLocation
Definition: obsconditions.h:21
ContentTypeHeader
NoError
const char * name(StandardAction id)
QString getName() const
Get name of sky-object associated with the SkyObjItem.
Definition: skyobjitem.h:69
KGuiItem cont()
void finished()
QByteArray readAll()
void setResizeMode(QQuickView::ResizeMode)
Definition: skyobjitem.h:20
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
void setContextObject(QObject *object)
QString mid(int position, int n) const const
size
virtual void abort()=0
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
void onSoListItemClicked(int index)
public slot - Act upon signal emitted when an item is selected from list of sky-objects.
Definition: wiview.cpp:278
QString toString() const const
QVariant property(const char *name) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:02:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.