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

marble

  • sources
  • kde-4.14
  • 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 <QPen>
18 #include <QFont>
19 
20 #include "RenderPlugin.h"
21 #include "FrameGraphicsItem.h"
22 #include "marble_export.h"
23 
24 
25 class QContextMenuEvent;
26 class QHelpEvent;
27 class QMenu;
28 class QWidget;
29 
30 namespace Marble
31 {
32 
33 class AbstractFloatItemPrivate;
34 
45 class MARBLE_EXPORT AbstractFloatItem : public RenderPlugin, public FrameGraphicsItem
46 {
47  Q_OBJECT
48 
49  public:
50  explicit AbstractFloatItem( const MarbleModel *marbleModel,
51  const QPointF &point = QPointF( 10.0, 10.0 ),
52  const QSizeF &size = QSizeF( 150.0, 50.0 ) );
53  virtual ~AbstractFloatItem();
54 
55  virtual QHash<QString,QVariant> settings() const;
56  virtual void setSettings(const QHash<QString, QVariant> &settings);
57 
58  virtual RenderType renderType() const;
59 
64  QPen pen() const;
65 
70  void setPen( const QPen &pen );
71 
76  QFont font() const;
77 
82  void setFont( const QFont &font );
83 
84  bool render( GeoPainter *painter, ViewportParams *viewport,
85  const QString& renderPos = "FLOAT_ITEM", GeoSceneLayer * layer = 0 );
86  virtual QString renderPolicy() const;
87 
88  virtual QStringList renderPosition() const;
89 
98  void setVisible( bool visible );
99 
108  bool visible() const;
109 
120  bool positionLocked() const;
121 
122  public Q_SLOTS:
133  void setPositionLocked( bool lock );
134 
141  void show();
142 
149  void hide();
150 
151  protected:
152  virtual bool eventFilter( QObject *object, QEvent *e );
153  virtual void contextMenuEvent ( QWidget *w, QContextMenuEvent *e );
154  virtual void toolTipEvent( QHelpEvent *e );
155  QMenu* contextMenu();
156 
157  private:
158  Q_DISABLE_COPY( AbstractFloatItem )
159  AbstractFloatItemPrivate * const d;
160 };
161 
162 }
163 
164 #endif
QEvent
QWidget
Marble::FrameGraphicsItem
Definition: FrameGraphicsItem.h:25
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
QFont
QPointF
FrameGraphicsItem.h
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
QHash< QString, QVariant >
QContextMenuEvent
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:45
QString
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QMenu
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QSizeF
marble_export.h
RenderPlugin.h
QPen
QHelpEvent
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-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 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
  • 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