• 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
  • plugins
  • render
  • annotate
SceneGraphicsItem.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 2009 Andrew Manson <g.real.ate@gmail.com>
9 // Copyright 2013 Thibaut Gridel <tgridel@free.fr>
10 //
11 
12 #ifndef SCENEGRAPHICSITEM_H
13 #define SCENEGRAPHICSITEM_H
14 
15 #include <QRect>
16 #include <QObject>
17 #include <QPainterPath>
18 #include <QMouseEvent>
19 
20 #include "GeoGraphicsItem.h"
21 #include "marble_export.h"
22 
23 
24 namespace Marble
25 {
26 
27 class GeoDataPlacemark;
28 
34 class SceneGraphicsItem : public GeoGraphicsItem
35 {
36 public:
37  explicit SceneGraphicsItem( GeoDataPlacemark *placemark );
38  ~SceneGraphicsItem();
39 
43  QList<QRegion> regions() const;
44 
48  void setRegions( const QList<QRegion> &regions );
49 
56  const GeoDataPlacemark *placemark() const;
57 
58  GeoDataPlacemark *placemark();
59 
66  bool sceneEvent( QEvent *event );
67 
73  virtual const char *graphicType() const = 0;
74 
75 protected:
80  virtual bool mousePressEvent( QMouseEvent *event ) = 0;
81  virtual bool mouseMoveEvent( QMouseEvent *event ) = 0;
82  virtual bool mouseReleaseEvent( QMouseEvent *event ) = 0;
83 
84 private:
85  QList<QRegion> m_regions;
86  GeoDataPlacemark *m_placemark;
87 };
88 
89 }
90 
91 #endif // SCENEGRAPHICSITEM_H
QEvent
Marble::SceneGraphicsItem::SceneGraphicsItem
SceneGraphicsItem(GeoDataPlacemark *placemark)
Definition: SceneGraphicsItem.cpp:19
Marble::SceneGraphicsItem::mousePressEvent
virtual bool mousePressEvent(QMouseEvent *event)=0
Pure virtual functions which handle the mouse events, all of which are re-implemented in every SceneG...
Marble::SceneGraphicsItem::~SceneGraphicsItem
~SceneGraphicsItem()
Definition: SceneGraphicsItem.cpp:26
Marble::SceneGraphicsItem::setRegions
void setRegions(const QList< QRegion > &regions)
A setter for the m_regions private member.
Definition: SceneGraphicsItem.cpp:36
Marble::GeoGraphicsItem
Definition: GeoGraphicsItem.h:30
QMouseEvent
Marble::SceneGraphicsItem::sceneEvent
bool sceneEvent(QEvent *event)
This function is used to call the event distributer and makes use of the re-implemented virtual funct...
Definition: SceneGraphicsItem.cpp:51
Marble::SceneGraphicsItem::mouseReleaseEvent
virtual bool mouseReleaseEvent(QMouseEvent *event)=0
Marble::SceneGraphicsItem::mouseMoveEvent
virtual bool mouseMoveEvent(QMouseEvent *event)=0
Marble::SceneGraphicsItem
This is the base class for all scene graphics included within the annotate plugin.
Definition: SceneGraphicsItem.h:34
Marble::SceneGraphicsItem::graphicType
virtual const char * graphicType() const =0
It is used for downcasting a SceneGraphicItem.
QList< QRegion >
GeoGraphicsItem.h
Marble::SceneGraphicsItem::regions
QList< QRegion > regions() const
Returns the list of regions which form the scene graphic element.
Definition: SceneGraphicsItem.cpp:31
marble_export.h
Marble::SceneGraphicsItem::placemark
const GeoDataPlacemark * placemark() const
SceneGraphicItem class, when called from one of its derived classes' constructors, takes as a parameter a pointer to the placemark of the graphic element.
Definition: SceneGraphicsItem.cpp:41
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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