marble
#include <PopupLayer.h>
Signals | |
void | repaintNeeded () |
Public Member Functions | |
PopupLayer (MarbleWidget *widget, QObject *parent=0) | |
~PopupLayer () | |
virtual bool | eventFilter (QObject *, QEvent *) |
void | popup () |
bool | render (GeoPainter *painter, ViewportParams *viewport, const QString &, GeoSceneLayer *) |
QString | renderPolicy () const |
QStringList | renderPosition () const |
virtual QString | runtimeTrace () const |
void | setBackgroundColor (const QColor &color) |
void | setContent (const QString &html) |
void | setCoordinates (const GeoDataCoordinates &coordinates, Qt::Alignment alignment) |
void | setPosition (const QPointF &position) |
void | setSize (const QSizeF &size) |
void | setTextColor (const QColor &color) |
void | setUrl (const QUrl &url) |
void | setVisible (bool visible) |
bool | visible () const |
qreal | zValue () const |
Public Member Functions inherited from Marble::LayerInterface | |
virtual | ~LayerInterface () |
Detailed Description
The PopupLayer class.
A popup dialog opening on top of the map. The content is shown in a QWebView, acting like a minimalistic web browser. The dialog is either shown aligned to a geo position or shown at a specific screen position.
Definition at line 39 of file PopupLayer.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 24 of file PopupLayer.cpp.
Marble::PopupLayer::~PopupLayer | ( | ) |
Definition at line 34 of file PopupLayer.cpp.
Member Function Documentation
|
virtual |
Definition at line 63 of file PopupLayer.cpp.
void Marble::PopupLayer::popup | ( | ) |
Make the dialog pop up.
This has the same effect as setVisible( true ) and additionally adjusts the viewport so that the dialog is fully visible.
Definition at line 91 of file PopupLayer.cpp.
|
virtual |
Renders the content provided by the layer on the viewport.
- Parameters
-
painter painter object allowing to paint on the map viewport metadata, such as current projection, screen dimension, etc. renderPos current render position layer deprecated, always zero (NULL)
- Returns
true
Returns whether the rendering has been successful
Implements Marble::LayerInterface.
Definition at line 48 of file PopupLayer.cpp.
QString Marble::PopupLayer::renderPolicy | ( | ) | const |
Definition at line 43 of file PopupLayer.cpp.
|
virtual |
Preferred level in the layer stack for the rendering.
Gives a preferred level in the existing layer stack where the render() method of this plugin should get executed. Possible Values: "NONE" "STARS" "BEHIND_TARGET" "SURFACE" "HOVERS_ABOVE_SURFACE" "ATMOSPHERE" "ORBIT" "ALWAYS_ON_TOP" "FLOAT_ITEM" "USER_TOOLS"
Implements Marble::LayerInterface.
Definition at line 38 of file PopupLayer.cpp.
|
signal |
|
inlinevirtual |
Returns a debug line for perfo/tracing issues.
Reimplemented from Marble::LayerInterface.
Definition at line 53 of file PopupLayer.h.
void Marble::PopupLayer::setBackgroundColor | ( | const QColor & | color | ) |
Sets background color of the header.
- See also
- PopupItem::setBackgroundColor();
- Parameters
-
color color to set
Definition at line 114 of file PopupLayer.cpp.
void Marble::PopupLayer::setContent | ( | const QString & | html | ) |
Sets content of the browser.
- See also
- PopupItem::setContent();
- Parameters
-
html content (in html format)
Definition at line 108 of file PopupLayer.cpp.
void Marble::PopupLayer::setCoordinates | ( | const GeoDataCoordinates & | coordinates, |
Qt::Alignment | alignment | ||
) |
Sets coordinates.
Use a geo position as the dialog base position. The dialog will be shown if it is visible and if the map viewport includes the given coordinates. This invalidates a screen position set with setPosition(), if any.
Alignment of the dialog from the point of view of the coordinates. For example, Qt::AlignRight | Qt::AlignVCenter shows the dialog to the right of the geo position, vertically centered. An arrow points from the dialog to the geo position.
- Parameters
-
coordinates geo coordinates alignment alignment of popup when it visible
Definition at line 97 of file PopupLayer.cpp.
void Marble::PopupLayer::setPosition | ( | const QPointF & | position | ) |
Sets the position of the dialog to the given screen position.
- Warning
- Any geo position set with setCoordinates() is invalidated.
- Todo:
- Implement
Definition at line 146 of file PopupLayer.cpp.
void Marble::PopupLayer::setSize | ( | const QSizeF & | size | ) |
Sets size of popup item.
Sets the size
of the dialog (including the arrow, if any).
- Parameters
-
size popup size, arrows in count
Definition at line 128 of file PopupLayer.cpp.
void Marble::PopupLayer::setTextColor | ( | const QColor & | color | ) |
Sets text color of the header.
- See also
- PopupItem::setTextColor();
- Parameters
-
color color to set
Definition at line 121 of file PopupLayer.cpp.
void Marble::PopupLayer::setUrl | ( | const QUrl & | url | ) |
Sets URL of the browser.
- See also
- PopupItem::setUrl();
- Parameters
-
url url for web brower
Definition at line 103 of file PopupLayer.cpp.
void Marble::PopupLayer::setVisible | ( | bool | visible | ) |
Set visibility of the item.
If visible
is true
, popup will be visible, otherwise - popup won't be visible.
- Parameters
-
visible visibility of the item
Definition at line 78 of file PopupLayer.cpp.
bool Marble::PopupLayer::visible | ( | ) | const |
Is popup item visible.
If popup item visible, it will return true
, otherwise - false
- Returns
- visibility of the item
Definition at line 73 of file PopupLayer.cpp.
|
virtual |
Returns the z value of the layer (default: 0.0).
If two layers are painted at the same render position, the one with the higher z value is painted on top. If both have the same z value, their paint order is undefined.
Reimplemented from Marble::LayerInterface.
Definition at line 68 of file PopupLayer.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.