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

marble

  • Marble
  • AbstractFloatItem
Public Slots | Public Member Functions | Protected Member Functions | List of all members
Marble::AbstractFloatItem Class Reference

#include <AbstractFloatItem.h>

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

Public Slots

void hide ()
 
void setPositionLocked (bool lock)
 
void show ()
 
- Public Slots inherited from Marble::RenderPlugin
QAction * action () const
 
void restoreDefaultSettings ()
 
void setEnabled (bool enabled)
 
bool setSetting (const QString &key, const QVariant &value)
 
QVariant setting (const QString &key)
 
QStringList settingKeys ()
 
void setUserCheckable (bool isUserCheckable)
 
void setVisible (bool visible)
 

Public Member Functions

 AbstractFloatItem (const MarbleModel *marbleModel, const QPointF &point=QPointF(10.0, 10.0), const QSizeF &size=QSizeF(150.0, 50.0))
 
virtual ~AbstractFloatItem ()
 
QFont font () const
 
QPen pen () const
 
bool positionLocked () const
 
bool render (GeoPainter *painter, ViewportParams *viewport, const QString &renderPos="FLOAT_ITEM", GeoSceneLayer *layer=0)
 
virtual QString renderPolicy () const
 
virtual QStringList renderPosition () const
 
virtual RenderType renderType () const
 
void setFont (const QFont &font)
 
void setPen (const QPen &pen)
 
virtual void setSettings (const QHash< QString, QVariant > &settings)
 
virtual QHash< QString, QVariant > settings () const
 
void setVisible (bool visible)
 
bool visible () const
 
- Public Member Functions inherited from Marble::RenderPlugin
 RenderPlugin (const MarbleModel *marbleModel)
 
virtual ~RenderPlugin ()
 
virtual const QList
< QActionGroup * > * 
actionGroups () const
 
bool enabled () const
 
virtual QString guiString () const =0
 
bool isUserCheckable () const
 
const MarbleModel * marbleModel () const
 
virtual RenderPlugin * newInstance (const MarbleModel *marbleModel) const =0
 
virtual QString runtimeTrace () const
 
virtual const QList
< QActionGroup * > * 
toolbarActionGroups () const
 
bool visible () const
 
- Public Member Functions inherited from Marble::RenderPluginInterface
virtual ~RenderPluginInterface ()
 
virtual QStringList backendTypes () const =0
 
virtual void initialize ()=0
 
virtual bool isInitialized () const =0
 
- Public Member Functions inherited from Marble::PluginInterface
virtual ~PluginInterface ()
 
virtual QString aboutDataText () const
 
virtual QString copyrightYears () const =0
 
virtual QString description () const =0
 
virtual QIcon icon () const =0
 
virtual QString name () const =0
 
virtual QString nameId () const =0
 
virtual QList< PluginAuthor > pluginAuthors () const =0
 
virtual QString version () const =0
 
- Public Member Functions inherited from Marble::LayerInterface
virtual ~LayerInterface ()
 
virtual qreal zValue () const
 
- Public Member Functions inherited from Marble::FrameGraphicsItem
 FrameGraphicsItem (MarbleGraphicsItem *parent=0)
 
virtual ~FrameGraphicsItem ()
 
QBrush background () const
 
QBrush borderBrush () const
 
Qt::PenStyle borderStyle () const
 
qreal borderWidth () const
 
QRectF contentRect () const
 
QSizeF contentSize () const
 
FrameType frame () const
 
qreal margin () const
 
qreal marginBottom () const
 
qreal marginLeft () const
 
qreal marginRight () const
 
qreal marginTop () const
 
qreal padding () const
 
QRectF paintedRect () const
 
void setBackground (const QBrush &background)
 
void setBorderBrush (const QBrush &brush)
 
void setBorderStyle (Qt::PenStyle style)
 
void setBorderWidth (qreal width)
 
void setContentSize (const QSizeF &size)
 
void setFrame (FrameType type)
 
void setMargin (qreal margin)
 
void setMarginBottom (qreal marginBottom)
 
void setMarginLeft (qreal marginLeft)
 
void setMarginRight (qreal marginRight)
 
void setMarginTop (qreal marginTop)
 
void setPadding (qreal width)
 
- Public Member Functions inherited from Marble::ScreenGraphicsItem
 ScreenGraphicsItem (MarbleGraphicsItem *parent=0)
 
virtual ~ScreenGraphicsItem ()
 
QList< QPointF > absolutePositions () const
 
GraphicsItemFlags flags () const
 
QPointF position () const
 
QPointF positivePosition () const
 
void setFlags (GraphicsItemFlags flags)
 
void setPosition (const QPointF &position)
 
