• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • kde-4.x
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • mapscale
MapScaleFloatItem.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 2008 Torsten Rahn <[email protected]>
9 // Copyright 2012 Illya Kovalevskyy <[email protected]>
10 //
11 
12 #include "MapScaleFloatItem.h"
13 
14 #include <QContextMenuEvent>
15 #include <QDebug>
16 #include <QHelpEvent>
17 #include <QRect>
18 #include <QPainter>
19 #include <QPushButton>
20 #include <QMenu>
21 #include <QToolTip>
22 
23 #include "ui_MapScaleConfigWidget.h"
24 #include "MarbleColors.h"
25 #include "MarbleDebug.h"
26 #include "MarbleGlobal.h"
27 #include "projections/AbstractProjection.h"
28 #include "MarbleLocale.h"
29 #include "MarbleModel.h"
30 #include "ViewportParams.h"
31 #include "GeoDataLatLonAltBox.h"
32 
33 namespace Marble
34 {
35 
36 MapScaleFloatItem::MapScaleFloatItem( const MarbleModel *marbleModel )
37  : AbstractFloatItem( marbleModel, QPointF( 10.5, -10.5 ), QSizeF( 0.0, 40.0 ) ),
38  m_configDialog(nullptr),
39  m_radius(0),
40  m_target(QString()),
41  m_leftBarMargin(0),
42  m_rightBarMargin(0),
43  m_scaleBarWidth(0),
44  m_viewportWidth(0),
45  m_scaleBarHeight(5),
46  m_scaleBarDistance(0.0),
47  m_bestDivisor(0),
48  m_pixelInterval(0),
49  m_valueInterval(0),
50  m_scaleInitDone( false ),
51  m_showRatioScale( false ),
52  m_contextMenu( nullptr ),
53  m_minimized(false),
54  m_widthScaleFactor(2)
55 {
56  m_minimizeAction = new QAction(tr("Minimize"), this);
57  m_minimizeAction->setCheckable(true);
58  m_minimizeAction->setChecked(m_minimized);
59  connect(m_minimizeAction, SIGNAL(triggered()), this, SLOT(toggleMinimized()));
60 }
61 
62 MapScaleFloatItem::~MapScaleFloatItem()
63 {
64 }
65 
66 QStringList MapScaleFloatItem::backendTypes() const
67 {
68  return QStringList(QStringLiteral("mapscale"));
69 }
70 
71 QString MapScaleFloatItem::name() const
72 {
73  return tr("Scale Bar");
74 }
75 
76 QString MapScaleFloatItem::guiString() const
77 {
78  return tr("&Scale Bar");
79 }
80 
81 QString MapScaleFloatItem::nameId() const
82 {
83  return QStringLiteral("scalebar");
84 }
85 
86 QString MapScaleFloatItem::version() const
87 {
88  return QStringLiteral("1.1");
89 }
90 
91 QString MapScaleFloatItem::description() const
92 {
93  return tr("This is a float item that provides a map scale.");
94 }
95 
96 QString MapScaleFloatItem::copyrightYears() const
97 {
98  return QStringLiteral("2008, 2010, 2012");
99 }
100 
101 QVector<PluginAuthor> MapScaleFloatItem::pluginAuthors() const
102 {
103  return QVector<PluginAuthor>()
104  << PluginAuthor(QStringLiteral("Torsten Rahn"), QStringLiteral("[email protected]"), tr("Original Developer"))
105  << PluginAuthor(QStringLiteral("Khanh-Nhan Nguyen"), QStringLiteral("[email protected]"))
106  << PluginAuthor(QStringLiteral("Illya Kovalevskyy"), QStringLiteral("[email protected]"));
107 }
108 
109 QIcon MapScaleFloatItem::icon () const
110 {
111  return QIcon(QStringLiteral(":/icons/scalebar.png"));
112 }
113 
114 
115 void MapScaleFloatItem::initialize ()
116 {
117 }
118 
119 bool MapScaleFloatItem::isInitialized () const
120 {
121  return true;
122 }
123 
124 void MapScaleFloatItem::setProjection( const ViewportParams *viewport )
125 {
126  int viewportWidth = viewport->width();
127 
128  QString target = marbleModel()->planetId();
129 
130  if ( !( m_radius == viewport->radius()
131  && viewportWidth == m_viewportWidth
132  && m_target == target
133  && m_scaleInitDone ) )
134  {
135  int fontHeight = QFontMetrics( font() ).ascent();
136  if (m_showRatioScale) {
137  setContentSize( QSizeF( viewport->width() / m_widthScaleFactor,
138  fontHeight + 3 + m_scaleBarHeight + fontHeight + 7 ) );
139  } else {
140  setContentSize( QSizeF( viewport->width() / m_widthScaleFactor,
141  fontHeight + 3 + m_scaleBarHeight ) );
142  }
143 
144  m_leftBarMargin = QFontMetrics( font() ).boundingRect( "0" ).width() / 2;
145  m_rightBarMargin = QFontMetrics( font() ).boundingRect( "0000" ).width() / 2;
146 
147  m_scaleBarWidth = contentSize().width() - m_leftBarMargin - m_rightBarMargin;
148  m_viewportWidth = viewport->width();
149  m_radius = viewport->radius();
150  m_scaleInitDone = true;
151 
152  m_pixel2Length = marbleModel()->planetRadius() /
153  (qreal)(viewport->radius());
154 
155  if ( viewport->currentProjection()->surfaceType() == AbstractProjection::Cylindrical )
156  {
157  qreal centerLatitude = viewport->viewLatLonAltBox().center().latitude();
158  // For flat maps we calculate the length of the 90 deg section of the
159  // central latitude circle. For flat maps this distance matches
160  // the pixel based radius propertyy.
161  m_pixel2Length *= M_PI / 2 * cos( centerLatitude );
162  }
163 
164  m_scaleBarDistance = (qreal)(m_scaleBarWidth) * m_pixel2Length;
165 
166  const MarbleLocale::MeasurementSystem measurementSystem =
167  MarbleGlobal::getInstance()->locale()->measurementSystem();
168 
169  if ( measurementSystem != MarbleLocale::MetricSystem ) {
170  m_scaleBarDistance *= KM2MI;
171  } else if (measurementSystem == MarbleLocale::NauticalSystem) {
172  m_scaleBarDistance *= KM2NM;
173  }
174 
175  calcScaleBar();
176 
177  update();
178  }
179 
180  AbstractFloatItem::setProjection( viewport );
181 }
182 
183 void MapScaleFloatItem::paintContent( QPainter *painter )
184 {
185  painter->save();
186 
187  painter->setRenderHint( QPainter::Antialiasing, true );
188 
189  int fontHeight = QFontMetrics( font() ).ascent();
190 
191  //calculate scale ratio
192  qreal displayMMPerPixel = 1.0 * painter->device()->widthMM() / painter->device()->width();
193  qreal ratio = m_pixel2Length / (displayMMPerPixel * MM2M);
194 
195  //round ratio to 3 most significant digits, assume that ratio >= 1, otherwise it may display "1 : 0"
196  //i made this assumption because as the primary use case we do not need to zoom in that much
197  qreal power = 1;
198  int iRatio = (int)(ratio + 0.5); //round ratio to the nearest integer
199  while (iRatio >= 1000) {
200  iRatio /= 10;
201  power *= 10;
202  }
203  iRatio *= power;
204  m_ratioString.setNum(iRatio);
205  m_ratioString = QLatin1String("1 : ") + m_ratioString;
206 
207  painter->setPen( QColor( Qt::darkGray ) );
208  painter->setBrush( QColor( Qt::darkGray ) );
209  painter->drawRect( m_leftBarMargin, fontHeight + 3,
210  m_scaleBarWidth,
211  m_scaleBarHeight );
212 
213  painter->setPen( QColor( Qt::black ) );
214  painter->setBrush( QColor( Qt::white ) );
215  painter->drawRect( m_leftBarMargin, fontHeight + 3,
216  m_bestDivisor * m_pixelInterval, m_scaleBarHeight );
217 
218  painter->setPen( QColor( Oxygen::aluminumGray4 ) );
219  painter->drawLine( m_leftBarMargin + 1, fontHeight + 2 + m_scaleBarHeight,
220  m_leftBarMargin + m_bestDivisor * m_pixelInterval - 1, fontHeight + 2 + m_scaleBarHeight );
221  painter->setPen( QColor( Qt::black ) );
222 
223  painter->setBrush( QColor( Qt::black ) );
224 
225  QString intervalStr;
226  int lastStringEnds = 0;
227  int currentStringBegin = 0;
228 
229  for ( int j = 0; j <= m_bestDivisor; j += 2 ) {
230  if ( j < m_bestDivisor ) {
231  painter->drawRect( m_leftBarMargin + j * m_pixelInterval,
232  fontHeight + 3, m_pixelInterval - 1,
233  m_scaleBarHeight );
234 
235  painter->setPen( QColor( Oxygen::aluminumGray5 ) );
236  painter->drawLine( m_leftBarMargin + j * m_pixelInterval + 1, fontHeight + 4,
237  m_leftBarMargin + (j + 1) * m_pixelInterval - 1, fontHeight + 4 );
238  painter->setPen( QColor( Qt::black ) );
239  }
240 
241  MarbleLocale::MeasurementSystem distanceUnit;
242  distanceUnit = MarbleGlobal::getInstance()->locale()->measurementSystem();
243 
244  QString unit = tr("km");
245  switch ( distanceUnit ) {
246  case MarbleLocale::MetricSystem:
247  if ( m_bestDivisor * m_valueInterval > 10000 ) {
248  unit = tr("km");
249  intervalStr.setNum( j * m_valueInterval / 1000 );
250  }
251  else {
252  unit = tr("m");
253  intervalStr.setNum( j * m_valueInterval );
254  }
255  break;
256  case MarbleLocale::ImperialSystem:
257  unit = tr("mi");
258  intervalStr.setNum( j * m_valueInterval / 1000 );
259 
260  if ( m_bestDivisor * m_valueInterval > 3800 ) {
261  intervalStr.setNum( j * m_valueInterval / 1000 );
262  }
263  else {
264  intervalStr.setNum( qreal(j * m_valueInterval ) / 1000.0, 'f', 2 );
265  }
266  break;
267  case MarbleLocale::NauticalSystem:
268  unit = tr("nm");
269  intervalStr.setNum( j * m_valueInterval / 1000 );
270 
271  if ( m_bestDivisor * m_valueInterval > 3800 ) {
272  intervalStr.setNum( j * m_valueInterval / 1000 );
273  }
274  else {
275  intervalStr.setNum( qreal(j * m_valueInterval ) / 1000.0, 'f', 2 );
276  }
277  break;
278  }
279 
280  painter->setFont( font() );
281 
282  if ( j == 0 ) {
283  const QString text = QLatin1String("0 ") + unit;
284  painter->drawText(0, fontHeight, text);
285  lastStringEnds = QFontMetrics(font()).width(text);
286  continue;
287  }
288 
289  if( j == m_bestDivisor ) {
290  currentStringBegin = ( j * m_pixelInterval
291  - QFontMetrics( font() ).boundingRect( intervalStr ).width() );
292  }
293  else {
294  currentStringBegin = ( j * m_pixelInterval
295  - QFontMetrics( font() ).width( intervalStr ) / 2 );
296  }
297 
298  if ( lastStringEnds < currentStringBegin ) {
299  painter->drawText( currentStringBegin, fontHeight, intervalStr );
300  lastStringEnds = currentStringBegin + QFontMetrics( font() ).width( intervalStr );
301  }
302  }
303 
304  int leftRatioIndent = m_leftBarMargin + (m_scaleBarWidth - QFontMetrics( font() ).width(m_ratioString) ) / 2;
305  painter->drawText( leftRatioIndent, fontHeight + 3 + m_scaleBarHeight + fontHeight + 5, m_ratioString );
306 
307  painter->restore();
308 }
309 
310 void MapScaleFloatItem::calcScaleBar()
311 {
312  qreal magnitude = 1;
313 
314  // First we calculate the exact length of the whole area that is possibly
315  // available to the scalebar in kilometers
316  int magValue = (int)( m_scaleBarDistance );
317 
318  // We calculate the two most significant digits of the km-scalebar-length
319  // and store them in magValue.
320  while ( magValue >= 100 ) {
321  magValue /= 10;
322  magnitude *= 10;
323  }
324 
325  m_bestDivisor = 4;
326  int bestMagValue = 1;
327 
328  for ( int i = 0; i < magValue; i++ ) {
329  // We try to find the lowest divisor between 4 and 8 that
330  // divides magValue without remainder.
331  for ( int j = 4; j < 9; j++ ) {
332  if ( ( magValue - i ) % j == 0 ) {
333  // We store the very first result we find and store
334  // m_bestDivisor and bestMagValue as a final result.
335  m_bestDivisor = j;
336  bestMagValue = magValue - i;
337 
338  // Stop all for loops and end search
339  i = magValue;
340  j = 9;
341  }
342  }
343 
344  // If magValue doesn't divide through values between 4 and 8
345  // (e.g. because it's a prime number) try again with magValue
346  // decreased by i.
347  }
348 
349  m_pixelInterval = (int)( m_scaleBarWidth * (qreal)( bestMagValue )
350  / (qreal)( magValue ) / m_bestDivisor );
351  m_valueInterval = (int)( bestMagValue * magnitude / m_bestDivisor );
352 }
353 
354 QDialog *MapScaleFloatItem::configDialog()
355 {
356  if ( !m_configDialog ) {
357  // Initializing configuration dialog
358  m_configDialog = new QDialog();
359  ui_configWidget = new Ui::MapScaleConfigWidget;
360  ui_configWidget->setupUi( m_configDialog );
361 
362  readSettings();
363 
364  connect( ui_configWidget->m_buttonBox, SIGNAL(accepted()),
365  SLOT(writeSettings()) );
366  connect( ui_configWidget->m_buttonBox, SIGNAL(rejected()),
367  SLOT(readSettings()) );
368 
369  QPushButton *applyButton = ui_configWidget->m_buttonBox->button( QDialogButtonBox::Apply );
370  connect( applyButton, SIGNAL(clicked()) ,
371  this, SLOT(writeSettings()) );
372  }
373  return m_configDialog;
374 }
375 
376 void MapScaleFloatItem::contextMenuEvent( QWidget *w, QContextMenuEvent *e )
377 {
378  if ( !m_contextMenu ) {
379  m_contextMenu = contextMenu();
380 
381  for( QAction *action: m_contextMenu->actions() ) {
382  if ( action->text() == tr( "&Configure..." ) ) {
383  m_contextMenu->removeAction( action );
384  break;
385  }
386  }
387 
388  QAction *toggleAction = m_contextMenu->addAction( tr("&Ratio Scale"), this,
389  SLOT(toggleRatioScaleVisibility()) );
390  toggleAction->setCheckable( true );
391  toggleAction->setChecked( m_showRatioScale );
392 
393  m_contextMenu->addAction(m_minimizeAction);
394  }
395 
396  Q_ASSERT( m_contextMenu );
397  m_contextMenu->exec( w->mapToGlobal( e->pos() ) );
398 }
399 
400 void MapScaleFloatItem::toolTipEvent( QHelpEvent *e )
401 {
402  QToolTip::showText( e->globalPos(), m_ratioString );
403 }
404 
405 void MapScaleFloatItem::readSettings()
406 {
407  if ( !m_configDialog )
408  return;
409 
410  if ( m_showRatioScale ) {
411  ui_configWidget->m_showRatioScaleCheckBox->setCheckState( Qt::Checked );
412  } else {
413  ui_configWidget->m_showRatioScaleCheckBox->setCheckState( Qt::Unchecked );
414  }
415 
416  ui_configWidget->m_minimizeCheckBox->setChecked(m_minimized);
417 }
418 
419 void MapScaleFloatItem::writeSettings()
420 {
421  if ( ui_configWidget->m_showRatioScaleCheckBox->checkState() == Qt::Checked ) {
422  m_showRatioScale = true;
423  } else {
424  m_showRatioScale = false;
425  }
426 
427  if (m_minimized != ui_configWidget->m_minimizeCheckBox->isChecked()) {
428  toggleMinimized();
429  }
430 
431  emit settingsChanged( nameId() );
432 }
433 
434 void MapScaleFloatItem::toggleRatioScaleVisibility()
435 {
436  m_showRatioScale = !m_showRatioScale;
437  readSettings();
438  emit settingsChanged( nameId() );
439 }
440 
441 void MapScaleFloatItem::toggleMinimized()
442 {
443  m_minimized = !m_minimized;
444  ui_configWidget->m_minimizeCheckBox->setChecked(m_minimized);
445  m_minimizeAction->setChecked(m_minimized);
446  readSettings();
447  emit settingsChanged( nameId() );
448 
449  if (m_minimized == true) {
450  m_widthScaleFactor = 4;
451  } else {
452  m_widthScaleFactor = 2;
453  }
454 }
455 
456 }
457 
458 #include "moc_MapScaleFloatItem.cpp"
Marble::MapScaleFloatItem::contextMenuEvent
void contextMenuEvent(QWidget *w, QContextMenuEvent *e) override
Definition: MapScaleFloatItem.cpp:376
QWidget
MarbleColors.h
Marble::Oxygen::aluminumGray5
QColor const aluminumGray5
Definition: MarbleColors.cpp:85
QFontMetrics::ascent
int ascent() const
Marble::MarbleLocale::NauticalSystem
Definition: MarbleLocale.h:40
Marble::MarbleLocale::measurementSystem
MarbleLocale::MeasurementSystem measurementSystem() const
Definition: MarbleLocale.cpp:48
Marble::MapScaleFloatItem::copyrightYears
QString copyrightYears() const override
Definition: MapScaleFloatItem.cpp:96
Marble::FrameGraphicsItem::setContentSize
void setContentSize(const QSizeF &size) override
Sets the size of the content of the item.
Definition: FrameGraphicsItem.cpp:232
QPainter::setRenderHint
void setRenderHint(RenderHint hint, bool on)
Marble::MM2M
const qreal MM2M
Definition: MarbleGlobal.h:215
Marble::MapScaleFloatItem::configDialog
QDialog * configDialog() override
Returns a pointer to the configuration dialog of the plugin.
Definition: MapScaleFloatItem.cpp:354
Marble::MapScaleFloatItem::MapScaleFloatItem
MapScaleFloatItem(const MarbleModel *marbleModel=nullptr)
Definition: MapScaleFloatItem.cpp:36
Marble::MapScaleFloatItem::guiString
QString guiString() const override
Definition: MapScaleFloatItem.cpp:76
QAction::setChecked
void setChecked(bool)
MarbleModel.h
This file contains the headers for MarbleModel.
MapScaleFloatItem.h
Marble::MapScaleFloatItem::initialize
void initialize() override
Definition: MapScaleFloatItem.cpp:115
Marble::PluginAuthor
Definition: PluginInterface.h:29
QMenu::addAction
void addAction(QAction *action)
Marble::MapScaleFloatItem::paintContent
void paintContent(QPainter *painter) override
Here the items paint their content.
Definition: MapScaleFloatItem.cpp:183
QWidget::mapToGlobal
QPoint mapToGlobal(const QPoint &pos) const
QPainter::save
void save()
Marble::ViewportParams::viewLatLonAltBox
const GeoDataLatLonAltBox & viewLatLonAltBox() const
Definition: ViewportParams.cpp:354
QFontMetrics
QPainter::drawLine
void drawLine(const QLineF &line)
QToolTip::showText
void showText(const QPoint &pos, const QString &text, QWidget *w)
MarbleDebug.h
Marble::MarbleLocale::MeasurementSystem
MeasurementSystem
Definition: MarbleLocale.h:37
QObject::tr
QString tr(const char *sourceText, const char *disambiguation, int n)
AbstractProjection.h
This file contains the headers for AbstractProjection.
QPointF
Marble::MapScaleFloatItem::toolTipEvent
void toolTipEvent(QHelpEvent *e) override
Definition: MapScaleFloatItem.cpp:400
QPaintDevice::width
int width() const
QPainter::drawRect
void drawRect(const QRectF &rectangle)
QFontMetrics::boundingRect
QRect boundingRect(QChar ch) const
QPainter::setFont
void setFont(const QFont &font)
Marble::MapScaleFloatItem::setProjection
void setProjection(const ViewportParams *viewport) override
Definition: MapScaleFloatItem.cpp:124
Marble::FrameGraphicsItem::contentSize
QSizeF contentSize() const override
Returns the size of the content of the MarbleGraphicsItem.
Definition: FrameGraphicsItem.cpp:210
Marble::ViewportParams::width
int width() const
Definition: ViewportParams.cpp:305
QContextMenuEvent
QPainter::setPen
void setPen(const QColor &color)
QHelpEvent::globalPos
const QPoint & globalPos() const
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:44
Marble::GeoDataLatLonAltBox::center
GeoDataCoordinates center() const override
returns the center of this box
Definition: GeoDataLatLonAltBox.cpp:148
QPainter
QPaintDevice::widthMM
int widthMM() const
QPainter::device
QPaintDevice * device() const
QPainter::setBrush
void setBrush(const QBrush &brush)
QPainter::drawText
void drawText(const QPointF &position, const QString &text)
Marble::MarbleGlobal::locale
MarbleLocale * locale() const
Definition: MarbleGlobal.cpp:48
Marble::ViewportParams::currentProjection
const AbstractProjection * currentProjection() const
Definition: ViewportParams.cpp:161
QString
QColor
MarbleLocale.h
MarbleGlobal.h
QMenu::exec
QAction * exec()
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:46
Marble::MapScaleFloatItem::icon
QIcon icon() const override
Returns an icon for the plugin.
Definition: MapScaleFloatItem.cpp:109
Marble::KM2MI
const qreal KM2MI
Definition: MarbleGlobal.h:191
Marble::MapScaleFloatItem::~MapScaleFloatItem
~MapScaleFloatItem() override
Definition: MapScaleFloatItem.cpp:62
M_PI
#define M_PI
Definition: sgp4unit.h:52
QFontMetrics::width
int width(const QString &text, int len) const
ViewportParams.h
This file contains the headers for ViewportParams.
Marble::MapScaleFloatItem::pluginAuthors
QVector< PluginAuthor > pluginAuthors() const override
Definition: MapScaleFloatItem.cpp:101
QAction::setCheckable
void setCheckable(bool)
Marble::MarbleGlobal::getInstance
static MarbleGlobal * getInstance()
Definition: MarbleGlobal.cpp:42
Marble::AbstractProjection::Cylindrical
Definition: AbstractProjection.h:57
QPainter::restore
void restore()
Marble::MarbleLocale::MetricSystem
Definition: MarbleLocale.h:38
Marble::MapScaleFloatItem::name
QString name() const override
Returns the user-visible name of the plugin.
Definition: MapScaleFloatItem.cpp:71
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:91
QContextMenuEvent::pos
const QPoint & pos() const
QRect::width
int width() const
QVector
QSizeF
QLatin1String
Marble::ViewportParams::radius
int radius() const
Definition: ViewportParams.cpp:222
QString::setNum
QString & setNum(short n, int base)
GeoDataLatLonAltBox.h
Marble::MapScaleFloatItem::isInitialized
bool isInitialized() const override
Definition: MapScaleFloatItem.cpp:119
QAction
Marble::MapScaleFloatItem::nameId
QString nameId() const override
Returns the unique name of the plugin.
Definition: MapScaleFloatItem.cpp:81
QWidget::removeAction
void removeAction(QAction *action)
Marble::Oxygen::aluminumGray4
QColor const aluminumGray4
Definition: MarbleColors.cpp:86
Marble::MarbleGraphicsItem::update
void update()
Marks the item and all parent items as invalid.
Definition: MarbleGraphicsItem.cpp:181
Marble::MapScaleFloatItem::description
QString description() const override
Returns a user description of the plugin.
Definition: MapScaleFloatItem.cpp:91
QDialog
Marble::AbstractFloatItem::font
QFont font() const
current font for rendering
Definition: AbstractFloatItem.cpp:118
QPushButton
Marble::MarbleLocale::ImperialSystem
Definition: MarbleLocale.h:39
Marble::KM2NM
const qreal KM2NM
Definition: MarbleGlobal.h:195
Marble::GeoDataCoordinates::latitude
qreal latitude(GeoDataCoordinates::Unit unit) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:221
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QWidget::actions
QList< QAction * > actions() const
QHelpEvent
Marble::AbstractFloatItem::contextMenu
QMenu * contextMenu()
Definition: AbstractFloatItem.cpp:234
Marble::MapScaleFloatItem::version
QString version() const override
Definition: MapScaleFloatItem.cpp:86
Marble::MapScaleFloatItem::backendTypes
QStringList backendTypes() const override
Returns the name(s) of the backend that the plugin can render.
Definition: MapScaleFloatItem.cpp:66
QSizeF::width
qreal width() const
QIcon
Marble::MarbleGraphicsItem::setProjection
virtual void setProjection(const ViewportParams *viewport)
Definition: MarbleGraphicsItem.cpp:281
Marble::AbstractProjection::surfaceType
virtual SurfaceType surfaceType() const =0
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Tue Dec 10 2019 02:41:57 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
  •   KmPlot
  • libkeduvocdocument
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   src
  •   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