• 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
  • plasmoid
worldclock.cpp
Go to the documentation of this file.
1 // Copyright 2008 Henry de Valence <hdevalence@gmail.com>
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library. If not, see <http://www.gnu.org/licenses/>.
15 
16 
17 //Mine
18 #include "worldclock.h"
19 
20 //Qt
21 #include <QPainter>
22 #include <QRadialGradient>
23 #include <QBrush>
24 #include <QGraphicsSceneHoverEvent>
25 #include <QList>
26 #include <QSize>
27 #include <QRect>
28 #include <QTime>
29 #include <QDate>
30 #include <QDateTime>
31 
32 //KDE
33 #include <KDebug>
34 #include <KLocale>
35 #include <KConfigDialog>
36 #include <KConfigGroup>
37 #include <KTimeZone>
38 #include <KTimeZoneWidget>
39 #include <KSystemTimeZone>
40 
41 //Plasma
42 #include <Plasma/Applet>
43 #include <Plasma/DataEngine>
44 
45 //Marble
46 #include "MarbleGlobal.h"
47 #include "MarbleMap.h"
48 #include "MarbleModel.h"
49 #include "AbstractFloatItem.h"
50 #include "SunLocator.h"
51 #include "GeoPainter.h"
52 #include "LatLonEdit.h"
53 #include "ViewportParams.h"
54 
55 namespace Marble
56 {
57 
58 WorldClock::WorldClock(QObject *parent, const QVariantList &args)
59  : Plasma::Applet(parent, args),
60  m_map(0)
61 {
62  KGlobal::locale()->insertCatalog("marble");
63  KGlobal::locale()->insertCatalog("marble_qt");
64  KGlobal::locale()->insertCatalog("timezones4");
65  setHasConfigurationInterface(true);
66  setAcceptHoverEvents(true);
67  //The applet needs a 2:1 ratio
68  //so that the map fits properly
69  resize(QSize(400, 200));
70 }
71 
72 void WorldClock::init()
73 {
74  KConfigGroup cg = config();
75  m_map = new MarbleMap();
76 
77  //Set how we want the map to look
78  m_map->centerOn( cg.readEntry("rotation", -20), 0 );
79  m_map->setMapThemeId( "earth/bluemarble/bluemarble.dgml" );
80  m_map->setShowCompass ( false );
81  m_map->setShowClouds ( false );
82  m_map->setShowScaleBar ( false );
83  m_map->setShowGrid ( false );
84  m_map->setShowPlaces ( false );
85  m_map->setShowCities ( false );
86  m_map->setShowTerrain ( false );
87  m_map->setShowOtherPlaces( false );
88  // set the date time of the marble model otherwise the sun will not show up correctly
89  m_map->model()->setClockDateTime(QDateTime::currentDateTimeUtc());
90 
91  if(cg.readEntry("projection", static_cast<int>(Equirectangular)) == Mercator)
92  m_map->setProjection(Mercator);
93  else
94  m_map->setProjection(Equirectangular);
95 
96  foreach( RenderPlugin* item, m_map->renderPlugins() )
97  item->setVisible( false );
98 
99  //Set up the Sun to draw night/day shadow
100  m_map->setShowSunShading(true);
101  m_map->setShowCityLights(true);
102  m_map->setLockToSubSolarPoint(cg.readEntry("centersun", false ));
103  m_map->setSubSolarPointIconVisible(true);
104 
105  m_customTz = cg.readEntry("customtz", false );
106  m_locationkey = KSystemTimeZones::local().name();
107  if(m_customTz) {
108  QStringList tzlist = cg.readEntry("tzlist", QStringList());
109  m_locations = QMap<QString, KTimeZone>();
110  foreach( const QString& tzname, tzlist ) {
111  m_locations.insert(tzname, KSystemTimeZones::zone(tzname));
112  }
113  if(!m_locations.contains(m_locationkey))
114  m_locationkey = m_locations.keys().first();
115  } else {
116  m_locations = KSystemTimeZones::zones();
117  QList<QString> zones = m_locations.keys();
118  for (int i = 0; i < zones.size(); ++i ) {
119  KTimeZone curzone = m_locations.value( zones.at( i ) );
120  if ( curzone.latitude() == KTimeZone::UNKNOWN ||
121  curzone.longitude() == KTimeZone::UNKNOWN ) {
122  m_locations.remove( zones.at(i) );
123  }
124  }
125  }
126 
127  //Font sizes will change before painting
128  m_timeFont = QFont( "Helvetica", 12, QFont::Bold);
129  m_locationFont = QFont( "Helvetica", 12, QFont::Bold);
130  m_points = QHash<QString, QPoint>();
131  m_lastRect = QRect(0,0,0,0);
132  m_showDate = cg.readEntry("showdate", false);
133 
134  setTz( getZone() );
135 
136  Plasma::DataEngine *m_timeEngine = dataEngine("time");
137  m_timeEngine->connectSource( "Local", this, 6000, Plasma::AlignToMinute);
138 
139  connect(m_map, SIGNAL(repaintNeeded(QRegion)), this, SLOT(slotRepaint()));
140 }
141 
142 WorldClock::~WorldClock()
143 {
144  delete m_map;
145 }
146 
147 void WorldClock::resizeMap(bool changeAspect)
148 {
149  int width = 0;
150  int height = 0;
151  int radius = 0;
152  double ratio = static_cast<double>(m_lastRect.width()) /
153  static_cast<double>(m_lastRect.height());
154  if( m_map->projection() == Equirectangular ) {
155  kDebug() << "equirectangular with rect" << m_lastRect;
156  kDebug() << "w/h ratio:" << ratio;
157  if( ratio > 2 ) {
158  height = m_lastRect.height();
159  width = height*2;
160  radius = static_cast<int>(height/2);
161  } else {
162  width = m_lastRect.width();
163  height = static_cast<int>(width/2);
164  radius = static_cast<int>(width/4);
165  }
166  } else if( m_map->projection() == Mercator ) {
167  kDebug() << "mercator with rect" << m_lastRect;
168  kDebug() << "w/h ratio:" << ratio;
169  if( ratio > 1 ) {
170  height = m_lastRect.height();
171  width = height;
172  radius = static_cast<int>(width/4);
173  } else {
174  width = m_lastRect.width();
175  height = width;
176  radius = static_cast<int>(width/4);
177  }
178  }
179  kDebug() << "width, height, radius:" << width << height << radius;
180 
181  m_map->setSize(width, height);
182  m_map->setRadius( radius );
183  update();
184  if(changeAspect) {
185  QRectF curGeo = geometry();
186  setGeometry( curGeo.x(), curGeo.y(), static_cast<double>(width),
187  static_cast<double>(height) );
188  }
189 }
190 
191 void WorldClock::slotRepaint()
192 {
193  update();
194 }
195 
196 void WorldClock::dataUpdated(const QString &source,
197  const Plasma::DataEngine::Data &data)
198 {
199  Q_UNUSED(source)
200  //kDebug() << "Time = " << data["Time"].toTime();
201  m_localtime = QDateTime( QDate::currentDate(), data["Time"].toTime() );
202  m_time = KSystemTimeZones::local().convert(m_locations.value(m_locationkey),
203  m_localtime );
204  //kDebug() << "Adjusted Time = " << m_time;
205  update();
206 }
207 
208 void WorldClock::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
209 {
210  m_isHovered = false;
211  Applet::hoverLeaveEvent(event);
212  update();
213 }
214 void WorldClock::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
215 {
216  m_isHovered = true;
217  m_hover = event->pos() - m_t;
218  Applet::hoverEnterEvent(event);
219  setTz( getZone() );
220  update();
221 }
222 void WorldClock::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
223 {
224  m_hover = event->pos() - m_t;
225  Applet::hoverMoveEvent(event);
226  setTz( getZone() );
227  update();
228 }
229 
230 QString WorldClock::getZone()
231 {
232  qreal lat, lon;
233  // get the hover zone only if the hove point exists
234  bool ok = !m_hover.isNull() &&
235  m_map->viewport()->geoCoordinates( m_hover.x(), m_hover.y(), lon, lat );
236 
237  if( !ok ) {
238  return KSystemTimeZones::local().name();
239  }
240  QList<QString> zones = m_locations.keys();
241 
242  QString closest;
243  qreal mindist = 99999999999999999.9;
244 
245  for (int i = 0; i < zones.size(); ++i ) {
246  KTimeZone cz = m_locations.value( zones.at( i ) );
247  qreal dist = sqrt( pow(lat-cz.latitude(), 2) + pow(lon-cz.longitude(), 2) );
248  if ( dist < mindist ) {
249  mindist = dist;
250  closest = zones.at( i );
251  }
252  }
253  return m_locations.value( closest ).name();
254 }
255 
256 void WorldClock::setTz( QString newtz )
257 {
258  if ( newtz == m_locationkey ) { return; }
259  m_locationkey = newtz;
260  m_time = KSystemTimeZones::local().convert(m_locations.value(m_locationkey),
261  m_localtime );
262  recalculateFonts();
263 }
264 
265 void WorldClock::recalculatePoints()
266 {
267  int x = m_map->width();
268  int y = m_map->height();
269  m_points.insert( "topright", QPoint( ( x*0.666 ), ( y*0.25 ) ) );
270  m_points.insert( "topleft", QPoint( ( x*0.333 ), ( y*0.25 ) ) );
271  m_points.insert( "middleright", QPoint( ( x*0.666 ), ( y*0.58333 ) ) );
272  m_points.insert( "middleleft", QPoint( ( x*0.333 ), ( y*0.58333 ) ) );
273  m_points.insert( "bottomright", QPoint( ( x*0.666 ), ( y*0.75 ) ) );
274  m_points.insert( "bottomleft", QPoint( ( x*0.333 ), ( y*0.75 ) ) );
275  return;
276 
277 }
278 
279 void WorldClock::recalculateFonts( )
280 {
281  QString timestr;
282  if(m_showDate)
283  timestr = KGlobal::locale()->formatDateTime( m_time );
284  else
285  timestr = KGlobal::locale()->formatTime( m_time.time() );
286 
287  QString locstr = i18n( m_locationkey.toUtf8().data() );
288  locstr.remove( 0, locstr.lastIndexOf( '/' ) + 1 ).replace( '_', ' ' );
289  QRect timeRect( m_points.value( "topleft" ), m_points.value( "middleright" ) );
290  QRect locationRect( m_points.value( "middleleft" ), m_points.value( "bottomright" ) );
291 
292  m_locationFont = calculateFont(locstr, locationRect);
293  m_timeFont = calculateFont(timestr, timeRect);
294 }
295 
296 QFont WorldClock::calculateFont(const QString &text, const QRect &boundingBox) const
297 {
298  QFont resultFont( "Helvetica", 3, QFont::Bold);
299 
300  int unscaled = 0; // Avoid infinite loops, bug 189633
301  QRect lastBox;
302 
303  //we set very small defaults and then increase them
304  for ( int curSize = resultFont.pointSize()+1; unscaled<100; ++curSize ) {
305  resultFont.setPointSize(curSize);
306  QFontMetrics metrics( resultFont );
307  QRect rect = metrics.boundingRect( text );
308  if ( rect.width() > boundingBox.width() ||
309  rect.height() > boundingBox.height() ) {
310  break;
311  }
312 
313  if ( rect.width() > lastBox.width() ||
314  rect.height() > lastBox.height() ) {
315  unscaled = 0;
316  }
317  else {
318  ++unscaled;
319  }
320 
321  lastBox = rect;
322  }
323 
324  resultFont.setPointSize(resultFont.pointSize()-1);
325  return resultFont;
326 }
327 
328 void WorldClock::recalculateTranslation()
329 {
330  m_t = QPoint(static_cast<int>( (m_lastRect.width()/2) - (m_map->width()/2) ),
331  static_cast<int>( (m_lastRect.height()/2) - (m_map->height()/2) ));
332  m_t += m_lastRect.topLeft();
333 }
334 
335 void WorldClock::paintInterface(QPainter *p,
336  const QStyleOptionGraphicsItem *option,
337  const QRect &contentsRect)
338 {
339  Q_UNUSED(option)
340  if ( contentsRect != m_lastRect ) {
341  m_lastRect = contentsRect;
342  resizeMap();
343  recalculateTranslation();
344  recalculatePoints();
345  recalculateFonts();
346  }
347  p->setRenderHint( QPainter::TextAntialiasing , true );
348  p->setRenderHint( QPainter::Antialiasing , true );
349  p->setPen( Qt::NoPen );
350  //p->setBrush( QBrush( QColor( 0x00, 0x00, 0x00, 0xFF ) ) );
351  //p->drawRect( m_lastRect );
352  QPixmap pixmap( m_map->width(), m_map->height() );
353  pixmap.fill( Qt::transparent );
354  GeoPainter gp( &pixmap, m_map->viewport(),
355  Marble::NormalQuality );
356  QRect mapRect( 0, 0, m_map->width(), m_map->height() );
357  m_map->paint(gp, mapRect );
358  p->drawPixmap( m_t, pixmap );
359 
360  if ( !m_isHovered ) {
361  setTz( KSystemTimeZones::local().name() );
362  }
363 
364  //Show the location on the map
365  qreal tzx = 0;
366  qreal tzy = 0;
367  qreal lon = m_locations.value(m_locationkey).longitude() * DEG2RAD;
368  qreal lat = m_locations.value(m_locationkey).latitude() * DEG2RAD;
369  bool ok = m_map->viewport()->screenCoordinates(lon, lat, tzx, tzy);
370  if ( ok /*&& m_isHovered*/ ) {
371  QPoint tz( tzx, tzy );
372  tz += m_t;
373  int radius = m_lastRect.width() / 40;
374  QRadialGradient grad( tz, radius );
375  grad.setColorAt( 0, QColor( 0xFF, 0xFF, 0x00, 0xFF ) );
376  grad.setColorAt( 0.33, QColor( 0xFF, 0xFF, 0x00, 0x46 ) );
377  grad.setColorAt( 0.66, QColor( 0xFF, 0xFF, 0x00, 0x14 ) );
378  grad.setColorAt( 1, QColor( 0xFF, 0xFF, 0x00, 0x00 ) );
379  p->setBrush( QBrush( grad ) );
380  p->drawEllipse( tz, radius, radius );
381  }
382 
383  p->setPen( QColor( 0xFF, 0xFF, 0xFF ) );
384 
385  QString locstr = i18n( m_locationkey.toUtf8().data() );
386  locstr.remove( 0, locstr.lastIndexOf( '/' ) + 1 ).replace( '_', ' ' );
387 
388  QString timestr;
389  if(m_showDate)
390  timestr = KGlobal::locale()->formatDateTime( m_time );
391  else
392  timestr = KGlobal::locale()->formatTime( m_time.time() );
393 
394  p->setFont( m_timeFont );
395  p->drawText( QRect( m_points.value( "topleft" ) + m_t,
396  m_points.value( "middleright" ) + m_t ),
397  Qt::AlignCenter, timestr );
398 
399  p->setFont( m_locationFont );
400  p->drawText( QRect( m_points.value( "middleleft" ) + m_t,
401  m_points.value( "bottomright" ) + m_t ),
402  Qt::AlignCenter, locstr );
403 }
404 
405 void WorldClock::createConfigurationInterface(KConfigDialog *parent)
406 {
407  QWidget *widget = new QWidget();
408  ui.setupUi(widget);
409  parent->setButtons(KDialog::Ok | KDialog::Apply | KDialog::Cancel);
410 
411  KConfigGroup cg = config();
412 
413  ui.longitudeEdit->setValue(cg.readEntry("rotation", -20));
414 
415  if(cg.readEntry("projection", static_cast<int>(Equirectangular)) == Mercator)
416  ui.projection->setCurrentIndex(1);
417  else //Equirectangular is the default projection
418  ui.projection->setCurrentIndex(0);
419 
420  if(cg.readEntry("daylight", false ))
421  ui.daylightButton->setChecked(true);
422 
423  if(cg.readEntry("showdate", false ))
424  ui.showdate->setChecked(true);
425 
426  if(cg.readEntry("customtz", false ))
427  ui.customTz->setChecked(true);
428 
429  ui.tzWidget->setSelectionMode( QTreeView::MultiSelection );
430  foreach(const QString& tz, cg.readEntry("tzlist")) {
431  ui.tzWidget->setSelected(tz,true);
432  }
433 
434  connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
435  connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
436  parent->addPage(widget, parent->windowTitle(), icon());
437 }
438 
439 void WorldClock::configAccepted()
440 {
441  KConfigGroup cg = config();
442 
443  if( ui.daylightButton->isChecked() )
444  m_map->setSubSolarPointIconVisible(true);
445  else {
446  m_map->centerOn(ui.longitudeEdit->value(), 0);
447  update();
448  }
449 
450  m_showDate = ui.showdate->isChecked();
451  m_customTz = ui.customTz->isChecked();
452 
453  if(m_customTz) {
454  QStringList tzlist = ui.tzWidget->selection();
455  kDebug() << "\tSetting TZLIST";
456  kDebug() << tzlist;
457  QMap<QString, KTimeZone> selectedZones;
458  selectedZones.insert(KSystemTimeZones::local().name(),
459  KSystemTimeZones::local());
460  foreach( const QString& tzname, tzlist ) {
461  selectedZones.insert(tzname, KSystemTimeZones::zone(tzname));
462  }
463  cg.writeEntry("tzlist",tzlist);
464  m_locations = selectedZones;
465  if(!m_locations.contains(m_locationkey))
466  m_locationkey = m_locations.keys().first();
467  }
468 
469  // What projection? note: +1 because the spherical projection is 0
470  if((ui.projection->currentIndex() + 1) != cg.readEntry("projection",
471  static_cast<int>(Equirectangular)) )
472  {
473  switch ( ui.projection->currentIndex() ) {
474  case 1:
475  //kDebug() << "case 1, setting proj to mercator";
476  m_map->setProjection(Mercator);
477  update();
478  resizeMap(true);
479  cg.writeEntry("projection", static_cast<int>(Mercator));
480  break;
481  //case 0 (and anything else that pops up)
482  default:
483  //kDebug() << "case default, setting proj to Equirectangular";
484  m_map->setProjection(Equirectangular);
485  update();
486  resizeMap(true);
487  cg.writeEntry("projection", static_cast<int>(Equirectangular));
488  break;
489  }
490  }
491 
492  cg.writeEntry("rotation", ui.longitudeEdit->value());
493  cg.writeEntry("centersun", ui.daylightButton->isChecked());
494  cg.writeEntry("showdate", ui.showdate->isChecked());
495  cg.writeEntry("customtz", ui.customTz->isChecked());
496 
497  emit configNeedsSaving();
498 }
499 
500 } //ns Marble
501 
502 #include "worldclock.moc"
QPainter
Marble::WorldClock::WorldClock
WorldClock(QObject *parent, const QVariantList &args)
Definition: worldclock.cpp:58
Marble::MarbleMap::setLockToSubSolarPoint
void setLockToSubSolarPoint(bool visible)
Set the globe locked to the sub solar point.
Definition: MarbleMap.cpp:1106
Marble::ViewportParams::geoCoordinates
bool geoCoordinates(const int x, const int y, qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Degree) const
Get the earth coordinates corresponding to a pixel in the map.
Definition: ViewportParams.cpp:391
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
MarbleModel.h
This file contains the headers for MarbleModel.
AbstractFloatItem.h
QWidget
Marble::WorldClock::init
void init()
Definition: worldclock.cpp:72
Marble::MarbleMap::setSubSolarPointIconVisible
void setSubSolarPointIconVisible(bool visible)
Set whether the sun icon is shown in the sub solar point.
Definition: MarbleMap.cpp:1125
SunLocator.h
QObject
Marble::MarbleMap::viewport
ViewportParams * viewport()
Definition: MarbleMap.cpp:302
Marble::MarbleMap::model
MarbleModel * model() const
Return the model that this view shows.
Definition: MarbleMap.cpp:297
Marble::MarbleMap::setMapThemeId
void setMapThemeId(const QString &maptheme)
Set a new map theme.
Definition: MarbleMap.cpp:786
Marble::Equirectangular
Flat projection ("plate carree")
Definition: MarbleGlobal.h:46
Marble::MarbleMap::width
int width() const
Definition: MarbleMap.cpp:368
MarbleMap.h
This file contains the headers for MarbleMap.
Marble::MarbleMap::setSize
void setSize(int width, int height)
Definition: MarbleMap.cpp:351
Marble::WorldClock::paintInterface
void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
Definition: worldclock.cpp:335
Marble::Mercator
Mercator projection.
Definition: MarbleGlobal.h:47
Marble::WorldClock::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: worldclock.cpp:214
Marble::MarbleMap::setShowCompass
void setShowCompass(bool visible)
Set whether the compass overlay is visible.
Definition: MarbleMap.cpp:1060
Marble::MarbleMap::setShowPlaces
void setShowPlaces(bool visible)
Set whether the place mark overlay is visible.
Definition: MarbleMap.cpp:1142
Marble::MarbleMap::setRadius
void setRadius(int radius)
Set the radius of the globe in pixels.
Definition: MarbleMap.cpp:383
Marble::NormalQuality
Normal quality.
Definition: MarbleGlobal.h:83
Marble::ViewportParams::screenCoordinates
bool screenCoordinates(const qreal lon, const qreal lat, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
Definition: ViewportParams.cpp:357
Marble::RenderPlugin::setVisible
void setVisible(bool visible)
settting visible
Definition: RenderPlugin.cpp:149
Marble::MarbleMap::paint
void paint(GeoPainter &painter, const QRect &dirtyRect)
Paint the map using a give painter.
Definition: MarbleMap.cpp:752
GeoPainter.h
MarbleGlobal.h
Marble::MarbleModel::setClockDateTime
void setClockDateTime(const QDateTime &datetime)
Definition: MarbleModel.cpp:615
Marble::MarbleMap::setShowSunShading
void setShowSunShading(bool visible)
Set whether the night shadow is visible.
Definition: MarbleMap.cpp:1095
Marble::DEG2RAD
const qreal DEG2RAD
Definition: MarbleGlobal.h:200
Marble::WorldClock::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: worldclock.cpp:208
Marble::WorldClock::configAccepted
void configAccepted()
Definition: worldclock.cpp:439
Marble::MarbleMap::renderPlugins
QList< RenderPlugin * > renderPlugins() const
Returns a list of all RenderPlugins in the model, this includes float items.
Definition: MarbleMap.cpp:1262
Marble::MarbleMap
A class that can paint a view of the earth.
Definition: MarbleMap.h:90
Marble::MarbleMap::setProjection
void setProjection(Projection projection)
Set the Projection used for the map.
Definition: MarbleMap.cpp:679
Marble::MarbleMap::setShowTerrain
void setShowTerrain(bool visible)
Set whether the terrain place mark overlay is visible.
Definition: MarbleMap.cpp:1152
worldclock.h
Marble::WorldClock::createConfigurationInterface
void createConfigurationInterface(KConfigDialog *parent)
Definition: worldclock.cpp:405
Marble::MarbleMap::height
int height() const
Definition: MarbleMap.cpp:373
ViewportParams.h
This file contains the headers for ViewportParams.
Marble::MarbleMap::setShowClouds
void setShowClouds(bool visible)
Set whether the cloud cover is visible.
Definition: MarbleMap.cpp:1088
Marble::MarbleMap::setShowGrid
void setShowGrid(bool visible)
Set whether the coordinate grid overlay is visible.
Definition: MarbleMap.cpp:1137
Marble::WorldClock::hoverMoveEvent
void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
Definition: worldclock.cpp:222
LatLonEdit.h
Marble::MarbleMap::setShowOtherPlaces
void setShowOtherPlaces(bool visible)
Set whether the other places overlay is visible.
Definition: MarbleMap.cpp:1157
Marble::WorldClock::dataUpdated
void dataUpdated(const QString &source, const Plasma::DataEngine::Data &data)
Definition: worldclock.cpp:196
Marble::MarbleMap::projection
Projection projection() const
Get the Projection used for the map.
Definition: MarbleMap.cpp:674
Marble::MarbleMap::centerOn
void centerOn(const qreal lon, const qreal lat)
Center the view on a geographical point.
Definition: MarbleMap.cpp:657
Marble::MarbleMap::setShowCityLights
void setShowCityLights(bool visible)
Set whether city lights instead of night shadow are visible.
Definition: MarbleMap.cpp:1100
Marble::WorldClock::~WorldClock
~WorldClock()
Definition: worldclock.cpp:142
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
Marble::MarbleMap::setShowCities
void setShowCities(bool visible)
Set whether the city place mark overlay is visible.
Definition: MarbleMap.cpp:1147
Marble::MarbleMap::setShowScaleBar
void setShowScaleBar(bool visible)
Set whether the scale bar overlay is visible.
Definition: MarbleMap.cpp:1055
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:53 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