- Public Member Functions inherited from Marble::MarbleGraphicsItem
virtual ~MarbleGraphicsItem ()
 
CacheMode cacheMode () const
 
bool contains (const QPointF &point) const
 
void hide ()
 
AbstractMarbleGraphicsLayout * layout () const
 
bool paintEvent (QPainter *painter, const ViewportParams *viewport)
 
void setCacheMode (CacheMode mode)
 
void setLayout (AbstractMarbleGraphicsLayout *layout)
 
virtual void setProjection (const ViewportParams *viewport)
 
void setSize (const QSizeF &size)
 
void setVisible (bool visible)
 
void show ()
 
QSizeF size () const
 
bool visible () const
 

Protected Member Functions

virtual void changeViewport (ViewportParams *viewport)
 
QMenu * contextMenu ()
 
virtual void contextMenuEvent (QWidget *w, QContextMenuEvent *e)
 
virtual bool eventFilter (QObject *object, QEvent *e)
 
virtual void toolTipEvent (QHelpEvent *e)
 
- Protected Member Functions inherited from Marble::RenderPlugin
bool eventFilter (QObject *, QEvent *)
 
- Protected Member Functions inherited from Marble::FrameGraphicsItem
virtual QPainterPath backgroundShape () const
 
virtual void paint (QPainter *painter)
 
virtual void paintBackground (QPainter *painter)
 
virtual void paintContent (QPainter *painter)
 
- Protected Member Functions inherited from Marble::ScreenGraphicsItem
 ScreenGraphicsItem (ScreenGraphicsItemPrivate *d_ptr)
 
- Protected Member Functions inherited from Marble::MarbleGraphicsItem
 MarbleGraphicsItem (MarbleGraphicsItemPrivate *d_ptr)
 
void update ()
 

Additional Inherited Members

- Public Types inherited from Marble::RenderPlugin
enum  RenderType {
  UnknownRenderType, TopLevelRenderType, PanelRenderType, OnlineRenderType,
  ThemeRenderType
}
 
- Public Types inherited from Marble::FrameGraphicsItem
enum  FrameType { NoFrame, RectFrame, RoundedRectFrame, ShadowFrame }
 
- Public Types inherited from Marble::ScreenGraphicsItem
enum  GraphicsItemFlag { ItemIsMovable = 0x1, ItemIsHideable = 0x2 }
 
- Public Types inherited from Marble::MarbleGraphicsItem
enum  CacheMode { NoCache, ItemCoordinateCache, DeviceCoordinateCache }
 
- Signals inherited from Marble::RenderPlugin
void actionGroupsChanged ()
 
void enabledChanged (bool enable)
 
void repaintNeeded (QRegion dirtyRegion=QRegion())
 
void settingsChanged (QString nameId)
 
void userCheckableChanged (bool isUserCheckable)
 
void visibilityChanged (bool visible, const QString &nameId)
 
- Protected Attributes inherited from Marble::MarbleGraphicsItem
MarbleGraphicsItemPrivate *const d
 
- Properties inherited from Marble::RenderPlugin
QString description
 
bool enabled
 
QString name
 
QString nameId
 
bool userCheckable
 
QString version
 
bool visible
 

Detailed Description

The abstract class for float item plugins.

Float Item is a variant of Marble render plugins It keeps floating on top of the map at a given screen position

Good examples are Overview Map, License

Definition at line 48 of file AbstractFloatItem.h.

Constructor & Destructor Documentation

Marble::AbstractFloatItem::AbstractFloatItem ( const MarbleModel *  marbleModel,
const QPointF &  point = QPointF( 10.0, 10.0 ),
const QSizeF &  size = QSizeF( 150.0, 50.0 ) 
)
explicit

Definition at line 53 of file AbstractFloatItem.cpp.

Marble::AbstractFloatItem::~AbstractFloatItem ( )
virtual

Definition at line 65 of file AbstractFloatItem.cpp.

Member Function Documentation

void Marble::AbstractFloatItem::changeViewport ( ViewportParams *  viewport)
protectedvirtual

Reimplemented in Marble::ElevationProfileFloatItem, Marble::OverviewMap, Marble::NavigationFloatItem, Marble::CompassFloatItem, Marble::MapScaleFloatItem, and Marble::FileViewFloatItem.

Definition at line 202 of file AbstractFloatItem.cpp.

QMenu * Marble::AbstractFloatItem::contextMenu ( )
protected

Definition at line 230 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::contextMenuEvent ( QWidget *  w,
QContextMenuEvent *  e 
)
protectedvirtual

Reimplemented in Marble::ElevationProfileFloatItem, Marble::NavigationFloatItem, Marble::MapScaleFloatItem, and Marble::License.

Definition at line 192 of file AbstractFloatItem.cpp.

