30 #include <QResizeEvent>
34 #include <QMessageBox>
35 #include <QStandardItemModel>
36 #include <QGridLayout>
39 #include <QToolButton>
40 #include <QTextDocument>
41 #include <QAbstractTextDocumentLayout>
43 using namespace Marble;
45 #include "ui_MapViewWidget.h"
50 class MapViewItemDelegate :
public QAbstractItemDelegate
53 MapViewItemDelegate( QListView* view );
54 void paint(
QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const;
55 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index )
const;
58 QString text(
const QModelIndex &index )
const;
63 class CelestialSortFilterProxyModel :
public QSortFilterProxyModel
66 CelestialSortFilterProxyModel()
72 ~CelestialSortFilterProxyModel() {}
75 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const
77 QVariant var = QSortFilterProxyModel::data(index, role);
78 if (role == Qt::DisplayRole && index.column() == 0) {
79 QString newOne = var.toString();
80 if (newOne == tr(
"Moon")) {
81 return QString(
" " + tr(
"Moon"));
82 }
else if (m_moons.contains(newOne.toLower())) {
83 return QString(
" "+newOne+
" (" + tr(
"moon") +
")");
84 }
else if (m_dwarfs.contains(newOne.toLower())) {
85 return QString(newOne+
" (" + tr(
"dwarf planet") +
")");
95 void setupPriorities()
100 m_priority[
"sun"] = prefix;
101 m_priority[
"mercury"] = prefix--;
102 m_priority[
"venus"] = prefix--;
103 m_priority[
"earth"] = prefix--;
104 m_priority[
"moon"] = prefix--;
105 m_priority[
"mars"] = prefix--;
107 m_priority[
"jupiter"] = prefix--;
109 m_priority[
"io"] = prefix--;
110 m_priority[
"europa"] = prefix--;
111 m_priority[
"ganymede"] = prefix--;
112 m_priority[
"callisto"] = prefix--;
114 m_priority[
"saturn"] = prefix--;
116 m_priority[
"mimas"] = prefix--;
117 m_priority[
"enceladus"] = prefix--;
118 m_priority[
"thetys"] = prefix--;
119 m_priority[
"dione"] = prefix--;
120 m_priority[
"rhea"] = prefix--;
121 m_priority[
"titan"] = prefix--;
122 m_priority[
"iapetus"] = prefix--;
124 m_priority[
"uranus"] = prefix--;
125 m_priority[
"neptune"] = prefix--;
126 m_priority[
"pluto"] = prefix--;
127 m_priority[
"ceres"] = prefix--;
130 void setupMoonsList()
132 m_moons.push_back(
"moon");
133 m_moons.push_back(
"europa");
134 m_moons.push_back(
"ganymede");
135 m_moons.push_back(
"callisto");
136 m_moons.push_back(
"mimas");
137 m_moons.push_back(
"enceladus");
138 m_moons.push_back(
"thetys");
139 m_moons.push_back(
"dione");
140 m_moons.push_back(
"rhea");
141 m_moons.push_back(
"titan");
142 m_moons.push_back(
"iapetus");
145 void setupDwarfsList()
147 m_dwarfs.push_back(
"pluto");
148 m_dwarfs.push_back(
"ceres");
152 bool lessThan(
const QModelIndex &left,
const QModelIndex &right)
const {
153 const QString nameLeft = sourceModel()->index(left.row(), 1).data().toString();
154 const QString nameRight = sourceModel()->index(right.row(), 1).data().toString();
155 const QString first = nameLeft.toLower();
156 const QString second = nameRight.toLower();
159 if (m_priority.contains(first) && m_priority.contains(second)) {
160 return m_priority[first] > m_priority[second];
164 if (m_priority.contains(first) && !m_priority.contains(second)) {
169 if (!m_priority.contains(first) && m_priority.contains(second)) {
173 return QSortFilterProxyModel::lessThan(left, right);
177 QMap<QString, int> m_priority;
178 QList<QString> m_moons;
179 QList<QString> m_dwarfs;
188 m_celestialListProxy(),
191 m_mapSortProxy.setDynamicSortFilter(
true );
192 m_celestialListProxy.setDynamicSortFilter(
true );
195 void applyExtendedLayout()
197 m_mapViewUi.projectionLabel_2->setVisible(
true);
198 m_mapViewUi.celestialBodyLabel->setVisible(
true);
199 m_mapViewUi.projectionComboBox->setVisible(
true);
200 m_mapViewUi.mapThemeLabel->setVisible(
true);
201 m_mapViewUi.line->setVisible(
true);
203 m_toolBar->setVisible(
false);
204 const int labelId = m_mapViewUi.verticalLayout->indexOf(m_mapViewUi.celestialBodyLabel);
205 m_mapViewUi.verticalLayout->insertWidget(labelId+1, m_mapViewUi.celestialBodyComboBox);
206 m_toolBar->removeAction(m_celestialBodyAction);
207 m_mapViewUi.celestialBodyComboBox->show();
210 void applyReducedLayout()
212 m_mapViewUi.projectionLabel_2->setVisible(
false);
213 m_mapViewUi.celestialBodyLabel->setVisible(
false);
214 m_mapViewUi.projectionComboBox->setVisible(
false);
215 m_mapViewUi.mapThemeLabel->setVisible(
false);
216 m_mapViewUi.line->setVisible(
false);
218 m_toolBar->setVisible(
true);
219 m_celestialBodyAction = m_toolBar->addWidget(m_mapViewUi.celestialBodyComboBox);
220 m_mapViewUi.verticalLayout->removeWidget(m_mapViewUi.celestialBodyComboBox);
221 m_mapViewUi.celestialBodyComboBox->show();
226 m_toolBar =
new QToolBar;
228 m_globeViewButton =
new QToolButton;
229 m_globeViewButton->setIcon( QIcon(
":/icons/map-globe.png") );
230 m_globeViewButton->setToolTip( tr(
"Globe View") );
231 m_globeViewButton->setCheckable(
true);
232 m_globeViewButton->setChecked(
false);
234 m_mercatorViewButton =
new QToolButton;
235 m_mercatorViewButton->setIcon( QIcon(
":/icons/map-mercator.png") );
236 m_mercatorViewButton->setToolTip( tr(
"Mercator View") );
237 m_mercatorViewButton->setCheckable(
true);
238 m_mercatorViewButton->setChecked(
false);
239 m_mercatorViewButton->setPopupMode(QToolButton::MenuButtonPopup);
241 m_popupMenu =
new QMenu;
243 m_mercatorViewAction =
new QAction( QIcon(
":/icons/map-mercator.png"),
246 m_mercatorViewAction->setCheckable(
true);
247 m_mercatorViewAction->setChecked(
false);
249 m_flatViewAction =
new QAction( QIcon(
":/icons/map-flat.png"),
252 m_flatViewAction->setCheckable(
true);
253 m_flatViewAction->setChecked(
false);
255 m_popupMenu->addAction(m_mercatorViewAction);
256 m_popupMenu->addAction(m_flatViewAction);
257 m_mercatorViewButton->setMenu(m_popupMenu);
259 m_toolBar->addWidget(m_globeViewButton);
260 m_toolBar->addWidget(m_mercatorViewButton);
261 m_toolBar->addSeparator();
262 m_toolBar->setContentsMargins(0,0,0,0);
263 m_toolBar->setIconSize(QSize(16, 16));
264 m_mapViewUi.toolBarLayout->insertWidget(0, m_toolBar);
266 QObject::connect(m_globeViewButton, SIGNAL(clicked()),
267 q, SLOT(globeViewRequested()));
268 QObject::connect(m_mercatorViewButton, SIGNAL(clicked()),
269 q, SLOT(mercatorViewRequested()));
270 QObject::connect(m_mercatorViewAction, SIGNAL(triggered()),
271 q, SLOT(mercatorViewRequested()));
272 QObject::connect(m_flatViewAction, SIGNAL(triggered()),
273 q, SLOT(flatViewRequested()));
275 applyReducedLayout();
278 void updateMapFilter()
280 int currentIndex = m_mapViewUi.celestialBodyComboBox->currentIndex();
281 const QString selectedId = m_celestialListProxy.data( m_celestialListProxy.index( currentIndex, 1 ) ).toString();
283 if ( !selectedId.isEmpty() ) {
284 m_mapSortProxy.setFilterRegExp( QRegExp( selectedId, Qt::CaseInsensitive,QRegExp::FixedString ) );
288 void celestialBodySelected(
int comboIndex );
290 void projectionSelected(
int projectionIndex );
292 void mapThemeSelected( QModelIndex index );
293 void mapThemeSelected(
int index );
295 void showContextMenu(
const QPoint& pos );
297 void toggleFavorite();
298 void toggleIconSize();
300 bool isCurrentFavorite();
301 QString currentThemeName()
const;
302 QString currentThemePath()
const;
306 Ui::MapViewWidget m_mapViewUi;
311 CelestialSortFilterProxyModel m_celestialListProxy;
312 QSettings m_settings;
314 QToolButton *m_globeViewButton;
315 QToolButton *m_mercatorViewButton;
317 QAction *m_flatViewAction;
318 QAction *m_mercatorViewAction;
319 QAction *m_celestialBodyAction;
324 d( new Private( this ) )
326 d->m_mapViewUi.setupUi(
this );
327 layout()->setMargin( 0 );
330 QGridLayout* layout =
new QGridLayout;
331 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 1 ), 0, 0 );
332 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 1 ), 0, 1 );
333 d->m_mapViewUi.line->setVisible(
false );
334 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 2 ), 1, 0 );
335 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 2 ), 1, 1 );
336 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 3 ), 2, 0 );
337 layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 4 ), 2, 1 );
338 d->m_mapViewUi.verticalLayout->insertLayout( 0, layout );
339 d->m_mapViewUi.mapThemeComboBox->setModel( &d->m_mapSortProxy );
340 d->m_mapViewUi.mapThemeComboBox->setIconSize( QSize( 48, 48 ) );
341 connect( d->m_mapViewUi.mapThemeComboBox, SIGNAL(activated(
int)),
342 this, SLOT(mapThemeSelected(
int)) );
343 d->m_mapViewUi.marbleThemeSelectView->setVisible(
false );
346 d->m_mapViewUi.marbleThemeSelectView->setViewMode( QListView::IconMode );
347 QSize
const iconSize = d->m_settings.value(
"MapView/iconSize", QSize( 90, 90 ) ).toSize();
348 d->m_mapViewUi.marbleThemeSelectView->setIconSize( iconSize );
349 d->m_mapViewUi.marbleThemeSelectView->setItemDelegate(
new MapViewItemDelegate( d->m_mapViewUi.marbleThemeSelectView ) );
350 d->m_mapViewUi.marbleThemeSelectView->setAlternatingRowColors(
true );
351 d->m_mapViewUi.marbleThemeSelectView->setFlow( QListView::LeftToRight );
352 d->m_mapViewUi.marbleThemeSelectView->setWrapping(
true );
353 d->m_mapViewUi.marbleThemeSelectView->setResizeMode( QListView::Adjust );
354 d->m_mapViewUi.marbleThemeSelectView->setUniformItemSizes(
true );
355 d->m_mapViewUi.marbleThemeSelectView->setMovement( QListView::Static );
356 d->m_mapViewUi.marbleThemeSelectView->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
357 d->m_mapViewUi.marbleThemeSelectView->setEditTriggers( QListView::NoEditTriggers );
358 d->m_mapViewUi.marbleThemeSelectView->setSelectionMode( QListView::SingleSelection );
359 d->m_mapViewUi.marbleThemeSelectView->setModel( &d->m_mapSortProxy );
360 connect( d->m_mapViewUi.marbleThemeSelectView, SIGNAL(pressed(QModelIndex)),
361 this, SLOT(mapThemeSelected(QModelIndex)) );
362 connect( d->m_mapViewUi.marbleThemeSelectView, SIGNAL(customContextMenuRequested(QPoint)),
363 this, SLOT(showContextMenu(QPoint)) );
365 d->m_mapViewUi.mapThemeComboBox->setVisible(
false );
369 connect( d->m_mapViewUi.projectionComboBox, SIGNAL(activated(
int)),
370 this, SLOT(projectionSelected(
int)) );
372 d->m_mapViewUi.projectionComboBox->setEnabled(
true );
373 d->m_mapViewUi.celestialBodyComboBox->setModel( &d->m_celestialListProxy );
375 connect( d->m_mapViewUi.celestialBodyComboBox, SIGNAL(activated(
int)),
376 this, SLOT(celestialBodySelected(
int)) );
378 d->m_settings.beginGroup(
"Favorites" );
379 if( !d->m_settings.contains(
"initialized" ) ) {
380 d->m_settings.setValue(
"initialized",
true );
381 QDateTime currentDateTime = QDateTime::currentDateTime();
382 d->m_settings.setValue(
"Atlas", currentDateTime );
383 d->m_settings.setValue(
"OpenStreetMap", currentDateTime );
384 d->m_settings.setValue(
"Satellite View", currentDateTime );
386 d->m_settings.endGroup();
396 d->m_marbleModel = widget->
model();
397 d->m_mapSortProxy.setSourceModel( mapThemeManager->
mapThemeModel() );
398 d->m_mapSortProxy.sort( 0 );
400 d->m_celestialListProxy.sort( 0 );
405 connect( widget, SIGNAL(themeChanged(QString)),
423 if (d->m_toolBar->isVisible() &&
event->size().height() > 400) {
424 d->applyExtendedLayout();
425 }
else if (!d->m_toolBar->isVisible() &&
event->size().height() <= 400) {
426 d->applyReducedLayout();
434 const int currentRow = smallscreen ? d->m_mapViewUi.mapThemeComboBox->currentIndex() :
435 d->m_mapViewUi.marbleThemeSelectView->currentIndex().row();
436 const QString oldThemeId = d->m_mapSortProxy.data( d->m_mapSortProxy.index( currentRow, 0 ), Qt::UserRole + 1 ).toString();
439 if ( themeId == oldThemeId )
442 const QString oldCelestialBodyId = oldThemeId.section(
'/', 0, 0 );
443 const QString celestialBodyId = themeId.section(
'/', 0, 0 );
446 if ( celestialBodyId != oldCelestialBodyId ) {
447 for (
int row = 0; row < d->m_celestialListProxy.rowCount(); ++row ) {
448 if ( d->m_celestialListProxy.data( d->m_celestialListProxy.index( row, 1 ) ).toString() == celestialBodyId ) {
449 d->m_mapViewUi.celestialBodyComboBox->setCurrentIndex( row );
454 d->updateMapFilter();
458 for (
int row = 0; row < d->m_mapSortProxy.rowCount(); ++row ) {
459 if( d->m_mapSortProxy.data( d->m_mapSortProxy.index( row, 0 ), Qt::UserRole + 1 ).toString() == themeId ) {
461 d->m_mapViewUi.mapThemeComboBox->setCurrentIndex( row );
464 const QModelIndex index = d->m_mapSortProxy.index( row, 0 );
465 d->m_mapViewUi.marbleThemeSelectView->setCurrentIndex( index );
466 d->m_mapViewUi.marbleThemeSelectView->scrollTo( index );
476 if ( (
int)projection != d->m_mapViewUi.projectionComboBox->currentIndex() )
477 d->m_mapViewUi.projectionComboBox->setCurrentIndex( (
int) projection );
480 switch (projection) {
482 d->m_globeViewButton->setChecked(
true);
483 d->m_mercatorViewButton->setChecked(
false);
484 d->m_mercatorViewAction->setChecked(
false);
485 d->m_flatViewAction->setChecked(
false);
488 d->m_mercatorViewButton->setChecked(
true);
489 d->m_mercatorViewAction->setChecked(
true);
490 d->m_globeViewButton->setChecked(
false);
491 d->m_flatViewAction->setChecked(
false);
494 d->m_flatViewAction->setChecked(
true);
495 d->m_mercatorViewButton->setChecked(
true);
496 d->m_globeViewButton->setChecked(
false);
497 d->m_mercatorViewAction->setChecked(
false);
503 void MapViewWidget::globeViewRequested()
508 void MapViewWidget::flatViewRequested()
513 void MapViewWidget::mercatorViewRequested()
518 void MapViewWidget::Private::celestialBodySelected(
int comboIndex )
520 Q_UNUSED( comboIndex )
524 bool foundMapTheme = false;
526 QString currentMapThemeId = m_marbleModel->mapThemeId();
527 QString oldPlanetId = m_marbleModel->planetId();
529 int row = m_mapSortProxy.rowCount();
531 for (
int i = 0; i < row; ++i )
533 QModelIndex index = m_mapSortProxy.index(i,0);
534 QString itMapThemeId = m_mapSortProxy.data(index, Qt::UserRole + 1).toString();
535 if ( currentMapThemeId == itMapThemeId )
537 foundMapTheme =
true;
541 if ( !foundMapTheme ) {
542 QModelIndex index = m_mapSortProxy.index(0,0);
543 emit q->mapThemeIdChanged( m_mapSortProxy.data( index, Qt::UserRole + 1 ).toString() );
546 if( oldPlanetId != m_marbleModel->planetId() ) {
547 emit q->celestialBodyChanged( m_marbleModel->planetId() );
552 void MapViewWidget::Private::projectionSelected(
int projectionIndex )
554 emit q->projectionChanged( (
Projection) projectionIndex );
557 void MapViewWidget::Private::mapThemeSelected( QModelIndex index )
559 mapThemeSelected( index.row() );
562 void MapViewWidget::Private::mapThemeSelected(
int index )
564 const QModelIndex columnIndex = m_mapSortProxy.index( index, 0 );
565 const QString currentmaptheme = m_mapSortProxy.data( columnIndex, Qt::UserRole + 1 ).toString();
567 mDebug() << Q_FUNC_INFO << currentmaptheme;
569 emit q->mapThemeIdChanged( currentmaptheme );
572 QString MapViewWidget::Private::currentThemeName()
const
574 const QModelIndex index = m_mapViewUi.marbleThemeSelectView->currentIndex();
575 const QModelIndex columnIndex = m_mapSortProxy.index( index.row(), 0, QModelIndex() );
577 return m_mapSortProxy.data( columnIndex ).toString();
580 QString MapViewWidget::Private::currentThemePath()
const
582 const QModelIndex index = m_mapViewUi.marbleThemeSelectView->currentIndex();
583 const QModelIndex columnIndex = m_mapSortProxy.index( index.row(), 0 );
585 return m_mapSortProxy.data( columnIndex, Qt::UserRole + 1 ).toString();
588 void MapViewWidget::Private::showContextMenu(
const QPoint& pos )
592 QAction* iconSizeAction = menu.addAction( tr(
"&Show Large Icons" ), q, SLOT(toggleIconSize()) );
593 iconSizeAction->setCheckable(
true );
594 iconSizeAction->setChecked( m_mapViewUi.marbleThemeSelectView->iconSize() == QSize( 96, 96 ) );
595 QAction *favAction = menu.addAction( QIcon(
":/icons/bookmarks.png" ), tr(
"&Favorite" ), q, SLOT(toggleFavorite()) );
596 favAction->setCheckable(
true );
597 favAction->setChecked( isCurrentFavorite() );
600 menu.addAction( QIcon(
":/icons/create-new-map.png" ), tr(
"&Create a New Map..."), q, SIGNAL(showMapWizard()) );
602 menu.addAction( tr(
"&Delete Map Theme" ), q, SLOT(deleteMap()) );
603 menu.addAction( tr(
"&Upload Map..." ), q, SIGNAL(showUploadDialog()) );
604 menu.exec( m_mapViewUi.marbleThemeSelectView->mapToGlobal( pos ) );
607 void MapViewWidget::Private::deleteMap()
609 if(QMessageBox::warning( q,
611 tr(
"Are you sure that you want to delete \"%1\"?" ).arg( currentThemeName() ),
612 QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes )
615 emit q->mapThemeDeleted();
619 void MapViewWidget::Private::toggleFavorite()
621 const QModelIndex index = m_mapViewUi.marbleThemeSelectView->currentIndex();
622 const QModelIndex columnIndex = m_mapSortProxy.index( index.row(), 0 );
624 if( isCurrentFavorite() ) {
625 m_settings.beginGroup(
"Favorites" );
626 m_settings.remove( m_mapSortProxy.data( columnIndex ).toString() );
629 m_settings.beginGroup(
"Favorites" );
630 m_settings.setValue( m_mapSortProxy.data( columnIndex ).toString(), QDateTime::currentDateTime() );
632 m_settings.endGroup();
635 void MapViewWidget::Private::toggleIconSize()
637 bool const isLarge = m_mapViewUi.marbleThemeSelectView->iconSize() == QSize( 96, 96 );
638 int const size = isLarge ? 52 : 96;
639 m_mapViewUi.marbleThemeSelectView->setIconSize( QSize( size, size ) );
640 m_settings.setValue(
"MapView/iconSize", m_mapViewUi.marbleThemeSelectView->iconSize() );
643 bool MapViewWidget::Private::isCurrentFavorite()
645 const QModelIndex index = m_mapViewUi.marbleThemeSelectView->currentIndex();
646 const QModelIndex nameIndex = m_mapSortProxy.index( index.row(), 0 );
648 m_settings.beginGroup(
"Favorites" );
649 const bool isFavorite = m_settings.contains( m_mapSortProxy.data( nameIndex ).toString() );
650 m_settings.endGroup();
655 MapViewItemDelegate::MapViewItemDelegate( QListView *view ) :
656 m_view( view ), m_bookmarkIcon(
":/icons/bookmarks.png" )
661 void MapViewItemDelegate::paint(
QPainter *painter,
const QStyleOptionViewItem &option,
const QModelIndex &index )
const
663 QStyleOptionViewItemV4 styleOption = option;
664 styleOption.text = QString();
665 QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &styleOption, painter);
667 QAbstractTextDocumentLayout::PaintContext paintContext;
668 if (styleOption.state & QStyle::State_Selected) {
669 paintContext.palette.setColor(QPalette::Text,
670 styleOption.palette.color(QPalette::Active, QPalette::HighlightedText));
673 QRect
const rect = option.rect;
674 QSize
const iconSize = option.decorationSize;
675 QRect
const iconRect( rect.topLeft(),
iconSize );
676 QIcon
const icon = index.data( Qt::DecorationRole ).value<QIcon>();
677 painter->drawPixmap( iconRect, icon.pixmap( iconSize ) );
679 int const padding = 5;
680 QString
const name = index.data().toString();
681 const bool isFavorite = QSettings().contains(
"Favorites/" + name );
682 QSize
const bookmarkSize( 16, 16 );
683 QRect bookmarkRect( iconRect.bottomRight(), bookmarkSize );
684 bookmarkRect.translate( QPoint( -bookmarkSize.width() - padding, -bookmarkSize.height() - padding ) );
685 QIcon::Mode mode = isFavorite ? QIcon::Normal : QIcon::Disabled;
686 painter->drawPixmap( bookmarkRect, m_bookmarkIcon.pixmap( bookmarkSize, mode ) );
688 QTextDocument document;
689 document.setTextWidth( rect.width() - iconSize.width() - padding );
690 document.setDefaultFont( option.font );
691 document.setHtml( text( index ) );
693 QRect textRect = QRect( iconRect.topRight(), QSize( document.textWidth() - padding, rect.height() - padding ) );
695 painter->translate( textRect.topLeft() );
696 painter->setClipRect( textRect.translated( -textRect.topLeft() ) );
697 document.documentLayout()->draw( painter, paintContext );
701 QSize MapViewItemDelegate::sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index )
const
703 if ( index.column() == 0 ) {
704 QSize
const iconSize = option.decorationSize;
706 doc.setDefaultFont( option.font );
707 doc.setTextWidth( m_view->width() - iconSize.width() - 10 );
708 doc.setHtml( text( index ) );
709 return QSize( iconSize.width() + doc.size().width(), iconSize.height() );
715 QString MapViewItemDelegate::text(
const QModelIndex &index )
const
717 QString
const title = index.data().toString();
718 QString
const description = index.data( Qt::UserRole+2 ).toString();
719 return QString(
"<p><b>%1</b></p>%2").arg( title ).arg( description );
724 #include "MapViewWidget.moc"
QStandardItemModel * mapThemeModel()
Provides a model of the locally existing themes.
This file contains the headers for MarbleModel.
static QString localPath()
Flat projection ("plate carree")
static void deleteMapTheme(const QString &mapThemeId)
Deletes the map theme with the specified map theme ID.
static MarbleGlobal * getInstance()
The data model (not based on QAbstractModel) for a MarbleWidget.
The class that handles map themes that are locally available .
Profiles profiles() const
Projection
This enum is used to choose the projection shown in the view.
const QSize iconSize(16, 16)
QDebug mDebug()
a function to replace qDebug() in Marble library code
QStandardItemModel * celestialBodiesModel()
Provides a model of all installed planets.