• 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.cpp
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 #include "SceneGraphicsItem.h"
13 #include "GeoDataPlacemark.h"
14 
15 
16 namespace Marble
17 {
18 
19 SceneGraphicsItem::SceneGraphicsItem( GeoDataPlacemark *placemark )
20  : GeoGraphicsItem( placemark ),
21  m_placemark( placemark )
22 {
23 
24 }
25 
26 SceneGraphicsItem::~SceneGraphicsItem()
27 {
28 
29 }
30 
31 QList<QRegion> SceneGraphicsItem::regions() const
32 {
33  return m_regions;
34 }
35 
36 void SceneGraphicsItem::setRegions( const QList<QRegion> &regions )
37 {
38  m_regions = regions;
39 }
40 
41 const GeoDataPlacemark *SceneGraphicsItem::placemark() const
42 {
43  return m_placemark;
44 }
45 
46 GeoDataPlacemark *SceneGraphicsItem::placemark()
47 {
48  return m_placemark;
49 }
50 
51 bool SceneGraphicsItem::sceneEvent( QEvent *event )
52 {
53  if( event->type() == QEvent::MouseButtonPress ) {
54  return mousePressEvent( static_cast<QMouseEvent*>( event ) );
55  }
56  if( event->type() == QEvent::MouseMove ) {
57  return mouseMoveEvent( static_cast<QMouseEvent*>( event ) );
58  }
59  if( event->type() == QEvent::MouseButtonRelease ) {
60  return mouseReleaseEvent( static_cast<QMouseEvent*>( event ) );
61  }
62 
63  return false;
64 }
65 
66 }
67 
QEvent
QEvent::type
Type type() const
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
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
QList< QRegion >
GeoDataPlacemark.h
SceneGraphicsItem.h
Marble::SceneGraphicsItem::regions
QList< QRegion > regions() const
Returns the list of regions which form the scene graphic element.
Definition: SceneGraphicsItem.cpp:31
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