bool Marble::AbstractFloatItem::eventFilter ( QObject *  object,
QEvent *  e 
)
protectedvirtual

Reimplemented from Marble::ScreenGraphicsItem.

Reimplemented in Marble::OverviewMap, Marble::ElevationProfileFloatItem, Marble::NavigationFloatItem, Marble::FileViewFloatItem, Marble::ProgressFloatItem, Marble::RoutingPlugin, and Marble::License.

Definition at line 161 of file AbstractFloatItem.cpp.

QFont Marble::AbstractFloatItem::font ( ) const

current font for rendering

Returns
font

Definition at line 107 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::hide ( )
slot

Hide the item.

If the item was shown this function will hide it

Definition at line 225 of file AbstractFloatItem.cpp.

QPen Marble::AbstractFloatItem::pen ( ) const

current pen for rendering

Returns
pen

Definition at line 96 of file AbstractFloatItem.cpp.

bool Marble::AbstractFloatItem::positionLocked ( ) const

Check is position locked.

Float Item position can be locked. If it is, the item can't be moved with the cursor (in the UI)

To set it use

See also
setPositionLocked
Returns
position locked or not

Definition at line 156 of file AbstractFloatItem.cpp.

bool Marble::AbstractFloatItem::render ( GeoPainter *  painter,
ViewportParams *  viewport,
const QString &  renderPos = "FLOAT_ITEM",
GeoSceneLayer *  layer = 0 
)
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 207 of file AbstractFloatItem.cpp.

QString Marble::AbstractFloatItem::renderPolicy ( ) const
virtual

Return how the plugin settings should be used.

FIXME: Document this Possible Values: "ALWAYS" – the plugin renders at the preferred position no matter what got specified in the DGML file. "SPECIFIED" – renders only in case it got specified in the DGML file. "SPECIFIED_ALWAYS" – In case it got specified in the DGML file render according to the specification otherwise choose the preferred position

Implements Marble::RenderPluginInterface.

Definition at line 118 of file AbstractFloatItem.cpp.

QStringList Marble::AbstractFloatItem::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 123 of file AbstractFloatItem.cpp.

RenderPlugin::RenderType Marble::AbstractFloatItem::renderType ( ) const
virtual

Render type of the plugin.

Function for returning the type of plugin this is for. This affects where in the menu tree the action() is placed.

See also
RenderType
Returns
: The type of render plugin this is

Reimplemented from Marble::RenderPlugin.

Definition at line 91 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::setFont ( const QFont &  font)

setting current font for rendering

Parameters
font

Definition at line 112 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::setPen ( const QPen &  pen)

setting current pen for rendering

Parameters
pen

Definition at line 101 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::setPositionLocked ( bool  lock)
slot

Set is position locked.

Parameters
lockis locked?

Float Item position can be locked. If it is, item can't be moved with cursor (in UI)

To check it use

See also
positionLocked

Definition at line 142 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::setSettings ( const QHash< QString, QVariant > &  settings)
virtual

Set the settings of the plugin.

Usually this is called at startup to restore saved settings.

Parameters
newplugin's settings
See also
settings

Reimplemented from Marble::RenderPlugin.

Reimplemented in Marble::OverviewMap, Marble::CompassFloatItem, and Marble::RoutingPlugin.

Definition at line 77 of file AbstractFloatItem.cpp.

QHash< QString, QVariant > Marble::AbstractFloatItem::settings ( ) const
virtual

Settings of the plugin.

Settings is the map (hash table) of plugin's settings This method is called to determine the current settings of the plugin for serialization, e.g. when closing the application.

Returns
plugin's settings
See also
setSettings

Reimplemented from Marble::RenderPlugin.

Reimplemented in Marble::OverviewMap, Marble::CompassFloatItem, and Marble::RoutingPlugin.

Definition at line 70 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::setVisible ( bool  visible)

Set visibility of the float item.

Float items can be visible or invisible. It's possible to check visibility with

See also
visible
Parameters
visiblevisibility of the item

Definition at line 128 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::show ( )
slot

Show the item.

If the item was hidden this function will show it

Definition at line 220 of file AbstractFloatItem.cpp.

void Marble::AbstractFloatItem::toolTipEvent ( QHelpEvent *  e)
protectedvirtual

Reimplemented in Marble::MapScaleFloatItem.

Definition at line 197 of file AbstractFloatItem.cpp.

bool Marble::AbstractFloatItem::visible ( ) const

Check visibility of the float item.

Float items can be visible or invisible. It's possible to set visibility with

See also
setVisible
Returns
visible or not

Definition at line 135 of file AbstractFloatItem.cpp.


The documentation for this class was generated from the following files:
  • AbstractFloatItem.h
  • AbstractFloatItem.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:55 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