• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • PopupLayer
Signals | Public Member Functions | List of all members
Marble::PopupLayer Class Reference

#include <PopupLayer.h>

Inheritance diagram for Marble::PopupLayer:
Inheritance graph
[legend]

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

Marble::PopupLayer::PopupLayer ( MarbleWidget *  widget,
QObject *  parent = 0 
)
explicit

Definition at line 24 of file PopupLayer.cpp.

Marble::PopupLayer::~PopupLayer ( )

Definition at line 34 of file PopupLayer.cpp.

Member Function Documentation

bool Marble::PopupLayer::eventFilter ( QObject *  object,
QEvent *  e 
)
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.

bool Marble::PopupLayer::render ( GeoPainter *  painter,
ViewportParams *  viewport,
const QString &  renderPos,
GeoSceneLayer *  layer 
)
virtual

Renders the content provided by the layer on the viewport.

Parameters
painterpainter object allowing to paint on the map
viewportmetadata, such as current projection, screen dimension, etc.
renderPoscurrent render position
layerdeprecated, 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.

QStringList Marble::PopupLayer::renderPosition ( ) const
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.

void Marble::PopupLayer::repaintNeeded ( )
signal
virtual QString Marble::PopupLayer::runtimeTrace ( ) const
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
colorcolor 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
htmlcontent (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
coordinatesgeo coordinates
alignmentalignment 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
sizepopup 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
colorcolor 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
urlurl 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
visiblevisibility 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.

qreal Marble::PopupLayer::zValue ( ) const
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:
  • PopupLayer.h
  • PopupLayer.cpp
This file is part of the KDE documentation.
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.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal