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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
AbstractFloatItem.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2008 Torsten Rahn <tackat@kde.org>
9 // Copyright 2012 Illya Kovalevskyy <illya.kovalevskyy@gmail.com>
10 //
11 
12 #ifndef MARBLE_ABSTRACTFLOATITEM_H
13 #define MARBLE_ABSTRACTFLOATITEM_H
14 
15 #include <QPointF>
16 #include <QSizeF>
17 #include <QString>
18 #include <Qt>
19 
20 #include <QPen>
21 #include <QFont>
22 #include <QContextMenuEvent>
23 #include <QHelpEvent>
24 #include <QWidget>
25 
26 #include "RenderPlugin.h"
27 #include "FrameGraphicsItem.h"
28 #include "marble_export.h"
29 
30 
31 class QMenu;
32 
33 namespace Marble
34 {
35 
36 class AbstractFloatItemPrivate;
37 
48 class MARBLE_EXPORT AbstractFloatItem : public RenderPlugin, public FrameGraphicsItem
49 {
50  Q_OBJECT
51 
52  public:
53  explicit AbstractFloatItem( const MarbleModel *marbleModel,
54  const QPointF &point = QPointF( 10.0, 10.0 ),
55  const QSizeF &size = QSizeF( 150.0, 50.0 ) );
56  virtual ~AbstractFloatItem();
57 
58  virtual QHash<QString,QVariant> settings() const;
59  virtual void setSettings(const QHash<QString, QVariant> &settings);
60 
61  virtual RenderType renderType() const;
62 
67  QPen pen() const;
68 
73  void setPen( const QPen &pen );
74 
79  QFont font() const;
80 
85  void setFont( const QFont &font );
86 
87  bool render( GeoPainter *painter, ViewportParams *viewport,
88  const QString& renderPos = "FLOAT_ITEM", GeoSceneLayer * layer = 0 );
89  virtual QString renderPolicy() const;
90 
91  virtual QStringList renderPosition() const;
92 
101  void setVisible( bool visible );
102 
111  bool visible() const;
112 
123  bool positionLocked() const;
124 
125  public Q_SLOTS:
136  void setPositionLocked( bool lock );
137 
144  void show();
145 
152  void hide();
153 
154  protected:
155  virtual bool eventFilter( QObject *object, QEvent *e );
156  virtual void contextMenuEvent ( QWidget *w, QContextMenuEvent *e );
157  virtual void toolTipEvent( QHelpEvent *e );
158  virtual void changeViewport( ViewportParams *viewport );
159  QMenu* contextMenu();
160 
161  private:
162  Q_DISABLE_COPY( AbstractFloatItem )
163  AbstractFloatItemPrivate * const d;
164 };
165 
166 }
167 
168 #endif
Marble::FrameGraphicsItem
Definition: FrameGraphicsItem.h:25
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
QWidget
QObject
FrameGraphicsItem.h
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:48
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
marble_export.h
RenderPlugin.h
Marble::RenderPlugin::RenderType
RenderType
A Type of plugin.
Definition: RenderPlugin.h:59
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:48 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