• 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
  • geodata
  • data
GeoDataScreenOverlay.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 2012 Mohammed Nafees <nafees.technocool@gmail.com>
9 //
10 
11 #include "GeoDataScreenOverlay.h"
12 #include "GeoDataTypes.h"
13 
14 namespace Marble {
15 
16 class GeoDataScreenOverlayPrivate
17 {
18 public:
19  GeoDataScreenOverlayPrivate();
20 
21  GeoDataVec2 m_overlayXY;
22  GeoDataVec2 m_screenXY;
23  GeoDataVec2 m_rotationXY;
24  GeoDataVec2 m_size;
25  qreal m_rotation;
26 };
27 
28 GeoDataScreenOverlayPrivate::GeoDataScreenOverlayPrivate() :
29  m_rotation(0.0)
30 {
31 }
32 
33 GeoDataScreenOverlay::GeoDataScreenOverlay() :
34  d( new GeoDataScreenOverlayPrivate )
35 {
36 }
37 
38 GeoDataScreenOverlay::GeoDataScreenOverlay( const Marble::GeoDataScreenOverlay &other ) :
39  GeoDataOverlay( other ), d( new GeoDataScreenOverlayPrivate( *other.d ) )
40 {
41 }
42 
43 GeoDataScreenOverlay &GeoDataScreenOverlay::operator=( const GeoDataScreenOverlay &other )
44 {
45  *d = *other.d;
46  return *this;
47 }
48 
49 GeoDataScreenOverlay::~GeoDataScreenOverlay()
50 {
51  delete d;
52 }
53 
54 const char *GeoDataScreenOverlay::nodeType() const
55 {
56  return GeoDataTypes::GeoDataScreenOverlayType;
57 }
58 
59 GeoDataVec2 GeoDataScreenOverlay::overlayXY() const
60 {
61  return d->m_overlayXY;
62 }
63 
64 void GeoDataScreenOverlay::setOverlayXY(const GeoDataVec2 &vec2)
65 {
66  d->m_overlayXY = vec2;
67 }
68 
69 void GeoDataScreenOverlay::setOverlayXY(const qreal &x, const qreal &y, const GeoDataVec2::Unit &xunit,
70  const GeoDataVec2::Unit &yunit)
71 {
72  d->m_screenXY.setX(x);
73  d->m_screenXY.setY(y);
74  d->m_screenXY.setXunits(xunit);
75  d->m_screenXY.setYunits(yunit);
76 }
77 
78 GeoDataVec2 GeoDataScreenOverlay::screenXY() const
79 {
80  return d->m_screenXY;
81 }
82 
83 void GeoDataScreenOverlay::setScreenXY(const GeoDataVec2 &vec2)
84 {
85  d->m_screenXY = vec2;
86 }
87 
88 void GeoDataScreenOverlay::setScreenXY(const qreal &x, const qreal &y, const GeoDataVec2::Unit &xunit,
89  const GeoDataVec2::Unit &yunit)
90 {
91  d->m_screenXY.setX(x);
92  d->m_screenXY.setY(y);
93  d->m_screenXY.setXunits(xunit);
94  d->m_screenXY.setYunits(yunit);
95 }
96 
97 GeoDataVec2 GeoDataScreenOverlay::rotationXY() const
98 {
99  return d->m_rotationXY;
100 }
101 
102 void GeoDataScreenOverlay::setRotationXY(const GeoDataVec2 &vec2)
103 {
104  d->m_rotationXY = vec2;
105 }
106 
107 void GeoDataScreenOverlay::setRotationXY(const qreal &x, const qreal &y, const GeoDataVec2::Unit &xunit,
108  const GeoDataVec2::Unit &yunit)
109 {
110  d->m_rotationXY.setX(x);
111  d->m_rotationXY.setY(y);
112  d->m_rotationXY.setXunits(xunit);
113  d->m_rotationXY.setYunits(yunit);
114 }
115 
116 GeoDataVec2 GeoDataScreenOverlay::size() const
117 {
118  return d->m_size;
119 }
120 
121 void GeoDataScreenOverlay::setSize(const GeoDataVec2 &vec2)
122 {
123  d->m_size = vec2;
124 }
125 
126 void GeoDataScreenOverlay::setSize(const qreal &x, const qreal &y, const GeoDataVec2::Unit &xunit,
127  const GeoDataVec2::Unit &yunit)
128 {
129  d->m_size.setX(x);
130  d->m_size.setY(y);
131  d->m_size.setXunits(xunit);
132  d->m_size.setYunits(yunit);
133 }
134 
135 qreal GeoDataScreenOverlay::rotation() const
136 {
137  return d->m_rotation;
138 }
139 
140 void GeoDataScreenOverlay::setRotation(qreal rotation)
141 {
142  d->m_rotation = rotation;
143 }
144 
145 }
Marble::GeoDataScreenOverlay::screenXY
GeoDataVec2 screenXY() const
Definition: GeoDataScreenOverlay.cpp:78
Marble::GeoDataScreenOverlay::overlayXY
GeoDataVec2 overlayXY() const
Definition: GeoDataScreenOverlay.cpp:59
Marble::GeoDataVec2::Unit
Unit
Definition: GeoDataVec2.h:25
Marble::GeoDataScreenOverlay::GeoDataScreenOverlay
GeoDataScreenOverlay()
Definition: GeoDataScreenOverlay.cpp:33
Marble::GeoDataScreenOverlay::setSize
void setSize(const GeoDataVec2 &vec2)
Definition: GeoDataScreenOverlay.cpp:121
Marble::GeoDataTypes::GeoDataScreenOverlayType
const char * GeoDataScreenOverlayType
Definition: GeoDataTypes.cpp:79
Marble::GeoDataScreenOverlay::rotationXY
GeoDataVec2 rotationXY() const
Definition: GeoDataScreenOverlay.cpp:97
Marble::GeoDataScreenOverlay
Definition: GeoDataScreenOverlay.h:22
Marble::GeoDataScreenOverlay::setScreenXY
void setScreenXY(const GeoDataVec2 &vec2)
Definition: GeoDataScreenOverlay.cpp:83
Marble::GeoDataScreenOverlay::size
GeoDataVec2 size() const
Definition: GeoDataScreenOverlay.cpp:116
GeoDataScreenOverlay.h
Marble::GeoDataVec2
Definition: GeoDataVec2.h:22
Marble::GeoDataScreenOverlay::setRotationXY
void setRotationXY(const GeoDataVec2 &vec2)
Definition: GeoDataScreenOverlay.cpp:102
Marble::GeoDataScreenOverlay::setOverlayXY
void setOverlayXY(const GeoDataVec2 &vec2)
Definition: GeoDataScreenOverlay.cpp:64
Marble::GeoDataScreenOverlay::operator=
GeoDataScreenOverlay & operator=(const GeoDataScreenOverlay &other)
Definition: GeoDataScreenOverlay.cpp:43
Marble::GeoDataScreenOverlay::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoNode.
Definition: GeoDataScreenOverlay.cpp:54
Marble::GeoDataScreenOverlay::setRotation
void setRotation(qreal rotation)
Definition: GeoDataScreenOverlay.cpp:140
Marble::GeoDataOverlay
Definition: GeoDataOverlay.h:27
Marble::GeoDataScreenOverlay::rotation
qreal rotation() const
Definition: GeoDataScreenOverlay.cpp:135
GeoDataTypes.h
Marble::GeoDataScreenOverlay::~GeoDataScreenOverlay
~GeoDataScreenOverlay()
Definition: GeoDataScreenOverlay.cpp:49
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 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