marble
OpenCachingComItem.cpp
Go to the documentation of this file.
47 setCoordinate( GeoDataCoordinates( cache["location"].toMap()["lon"].toReal(), cache["location"].toMap()["lat"].toReal(), 0.0, GeoDataCoordinates::Degree ) );
91 m_ui->labelHeader->setText(QString("<big><strong>" + m_cache["name"].toString() + "</strong></big>"));
101 + "<tr><td align=\"right\">" + tr("Size:") + " </td><td>" + ratingNumberString(m_cache["size"]) + "</td></tr>"
102 + "<tr><td align=\"right\">" + tr("Difficulty:") + " </td><td>" + ratingNumberString(m_cache["difficulty"]) + "</td></tr>"
103 + "<tr><td align=\"right\">" + tr("Terrain:") + " </td><td>" + ratingNumberString(m_cache["terrain"]) + "</td></tr>"
104 + "<tr><td align=\"right\">" + tr("Awsomeness:") + " </td><td>" + ratingNumberString(m_cache["awsomeness"]) + "</td></tr>"
105 + "<tr><td align=\"right\">" + tr("Hidden by:") + " </td><td>" + m_cache["hidden_by"].toMap()["name"].toString() + "</td></tr>"
106 + "<tr><td align=\"right\">" + tr("Hidden:") + " </td><td>" + dateString(m_cache["hidden"]) + "</td></tr>"
107 + "<tr><td align=\"right\">" + tr("Last found:") + " </td><td>" + dateString(m_cache["last_found"]) + "</td></tr>";
153 details += "<tr><td align=\"right\">" + tr("Verification:") + " </td><td>" + verifyOptsStrings.join(", ") + "</td></tr>";
176 details += "<tr><td align=\"right\">" + tr("Distance from home:") + " </td><td>" + dist + "</td></tr>";
254 html += "<tr><td colspan=\"2\"><table cellpadding=\"3\"><tr><td><img src=\":/" + iconName() + "\"></td>"
255 + "<td valign=\"middle\"><big><strong>" + m_cache["name"].toString() + "</strong></big></td></tr></table></td></tr>"
262 + tr( "Difficulty") + ": <span style=\"background:#1e4381;color:white;\"> " + ratingNumberString(m_cache["difficulty"]) + " </span>"
263 + "<br/>" + tr( "Terrain" ) + ": <span style=\"background:#dda24d;color:white;\"> " + ratingNumberString(m_cache["terrain"]) + " </span>"
264 + "<br/>" + tr( "Awsomeness" ) + ": <span style=\"background:#e27c31;color:white;\"> " + ratingNumberString(m_cache["awsomeness"]) + " </span>"
265 + "<br/>" + tr( "Size" ) + ": <span style=\"background:#807f39;color:white;\"> " + ratingNumberString(m_cache["size"]) + " </span></td></tr>"
266 + "<tr><td colspan=\"2\">" + tr("Last found: ") + dateString(m_cache["last_found"]) + "</td></tr>"
301 QString url = "http://www.opencaching.com/api/geocache/" + id() + "/" + image["caption"].toString();
422 QDesktopServices::openUrl( QUrl( "http://www.opencaching.com/#!geocache/" + m_cache["oxcode"].toString() ) );
void setText(const QString &text)
qlonglong toLongLong(bool *ok) const
void setTarget(const QString &target)
Definition: AbstractDataPluginItem.cpp:66
static QString lonToString(qreal lon, GeoDataCoordinates::Notation notation, GeoDataCoordinates::Unit unit=Radian, int precision=-1, char format= 'f')
Definition: GeoDataCoordinates.cpp:933
QString & append(QChar ch)
void setupUi(QWidget *widget)
Definition: position-tracking.qml:12
MarbleLocale::MeasurementSystem measurementSystem() const
Definition: MarbleLocale.cpp:45
void showInfoDialog()
Definition: OpenCachingComItem.cpp:79
QString toString(Qt::DateFormat format) const
void paint(QPainter *painter)
Paints the item in item coordinates.
Definition: OpenCachingComItem.cpp:220
void addDownloadedFile(const QString &url, const QString &type)
Definition: OpenCachingComItem.cpp:278
This file contains the headers for MarbleModel.
void setId(const QString &id)
Definition: AbstractDataPluginItem.cpp:86
const T & at(int i) const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QScriptValue evaluate(const QString &program, const QString &fileName, int lineNumber)
int exec()
const MarbleModel * marbleModel() const
Definition: AbstractDataPluginModel.cpp:269
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
Definition: MarbleMath.h:52
QString join(const QString &separator) const
QVariant toVariant() const
const Planet * planet() const
Returns the planet object for the current map.
Definition: MarbleModel.cpp:644
QString tr(const char *sourceText, const char *disambiguation, int n)
QDateTime fromMSecsSinceEpoch(qint64 msecs)
int size() const
Definition: PositionTracking.h:31
QString number(int n, int base)
int count(const T &value) const
QString fromUtf8(const char *str, int size)
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
OpenCachingComItem(QVariantMap cache, OpenCachingComModel *parent)
Definition: OpenCachingComItem.cpp:39
bool isEmpty() const
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
QByteArray readAll()
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
bool operator<(const AbstractDataPluginItem *other) const
Definition: OpenCachingComItem.cpp:273
This file contains the headers for ViewportParams.
static QString latToString(qreal lat, GeoDataCoordinates::Notation notation, GeoDataCoordinates::Unit unit=Radian, int precision=-1, char format= 'f')
Definition: GeoDataCoordinates.cpp:1080
QMap< QString, QVariant > toMap() const
QDate date() const
char * toString(const T &value)
void fetchData(const QString &url, const QString &type, OpenCachingComItem *item)
Fetch a file for a cache.
Definition: OpenCachingComModel.cpp:112
bool initialized() const
Definition: OpenCachingComItem.cpp:69
const QChar at(int position) const
void setWindowTitle(const QString &)
GeoDataCoordinates coordinate() const
Definition: BillboardGraphicsItem.cpp:93
QString toString() const
return a string representation of the coordinate this is a convenience function which uses the defaul...
Definition: GeoDataCoordinates.cpp:921
double toDouble(bool *ok) const
~OpenCachingComItem()
Definition: OpenCachingComItem.cpp:65
GeoDataCoordinates currentLocation() const
Returns the current position, if any.
Definition: PositionTracking.cpp:389
bool openUrl(const QUrl &url)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setCoordinate(const GeoDataCoordinates &coordinates)
Definition: BillboardGraphicsItem.cpp:98
void setToolTip(const QString &toolTip)
Set the tool tip for the item.
Definition: AbstractDataPluginItem.cpp:76
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.