marble
PositionMarker.cpp
Go to the documentation of this file.
38 const int PositionMarker::sm_numResizeSteps = sizeof( sm_resizeSteps ) / sizeof( sm_resizeSteps[0] );
137 connect( ui_configWidget->m_buttonBox->button( QDialogButtonBox::RestoreDefaults ), SIGNAL(clicked()),
184 const GeoDataCoordinates top( m_currentPosition.longitude(), m_currentPosition.latitude()+0.1 );
187 qreal const correction = -90.0 + RAD2DEG * atan2( screenPositionY -screenTopY, screenPositionX - screenTopX );
193 bool const highQuality = painter->mapQuality() == HighQuality || painter->mapQuality() == PrintQuality;
194 Qt::TransformationMode const mode = highQuality ? Qt::SmoothTransformation : Qt::FastTransformation;
392 m_customCursor = QPixmap( filename ).scaled( 22 * m_cursorSize, 22 * m_cursorSize, Qt::KeepAspectRatio, Qt::SmoothTransformation );
399 ui_configWidget->m_fileChooserButton->setIconSize( QSize( m_customCursor.width(), m_customCursor.height() ) );
417 m_defaultCursor = QPixmap( m_defaultCursorPath ).scaled( 22 * m_cursorSize, 22 * m_cursorSize, Qt::KeepAspectRatio, Qt::SmoothTransformation );
454 m_customCursor = QPixmap( m_cursorPath ).scaled( newSize, newSize, Qt::KeepAspectRatio, Qt::SmoothTransformation );
458 ui_configWidget->m_fileChooserButton->setIconSize( QSize( m_customCursor.width(), m_customCursor.height() ) );
PositionProviderPlugin positionProviderPlugin
Definition: PositionTracking.h:35
qreal direction() const
provides direction of the gps device in degrees with geographical north
Definition: PositionTracking.cpp:234
void setOpacity(qreal opacity)
iterator insert(const Key &key, const T &value)
void drawPolygon(const GeoDataLinearRing &linearRing, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws a given linear ring (a "polygon without holes").
Definition: GeoPainter.cpp:560
QRect toRect() const
int width() const
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: PositionMarker.cpp:75
void setColor(ColorGroup group, ColorRole role, const QColor &color)
void repaintNeeded(QRegion dirtyRegion=QRegion())
This signal is emitted if an update of the view is needed.
virtual QHash< QString, QVariant > settings() const
Definition: PositionMarker.cpp:280
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
QObject * sender() const
This file contains the headers for MarbleModel.
Definition: PluginInterface.h:28
QDialog * configDialog()
Returns a pointer to the configuration dialog of the plugin.
Definition: PositionMarker.cpp:124
void save()
Definition: PositionMarker.h:35
const GeoDataLatLonAltBox & viewLatLonAltBox() const
Definition: ViewportParams.cpp:305
void setAlpha(int alpha)
void restoreDefaultSettings()
Passes an empty set of settings to the plugin.
Definition: RenderPlugin.cpp:221
PositionMarker(const MarbleModel *marbleModel=0)
Definition: PositionMarker.cpp:40
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
void drawEllipse(const GeoDataCoordinates ¢erPosition, qreal width, qreal height, bool isGeoProjected=false)
Draws an ellipse at the given position. The ellipse is placed with its center located at the given ce...
Definition: GeoPainter.cpp:289
virtual bool contains(const GeoDataCoordinates &) const
Definition: GeoDataLatLonAltBox.cpp:170
QString tr(const char *sourceText, const char *disambiguation, int n)
void chooseCustomCursor()
Definition: PositionMarker.cpp:383
QList< PluginAuthor > pluginAuthors() const
Definition: PositionMarker.cpp:110
GeoDataAccuracy accuracy() const
Returns the estimated accuracy of the current position.
Definition: PositionTracking.cpp:384
void setHeight(qreal height)
QString copyrightYears() const
Definition: PositionMarker.cpp:105
virtual void setSettings(const QHash< QString, QVariant > &settings)
Set the settings of the item.
Definition: PositionMarker.cpp:294
void setPen(const QColor &color)
void settingsChanged(QString nameId)
This signal is emitted if the settings of the RenderPlugin changed.
QMatrix & translate(qreal dx, qreal dy)
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: PositionMarker.cpp:65
bool isEmpty() const
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer=0)
Renders the content provided by the layer on the viewport.
Definition: PositionMarker.cpp:169
void setBrush(const QBrush &brush)
bool screenCoordinates(const qreal lon, const qreal lat, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition: ViewportParams.cpp:357
QPixmap scaled(int width, int height, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
const T value(const Key &key) const
bool isNull() const
QString description() const
Returns a user description of the plugin.
Definition: PositionMarker.cpp:100
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
int height() const
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, QFlags< QColorDialog::ColorDialogOption > options)
This file contains the headers for ViewportParams.
void restore()
QTransform & rotate(qreal angle, Qt::Axis axis)
QMatrix & rotate(qreal degrees)
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QRectF boundingRect() const
qreal width() const
QPixmap transformed(const QMatrix &matrix, Qt::TransformationMode mode) const
virtual qreal zValue() const
Returns the z value of the layer (default: 0.0).
Definition: PositionMarker.cpp:464
void setWidth(qreal width)
qreal height() const
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFlags< QFileDialog::Option > options)
void setX(qreal x)
void setY(qreal y)
Definition: GeoDataAccuracy.h:22
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual QHash< QString, QVariant > settings() const
Settings of the plugin.
Definition: RenderPlugin.cpp:185
QString renderPolicy() const
Return how the plugin settings should be used.
Definition: PositionMarker.cpp:70
void setPosition(const GeoDataCoordinates &position)
Definition: PositionMarker.cpp:367
void drawPixmap(const GeoDataCoordinates ¢erPosition, const QPixmap &pixmap)
Draws a pixmap at the given position. The pixmap is placed with its center located at the given cente...
Definition: GeoPainter.cpp:452
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
virtual void setSettings(const QHash< QString, QVariant > &settings)
Set the settings of the plugin.
Definition: RenderPlugin.cpp:195
bool isValid() 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.