• 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
  • plugins
  • templates
  • floatitem
FITemplateFloatItem.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 Inge Wallin <inge@lysator.liu.se>
9 //
10 
11 //
12 // This class is a template Float Item plugin.
13 //
14 
15 
16 #ifndef FITEMPLATE_FLOAT_ITEM_H
17 #define FITEMPLATE_FLOAT_ITEM_H
18 
19 
20 // Qt
21 
22 // Marble
23 #include "AbstractFloatItem.h"
24 
25 class QSvgRenderer;
26 
27 namespace Marble
28 {
29 
35 class FITemplateFloatItem : public AbstractFloatItem
36 {
37  Q_OBJECT
38  Q_PLUGIN_METADATA( IID "org.kde.edu.marble.FITemplateFloatItem" )
39  Q_INTERFACES( Marble::RenderPluginInterface )
40  MARBLE_PLUGIN(FITemplateFloatItem)
41 
42  public:
43  explicit FITemplateFloatItem( const QPointF &point = QPointF( -1.0, 10.0 ),
44  const QSizeF &size = QSizeF( 75.0, 75.0 ) );
45 
46  // ----------------------------------------------------------------
47  // The following functions are defined in RenderPluginInterface.h
48  // and MUST be part of the plugin. See that file for documentation.
49  //
50  // Note that the class AbstractFloatItem provides default
51  // implementations for many of them.
52  //
53 
54  ~FITemplateFloatItem ();
55 
56  QStringList backendTypes() const;
57 
58  // Provided by AbstractFloatItem and should not be implemented.
59  //
60  // QString renderPolicy() const;
61  // QStringList renderPosition() const;
62 
63  QString name() const;
64 
65  QString guiString() const;
66 
67  QString nameId() const;
68 
69  QString description() const;
70 
71  QIcon icon() const;
72 
73  void initialize();
74 
75  bool isInitialized() const;
76 
77  // Provided by AbstractFloatItem and should not be implemented.
78  //
79  // bool render( GeoPainter *painter, ViewportParams *viewport,
80  // const QString &renderPos, GeoSceneLayer *layer);
81 
82  QPainterPath backgroundShape() const;
83 
84  // End of RenderPluginInterface functions.
85  // ----------------------------------------------------------------
86 
87  bool needsUpdate( ViewportParams *viewport );
88 
89  bool renderFloatItem( GeoPainter *painter, ViewportParams *viewport,
90  GeoSceneLayer * layer = 0 );
91 
92  private:
93  Q_DISABLE_COPY( FITemplateFloatItem )
94 
95  QSvgRenderer *m_svgobj;
96  QPixmap m_compass;
97 
99  int m_polarity;
100 };
101 
102 }
103 
104 #endif
Marble::RenderPluginInterface
The class that specifies the Marble layer interface of a plugin.
Definition: RenderPluginInterface.h:30
Marble::FITemplateFloatItem::description
QString description() const
Returns a user description of the plugin.
Definition: FITemplateFloatItem.cpp:66
Marble::FITemplateFloatItem::FITemplateFloatItem
FITemplateFloatItem(const QPointF &point=QPointF(-1.0, 10.0), const QSizeF &size=QSizeF(75.0, 75.0))
Definition: FITemplateFloatItem.cpp:31
Marble::FITemplateFloatItem::isInitialized
bool isInitialized() const
Definition: FITemplateFloatItem.cpp:82
Marble::FITemplateFloatItem::name
QString name() const
Returns the user-visible name of the plugin.
Definition: FITemplateFloatItem.cpp:51
Marble::FITemplateFloatItem::backendTypes
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: FITemplateFloatItem.cpp:46
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::FITemplateFloatItem::backgroundShape
QPainterPath backgroundShape() const
Returns the shape of the background.
Definition: FITemplateFloatItem.cpp:88
AbstractFloatItem.h
Marble::FITemplateFloatItem::~FITemplateFloatItem
~FITemplateFloatItem()
Definition: FITemplateFloatItem.cpp:41
Marble::MarbleGraphicsItem::size
QSizeF size() const
Returns the size of the item.
Definition: MarbleGraphicsItem.cpp:136
Marble::FITemplateFloatItem
The class that creates a ...
Definition: FITemplateFloatItem.h:35
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:48
Marble::FITemplateFloatItem::initialize
void initialize()
Definition: FITemplateFloatItem.cpp:77
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::FITemplateFloatItem::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: FITemplateFloatItem.cpp:56
Marble::FITemplateFloatItem::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: FITemplateFloatItem.cpp:61
Marble::FITemplateFloatItem::renderFloatItem
bool renderFloatItem(GeoPainter *painter, ViewportParams *viewport, GeoSceneLayer *layer=0)
Definition: FITemplateFloatItem.cpp:99
Marble::FITemplateFloatItem::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: FITemplateFloatItem.cpp:71
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:337
Marble::FITemplateFloatItem::needsUpdate
bool needsUpdate(ViewportParams *viewport)
Definition: FITemplateFloatItem.cpp:94
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 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