• 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
  • lib
  • marble
DownloadRegionDialog.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 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
9 //
10 
11 #include "DownloadRegionDialog.h"
12 
13 #include <cmath>
14 
15 #include <QDialogButtonBox>
16 #include <QGroupBox>
17 #include <QHBoxLayout>
18 #include <QHideEvent>
19 #include <QLabel>
20 #include <QPushButton>
21 #include <QRadioButton>
22 #include <QShowEvent>
23 #include <QVBoxLayout>
24 #include <QSpinBox>
25 #include <QScrollArea>
26 #include <QSet>
27 
28 #include "GeoDataLatLonAltBox.h"
29 #include "MarbleDebug.h"
30 #include "MarbleMath.h"
31 #include "MarbleModel.h"
32 #include "MarbleWidget.h"
33 #include "LatLonBoxWidget.h"
34 #include "TextureLayer.h"
35 #include "TileId.h"
36 #include "TileLevelRangeWidget.h"
37 #include "TileLoaderHelper.h"
38 #include "routing/RoutingManager.h"
39 #include "routing/RoutingModel.h"
40 #include "GeoDataCoordinates.h"
41 #include "GeoDataLineString.h"
42 #include "DownloadRegion.h"
43 #include "GeoSceneDocument.h"
44 #include "GeoSceneMap.h"
45 
46 namespace Marble
47 {
48 
49 int const maxTilesCount = 100000;
50 int const minimumRouteOffset = 0;
51 int const maximumRouteOffset = 10000;
52 int averageTileSize = 13; //The average size of a tile in kilobytes
53 
54 class DownloadRegionDialog::Private
55 {
56 public:
57  Private( MarbleWidget *const widget, QDialog * const dialog );
58  QWidget * createSelectionMethodBox();
59  QLayout * createTilesCounter();
60  QWidget * createOkCancelButtonBox();
61 
62  bool hasRoute() const;
63  bool hasTextureLayer() const;
64  QDialog * m_dialog;
65  QRadioButton * m_visibleRegionMethodButton;
66  QRadioButton * m_specifiedRegionMethodButton;
67  LatLonBoxWidget * m_latLonBoxWidget;
68  TileLevelRangeWidget * m_tileLevelRangeWidget;
69  QRadioButton *m_routeDownloadMethodButton;
70  QLabel* m_routeOffsetLabel;
71  QDoubleSpinBox *m_routeOffsetSpinBox;
72  QLabel * m_tilesCountLabel;
73  QLabel * m_tileSizeInfo;
74  QPushButton * m_okButton;
75  QPushButton * m_applyButton;
76  TextureLayer const * m_textureLayer;
77  int m_visibleTileLevel;
78  MarbleModel const*const m_model;
79  MarbleWidget *const m_widget;
80  SelectionMethod m_selectionMethod;
81  GeoDataLatLonAltBox m_visibleRegion;
82  RoutingModel *m_routingModel;
83  DownloadRegion m_downloadRegion;
84 };
85 
86 DownloadRegionDialog::Private::Private( MarbleWidget * const widget,
87  QDialog * const dialog )
88  : m_dialog( dialog ),
89  m_visibleRegionMethodButton( 0 ),
90  m_specifiedRegionMethodButton( 0 ),
91  m_latLonBoxWidget( new LatLonBoxWidget ),
92  m_tileLevelRangeWidget( new TileLevelRangeWidget ),
93  m_routeDownloadMethodButton( 0 ),
94  m_routeOffsetLabel( 0 ),
95  m_routeOffsetSpinBox( 0 ),
96  m_tilesCountLabel( 0 ),
97  m_tileSizeInfo( 0 ),
98  m_okButton( 0 ),
99  m_applyButton( 0 ),
100  m_textureLayer( widget->textureLayer() ),
101  m_visibleTileLevel( m_textureLayer->tileZoomLevel() ),
102  m_model( widget->model() ),
103  m_widget( widget ),
104  m_selectionMethod( VisibleRegionMethod ),
105  m_visibleRegion(),
106  m_routingModel( widget->model()->routingManager()->routingModel() )
107 {
108  m_latLonBoxWidget->setEnabled( false );
109  m_latLonBoxWidget->setLatLonBox( m_visibleRegion );
110  m_tileLevelRangeWidget->setDefaultLevel( m_visibleTileLevel );
111  m_downloadRegion.setMarbleModel( widget->model() );
112 }
113 
114 QWidget * DownloadRegionDialog::Private::createSelectionMethodBox()
115 {
116  m_visibleRegionMethodButton = new QRadioButton( tr( "Visible region" ) );
117  m_specifiedRegionMethodButton = new QRadioButton( tr( "Specify region" ) );
118 
119  m_routeDownloadMethodButton = new QRadioButton( tr( "Download Route" ) );
120  m_routeDownloadMethodButton->setToolTip( tr( "Enabled when a route exists" ) );
121  m_routeDownloadMethodButton->setEnabled( hasRoute() );
122  m_routeDownloadMethodButton->setChecked( hasRoute() );
123  m_routeOffsetSpinBox = new QDoubleSpinBox();
124  m_routeOffsetSpinBox->setEnabled( hasRoute() );
125  m_routeOffsetSpinBox->setRange( minimumRouteOffset, maximumRouteOffset );
126  int defaultOffset = 500;
127  m_routeOffsetSpinBox->setValue( defaultOffset );
128  m_routeOffsetSpinBox->setSingleStep( 100 );
129  m_routeOffsetSpinBox->setSuffix( " m" );
130  m_routeOffsetSpinBox->setDecimals( 0 );
131  m_routeOffsetSpinBox->setAlignment( Qt::AlignRight );
132 
133  m_routeOffsetLabel = new QLabel( tr( "Offset from route:" ) );
134  m_routeOffsetLabel->setAlignment( Qt::AlignHCenter );
135 
136  connect( m_visibleRegionMethodButton, SIGNAL(toggled(bool)),
137  m_dialog, SLOT(toggleSelectionMethod()) );
138  connect( m_specifiedRegionMethodButton, SIGNAL(toggled(bool)),
139  m_dialog, SLOT(toggleSelectionMethod()));
140  connect( m_routeDownloadMethodButton, SIGNAL(toggled(bool)),
141  m_dialog, SLOT(toggleSelectionMethod()) );
142  connect( m_routingModel, SIGNAL(modelReset()), m_dialog, SLOT(updateRouteDialog()) );
143  connect( m_routingModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
144  m_dialog, SLOT(updateRouteDialog()) );
145  connect( m_routingModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
146  m_dialog, SLOT(updateRouteDialog()) );
147 
148  QHBoxLayout *routeOffsetLayout = new QHBoxLayout;
149  routeOffsetLayout->addWidget( m_routeOffsetLabel );
150  routeOffsetLayout->insertSpacing( 0, 25 );
151  routeOffsetLayout->addWidget( m_routeOffsetSpinBox );
152 
153  QVBoxLayout * const routeLayout = new QVBoxLayout;
154  routeLayout->addWidget( m_routeDownloadMethodButton );
155  routeLayout->addLayout( routeOffsetLayout );
156 
157  QVBoxLayout * const layout = new QVBoxLayout;
158  layout->addWidget( m_visibleRegionMethodButton );
159  layout->addLayout( routeLayout );
160  layout->addWidget( m_specifiedRegionMethodButton );
161  layout->addWidget( m_latLonBoxWidget );
162 
163  bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
164  m_specifiedRegionMethodButton->setVisible( !smallScreen );
165  m_latLonBoxWidget->setVisible( !smallScreen );
166 
167  if ( smallScreen ) {
168  QWidget * const selectionMethodWidget = new QWidget;
169  selectionMethodWidget->setLayout( layout );
170  return selectionMethodWidget;
171  } else {
172  QGroupBox * const selectionMethodBox = new QGroupBox( tr( "Selection Method" ) );
173  selectionMethodBox->setLayout( layout );
174  return selectionMethodBox;
175  }
176 }
177 
178 QLayout * DownloadRegionDialog::Private::createTilesCounter()
179 {
180  QLabel * const description = new QLabel( tr( "Number of tiles to download:" ) );
181  m_tilesCountLabel = new QLabel;
182  m_tileSizeInfo = new QLabel;
183 
184  QHBoxLayout * const tilesCountLayout = new QHBoxLayout;
185  tilesCountLayout->addWidget( description );
186  tilesCountLayout->addWidget( m_tilesCountLabel );
187  //tilesCountLayout->insertSpacing( 0, 5 );
188  QVBoxLayout * const layout = new QVBoxLayout;
189  layout->addLayout( tilesCountLayout );
190  layout->addWidget( m_tileSizeInfo );
191  return layout;
192 }
193 
194 QWidget * DownloadRegionDialog::Private::createOkCancelButtonBox()
195 {
196  QDialogButtonBox * const buttonBox = new QDialogButtonBox;
197  m_okButton = buttonBox->addButton( QDialogButtonBox::Ok );
198  m_applyButton = buttonBox->addButton( QDialogButtonBox::Apply );
199  if ( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
200  buttonBox->removeButton( m_applyButton );
201  m_applyButton->setVisible( false );
202  }
203  buttonBox->addButton( QDialogButtonBox::Cancel );
204  connect( buttonBox, SIGNAL(accepted()), m_dialog, SLOT(accept()) );
205  connect( buttonBox, SIGNAL(rejected()), m_dialog, SLOT(reject()) );
206  connect( m_applyButton, SIGNAL(clicked()), m_dialog, SIGNAL(applied()) );
207  return buttonBox;
208 }
209 
210 bool DownloadRegionDialog::Private::hasRoute() const
211 {
212  return !m_routingModel->route().path().isEmpty();
213 }
214 
215 bool DownloadRegionDialog::Private::hasTextureLayer() const
216 {
217  return m_model->mapTheme()->map()->hasTextureLayers();
218 }
219 
220 DownloadRegionDialog::DownloadRegionDialog( MarbleWidget *const widget, QWidget * const parent,
221  Qt::WindowFlags const f )
222  : QDialog( parent, f ),
223  d( new Private( widget, this ))
224 {
225  setWindowTitle( tr( "Download Region" ));
226  QVBoxLayout * const layout = new QVBoxLayout;
227  layout->addWidget( d->createSelectionMethodBox() );
228  layout->addWidget( d->m_tileLevelRangeWidget );
229  layout->addLayout( d->createTilesCounter() );
230 
231  if ( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
232  QWidget* widget = new QWidget( this );
233  widget->setLayout( layout );
234  QScrollArea* scrollArea = new QScrollArea( this );
235  scrollArea->setFrameShape( QFrame::NoFrame );
236  scrollArea->setWidget( widget );
237  QVBoxLayout * const mainLayout = new QVBoxLayout;
238  mainLayout->addWidget( scrollArea );
239  mainLayout->addWidget( d->createOkCancelButtonBox() );
240  setLayout( mainLayout );
241  } else {
242  layout->addWidget( d->createOkCancelButtonBox() );
243  setLayout( layout );
244  }
245 
246  connect( d->m_latLonBoxWidget, SIGNAL(valueChanged()), SLOT(updateTilesCount()) );
247  connect( d->m_tileLevelRangeWidget, SIGNAL(topLevelChanged(int)),
248  SLOT(updateTilesCount()) );
249  connect( d->m_tileLevelRangeWidget, SIGNAL(bottomLevelChanged(int)),
250  SLOT(updateTilesCount()) );
251  connect( d->m_routeOffsetSpinBox, SIGNAL(valueChanged(double)), SLOT(updateTilesCount()) );
252  connect( d->m_routeOffsetSpinBox, SIGNAL(valueChanged(double)), SLOT(setOffsetUnit()) );
253  connect( d->m_model, SIGNAL(themeChanged(QString)), SLOT(updateTilesCount()) );
254 }
255 
256 DownloadRegionDialog::~DownloadRegionDialog()
257 {
258  delete d;
259 }
260 
261 void DownloadRegionDialog::setAllowedTileLevelRange( int const minimumTileLevel,
262  int const maximumTileLevel )
263 {
264  d->m_tileLevelRangeWidget->setAllowedLevelRange( minimumTileLevel, maximumTileLevel );
265 }
266 
267 void DownloadRegionDialog::setVisibleTileLevel( int const tileLevel )
268 {
269  d->m_visibleTileLevel = tileLevel;
270  d->m_tileLevelRangeWidget->setDefaultLevel( tileLevel );
271  d->m_downloadRegion.setVisibleTileLevel( tileLevel );
272 }
273 
274 void DownloadRegionDialog::setSelectionMethod( SelectionMethod const selectionMethod )
275 {
276  // block signals to prevent infinite recursion:
277  // radioButton->setChecked() -> toggleSelectionMethod() -> setSelectionMethod()
278  // -> radioButton->setChecked() -> ...
279  d->m_visibleRegionMethodButton->blockSignals( true );
280  d->m_specifiedRegionMethodButton->blockSignals( true );
281  d->m_routeDownloadMethodButton->blockSignals( true );
282 
283  d->m_selectionMethod = selectionMethod;
284  switch ( selectionMethod ) {
285  case VisibleRegionMethod:
286  d->m_visibleRegionMethodButton->setChecked( true );
287  d->m_routeOffsetLabel->setEnabled( false );
288  d->m_routeOffsetSpinBox->setEnabled( false );
289  d->m_latLonBoxWidget->setEnabled( false );
290  setSpecifiedLatLonAltBox( d->m_visibleRegion );
291  break;
292  case SpecifiedRegionMethod:
293  d->m_specifiedRegionMethodButton->setChecked( true );
294  d->m_routeOffsetLabel->setEnabled( false );
295  d->m_routeOffsetSpinBox->setEnabled( false );
296  d->m_latLonBoxWidget->setEnabled( true );
297  break;
298  case RouteDownloadMethod:
299  d->m_routeDownloadMethodButton->setChecked( true );
300  d->m_routeOffsetLabel->setEnabled( true );
301  d->m_routeOffsetSpinBox->setEnabled( true );
302  d->m_latLonBoxWidget->setEnabled( false );
303  }
304 
305  updateTilesCount();
306  d->m_visibleRegionMethodButton->blockSignals( false );
307  d->m_specifiedRegionMethodButton->blockSignals( false );
308  d->m_routeDownloadMethodButton->blockSignals( false );
309 }
310 
311 QVector<TileCoordsPyramid> DownloadRegionDialog::region() const
312 {
313  if ( !d->hasTextureLayer() ) {
314  return QVector<TileCoordsPyramid>();
315  }
316 
317  d->m_downloadRegion.setTileLevelRange( d->m_tileLevelRangeWidget->topLevel(),
318  d->m_tileLevelRangeWidget->bottomLevel() );
319  d->m_downloadRegion.setVisibleTileLevel( d->m_visibleTileLevel );
320  // check whether "visible region" or "lat/lon region" is selection method
321  GeoDataLatLonAltBox downloadRegion;
322  switch ( d->m_selectionMethod ) {
323  case VisibleRegionMethod:
324  downloadRegion = d->m_visibleRegion;
325  break;
326  case SpecifiedRegionMethod:
327  downloadRegion = GeoDataLatLonAltBox( d->m_latLonBoxWidget->latLonBox(), 0, 0 );
328  break;
329  case RouteDownloadMethod:
330  qreal offset = d->m_routeOffsetSpinBox->value();
331  if( d->m_routeOffsetSpinBox->suffix() == " km") {
332  offset *= KM2METER;
333  }
334  const GeoDataLineString waypoints = d->m_model->routingManager()->routingModel()->route().path();
335  return d->m_downloadRegion.fromPath( d->m_textureLayer, offset, waypoints );
336  break;
337  }
338 
339  return d->m_downloadRegion.region( d->m_textureLayer, downloadRegion );
340 }
341 
342 void DownloadRegionDialog::setSpecifiedLatLonAltBox( GeoDataLatLonAltBox const & region )
343 {
344  d->m_latLonBoxWidget->setLatLonBox( region );
345 }
346 
347 void DownloadRegionDialog::setVisibleLatLonAltBox( GeoDataLatLonAltBox const & region )
348 {
349  d->m_visibleRegion = region;
350 
351  // update lat/lon widget only if not active to prevent that users unintentionally loose
352  // entered values
353  if ( d->m_selectionMethod == VisibleRegionMethod ) {
354  setSpecifiedLatLonAltBox( region );
355  }
356  updateTilesCount();
357 }
358 
359 void DownloadRegionDialog::updateTextureLayer()
360 {
361  mDebug() << "DownloadRegionDialog::updateTextureLayer";
362  updateTilesCount();
363 }
364 
365 void DownloadRegionDialog::hideEvent( QHideEvent * event )
366 {
367  disconnect( d->m_widget, SIGNAL(visibleLatLonAltBoxChanged(GeoDataLatLonAltBox)),
368  this, SLOT(setVisibleLatLonAltBox(GeoDataLatLonAltBox)) );
369  disconnect( d->m_widget, SIGNAL(themeChanged(QString)),
370  this, SLOT(updateTextureLayer()) );
371 
372  emit hidden();
373  event->accept();
374 }
375 
376 void DownloadRegionDialog::showEvent( QShowEvent * event )
377 {
378  connect( d->m_widget, SIGNAL(visibleLatLonAltBoxChanged(GeoDataLatLonAltBox)),
379  this, SLOT(setVisibleLatLonAltBox(GeoDataLatLonAltBox)) );
380  connect( d->m_widget, SIGNAL(themeChanged(QString)),
381  this, SLOT(updateTextureLayer()) );
382 
383  emit shown();
384  event->accept();
385 }
386 
387 void DownloadRegionDialog::toggleSelectionMethod()
388 {
389  // TODO:QButtonGroup would be easier to handle
390  switch ( d->m_selectionMethod ) {
391  case VisibleRegionMethod:
392  if( d->m_specifiedRegionMethodButton->isChecked() ) {
393  setSelectionMethod( SpecifiedRegionMethod );
394  }
395  else if( d->m_routeDownloadMethodButton->isChecked() ) {
396  setSelectionMethod( RouteDownloadMethod );
397  }
398 
399  break;
400  case SpecifiedRegionMethod:
401  if( d->m_visibleRegionMethodButton->isChecked() ) {
402  setSelectionMethod( VisibleRegionMethod );
403  }
404  else if ( d->m_routeDownloadMethodButton->isChecked() ) {
405  setSelectionMethod( RouteDownloadMethod );
406  }
407  break;
408  case RouteDownloadMethod:
409  if( d->m_specifiedRegionMethodButton->isChecked() ) {
410  setSelectionMethod( SpecifiedRegionMethod );
411  }
412  else if ( d->m_visibleRegionMethodButton->isChecked() ) {
413  setSelectionMethod( VisibleRegionMethod );
414  }
415  break;
416 
417  }
418 }
419 
420 void DownloadRegionDialog::updateTilesCount()
421 {
422  if ( !isVisible() || !d->hasTextureLayer() ) {
423  return;
424  }
425 
426  qint64 tilesCount = 0;
427  QString themeId( d->m_model->mapThemeId() );
428  QVector<TileCoordsPyramid> const pyramid = region();
429  Q_ASSERT( !pyramid.isEmpty() );
430  if( pyramid.size() == 1 ) {
431  tilesCount = pyramid[0].tilesCount();
432  }
433  else {
434  for( int level = pyramid[0].bottomLevel(); level>= pyramid[0].topLevel(); --level ) {
435  QSet<TileId> tileIdSet;
436  for( int i = 0; i < pyramid.size(); ++i ) {
437  QRect const coords = pyramid[i].coords( level );
438  int x1, y1, x2, y2;
439  coords.getCoords( &x1, &y1, &x2, &y2 );
440  for ( int x = x1; x <= x2; ++x ) {
441  for ( int y = y1; y <= y2; ++y ) {
442  TileId const tileId( 0, level, x, y );
443  tileIdSet.insert( tileId );
444  }
445  }
446  }
447  tilesCount += tileIdSet.count();
448  }
449  }
450 
451  if ( tilesCount > maxTilesCount ) {
452  d->m_tileSizeInfo->setToolTip( QString() );
453  d->m_tileSizeInfo->setText( tr( "There is a limit of %n tiles to download.", "",
454  maxTilesCount ) );
455  } else if ( themeId == "earth/openstreetmap/openstreetmap.dgml" ) {
456  qreal tileDownloadSize = tilesCount * averageTileSize;
457 
458  d->m_tileSizeInfo->setToolTip( tr( "Approximate size of the tiles to be downloaded" ) );
459 
460  if( tileDownloadSize > 1024 ) {
461  tileDownloadSize = tileDownloadSize / 1024;
462  d->m_tileSizeInfo->setText( tr( "Estimated download size: %1 MB" ).arg( ceil( tileDownloadSize ) ) );
463  }
464  else {
465  d->m_tileSizeInfo->setText( tr( "Estimated download size: %1 kB" ).arg( tileDownloadSize ) );
466  }
467 
468  }
469  else {
470  d->m_tileSizeInfo->setToolTip( QString() );
471  d->m_tileSizeInfo->clear();
472  }
473 
474  d->m_tilesCountLabel->setText( QString::number( tilesCount ) );
475  bool const tilesCountWithinLimits = tilesCount > 0 && tilesCount <= maxTilesCount;
476  d->m_okButton->setEnabled( tilesCountWithinLimits );
477  d->m_applyButton->setEnabled( tilesCountWithinLimits );
478 }
479 
480 void DownloadRegionDialog::updateRouteDialog()
481 {
482  d->m_routeDownloadMethodButton->setEnabled( d->hasRoute() );
483  d->m_routeDownloadMethodButton->setChecked( d->hasRoute() );
484  if( !d->hasRoute() ) {
485  setSelectionMethod( VisibleRegionMethod );
486  }
487 }
488 
489 void DownloadRegionDialog::setOffsetUnit()
490 {
491  qreal offset = d->m_routeOffsetSpinBox->value();
492 
493  if( offset >= 1100 ) {
494  d->m_routeOffsetSpinBox->setSuffix( " km" );
495  d->m_routeOffsetSpinBox->setRange( minimumRouteOffset * METER2KM, maximumRouteOffset * METER2KM );
496  d->m_routeOffsetSpinBox->setDecimals( 1 );
497  d->m_routeOffsetSpinBox->setValue( offset * METER2KM );
498  d->m_routeOffsetSpinBox->setSingleStep( 0.1 );
499  }
500  else if( offset <= 1 && d->m_routeOffsetSpinBox->suffix() == " km" ) {
501  d->m_routeOffsetSpinBox->setSuffix( " m" );
502  d->m_routeOffsetSpinBox->setRange( minimumRouteOffset, maximumRouteOffset );
503  d->m_routeOffsetSpinBox->setDecimals( 0 );
504  d->m_routeOffsetSpinBox->setValue( offset * KM2METER );
505  d->m_routeOffsetSpinBox->setSingleStep( 100 );
506  }
507 }
508 
509 }
510 
511 #include "DownloadRegionDialog.moc"
QHideEvent
Marble::DownloadRegionDialog::setVisibleTileLevel
void setVisibleTileLevel(int const tileLevel)
Definition: DownloadRegionDialog.cpp:267
QModelIndex
GeoDataCoordinates.h
Marble::DownloadRegionDialog::hideEvent
virtual void hideEvent(QHideEvent *event)
Definition: DownloadRegionDialog.cpp:365
TileId.h
QWidget
Marble::DownloadRegionDialog::VisibleRegionMethod
Definition: DownloadRegionDialog.h:36
RoutingModel.h
Marble::DownloadRegionDialog::SelectionMethod
SelectionMethod
Definition: DownloadRegionDialog.h:36
QScrollArea::setWidget
void setWidget(QWidget *widget)
QBoxLayout::insertSpacing
void insertSpacing(int index, int size)
MarbleMath.h
Marble::DownloadRegionDialog::hidden
void hidden()
This signal is emitted when the dialog receives a QHideEvent.
Marble::DownloadRegionDialog::RouteDownloadMethod
Definition: DownloadRegionDialog.h:36
QFrame::setFrameShape
void setFrameShape(Shape)
Marble::DownloadRegionDialog::SpecifiedRegionMethod
Definition: DownloadRegionDialog.h:36
Marble::TileLevelRangeWidget
Definition: TileLevelRangeWidget.h:24
MarbleModel.h
This file contains the headers for MarbleModel.
Marble::minimumRouteOffset
int const minimumRouteOffset
Definition: DownloadRegionDialog.cpp:50
QRect::getCoords
void getCoords(int *x1, int *y1, int *x2, int *y2) const
Marble::LatLonBoxWidget
Definition: LatLonBoxWidget.h:21
Marble::KM2METER
const qreal KM2METER
Definition: MarbleGlobal.h:223
QDialogButtonBox::addButton
void addButton(QAbstractButton *button, ButtonRole role)
Marble::DownloadRegionDialog::setSpecifiedLatLonAltBox
void setSpecifiedLatLonAltBox(GeoDataLatLonAltBox const &)
Definition: DownloadRegionDialog.cpp:342
QLayout
QDialogButtonBox::removeButton
void removeButton(QAbstractButton *button)
QWidget::y
int y() const
QWidget::isVisible
bool isVisible() const
QHBoxLayout
GeoSceneDocument.h
QSet::insert
const_iterator insert(const T &value)
QObject::disconnect
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
MarbleDebug.h
QObject::tr
QString tr(const char *sourceText, const char *disambiguation, int n)
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Marble::DownloadRegionDialog::setVisibleLatLonAltBox
void setVisibleLatLonAltBox(GeoDataLatLonAltBox const &)
Definition: DownloadRegionDialog.cpp:347
Marble::DownloadRegionDialog::region
QVector< TileCoordsPyramid > region() const
Definition: DownloadRegionDialog.cpp:311
TextureLayer.h
QRect
QDoubleSpinBox
QBoxLayout::addWidget
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
QString::number
QString number(int n, int base)
RoutingManager.h
Marble::DownloadRegionDialog::~DownloadRegionDialog
~DownloadRegionDialog()
Definition: DownloadRegionDialog.cpp:256
QWidget::setLayout
void setLayout(QLayout *layout)
QGroupBox
QWidget::x
int x() const
QShowEvent
Marble::DownloadRegionDialog::shown
void shown()
This signal is emitted when the dialog receives a QShowEvent.
Marble::TextureLayer
Definition: TextureLayer.h:38
GeoDataLineString.h
QVBoxLayout
Marble::DownloadRegionDialog::updateTextureLayer
void updateTextureLayer()
Definition: DownloadRegionDialog.cpp:359
QSet
TileLevelRangeWidget.h
QString
Marble::DownloadRegionDialog::setAllowedTileLevelRange
void setAllowedTileLevelRange(int const minimumTileLevel, int const maximumTileLevel)
Definition: DownloadRegionDialog.cpp:261
QSet::count
int count() const
Marble::DownloadRegionDialog::showEvent
virtual void showEvent(QShowEvent *event)
Definition: DownloadRegionDialog.cpp:376
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::METER2KM
const qreal METER2KM
Definition: MarbleGlobal.h:224
Marble::MarbleGlobal::SmallScreen
Definition: MarbleGlobal.h:287
Marble::RoutingModel
Definition: RoutingModel.h:34
Marble::MarbleGlobal::getInstance
static MarbleGlobal * getInstance()
Definition: MarbleGlobal.cpp:37
Marble::maximumRouteOffset
int const maximumRouteOffset
Definition: DownloadRegionDialog.cpp:51
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QVector
QRadioButton
LatLonBoxWidget.h
Marble::DownloadRegion
Definition: DownloadRegion.h:29
GeoDataLatLonAltBox.h
QDialogButtonBox
QWidget::setWindowTitle
void setWindowTitle(const QString &)
QWidget::QWidget
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
Marble::MarbleGlobal::profiles
Profiles profiles() const
Definition: MarbleGlobal.cpp:48
DownloadRegionDialog.h
QDialog
MarbleWidget.h
This file contains the headers for MarbleWidget.
QPushButton
Qt::WindowFlags
typedef WindowFlags
Marble::maxTilesCount
int const maxTilesCount
Definition: DownloadRegionDialog.cpp:49
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
QScrollArea
MarbleWidget::model
Marble::MarbleModel * model()
Definition: MarbleDeclarativeWidget.cpp:86
DownloadRegion.h
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QLabel
TileLoaderHelper.h
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:36
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
QRect::coords
void coords(int *x1, int *y1, int *x2, int *y2) const
GeoSceneMap.h
Marble::averageTileSize
int averageTileSize
Definition: DownloadRegionDialog.cpp:52
QBoxLayout::addLayout
void addLayout(QLayout *layout, int stretch)
Marble::DownloadRegionDialog::setSelectionMethod
void setSelectionMethod(SelectionMethod const )
Definition: DownloadRegionDialog.cpp:274
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 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