• 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
  • apps
  • marble-ui
ControlView.h
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 2005-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 //
11 
12 //
13 // Testapplication with controls
14 //
15 
16 
17 #ifndef MARBLE_CONTROLVIEW_H
18 #define MARBLE_CONTROLVIEW_H
19 
20 
21 #include <QWidget>
22 #include <QPixmap>
23 #include <QPointer>
24 
25 #include "MarbleWidget.h"
26 
27 class QSplitter;
28 class QPrintDialog;
29 class QTextDocument;
30 class QMainWindow;
31 class QDockWidget;
32 class QMenu;
33 class QPrinter;
34 
35 namespace Marble
36 {
37 
38 class TourWidget;
39 class CurrentLocationWidget;
40 class MapThemeManager;
41 class ConflictDialog;
42 class MarbleModel;
43 class MergeItem;
44 class CloudSyncManager;
45 
46 class ControlView : public QWidget
47 {
48  Q_OBJECT
49 
50  public:
51  explicit ControlView( QWidget * = 0 );
52  virtual ~ControlView();
53 
58  static QString applicationVersion();
59 
60  MarbleWidget *marbleWidget() { return m_marbleWidget; }
61  MarbleModel *marbleModel() { return m_marbleWidget->model(); }
62  MapThemeManager *mapThemeManager();
63 
64  void zoomIn();
65  void zoomOut();
66  void moveLeft();
67  void moveRight();
68  void moveUp();
69  void moveDown();
70 
71  void addGeoDataFile( QString filename );
72 
73  QPixmap mapScreenShot() { return m_marbleWidget->mapScreenShot(); }
74 
80  QString defaultMapThemeId() const;
81 
85  QString externalMapEditor() const;
86 
91  void setExternalMapEditor( const QString &editor );
92 
93  QList<QAction*> setupDockWidgets( QMainWindow* mainWindow );
94 
95  CurrentLocationWidget* currentLocationWidget();
96 
97  void setWorkOffline( bool workOffline );
98 
99  CloudSyncManager* cloudSyncManager();
100 
105  void openGeoUri( const QString& geoUriString );
106 
107  public slots:
108  void printMapScreenShot( QPointer<QPrintDialog> dialog );
109  void printPreview();
110  void paintPrintPreview( QPrinter * printer );
111 
115  void launchExternalMapEditor();
116 
120  void togglePanelVisibility();
121 
122  void handleTourLinkClicked( const QString &path );
123 
124 signals:
125  void showMapWizard();
126  void showUploadDialog();
127  void mapThemeDeleted();
128 
129 private Q_SLOTS:
130  void showSearch();
131  // Bookmark sync slots
132  void showConflictDialog( MergeItem *item );
133 
134  private:
142  void synchronizeWithExternalMapEditor( const QString &application, const QString &argument );
143 
144  static void printPixmap( QPrinter * printer, const QPixmap& pixmap );
145  void printMap( QTextDocument &document, QString &text, QPrinter *printer );
146  void printLegend( QTextDocument &document, QString &text );
147  void printRouteSummary( QTextDocument &document, QString &text );
148  void printDrivingInstructions( QTextDocument &document, QString &text );
149  static void printDrivingInstructionsAdvice( QTextDocument &document, QString &text );
150 
151  MapThemeManager *const m_mapThemeManager;
152  MarbleWidget *m_marbleWidget;
153  QString m_externalEditor;
154  QDockWidget *m_searchDock;
155  CurrentLocationWidget* m_locationWidget;
156  ConflictDialog *m_conflictDialog;
157  CloudSyncManager *m_cloudSyncManager;
158  QAction *m_togglePanelVisibilityAction;
159  QList<QAction*> m_panelActions;
160  QList<bool> m_panelVisibility;
161  bool m_isPanelVisible;
162  TourWidget *m_tourWidget;
163 };
164 
165 }
166 
167 #endif
Marble::ControlView::showMapWizard
void showMapWizard()
Marble::ControlView::defaultMapThemeId
QString defaultMapThemeId() const
Returns a default map theme: earth/srtm/srtm.dgml if installed, any other theme id if earth/srtm/srtm...
Definition: ControlView.cpp:149
Marble::ControlView::printMapScreenShot
void printMapScreenShot(QPointer< QPrintDialog > dialog)
Definition: ControlView.cpp:171
QWidget
Marble::ControlView::showUploadDialog
void showUploadDialog()
Marble::ConflictDialog
Definition: ConflictDialog.h:22
Marble::ControlView::launchExternalMapEditor
void launchExternalMapEditor()
Start the configured external map editor (or update it if it is already running)
Definition: ControlView.cpp:442
Marble::ControlView::mapThemeManager
MapThemeManager * mapThemeManager()
Definition: ControlView.cpp:114
QDockWidget
QPrinter
MapThemeManager
Provides access to all map themes installed locally.
Definition: DeclarativeMapThemeManager.h:40
Marble::ControlView::mapThemeDeleted
void mapThemeDeleted()
QPointer
Marble::TourWidget
Definition: TourWidget.h:142
Marble::ControlView::zoomIn
void zoomIn()
Definition: ControlView.cpp:119
Marble::ControlView::togglePanelVisibility
void togglePanelVisibility()
Toggles all of the docking panels on or off.
Definition: ControlView.cpp:714
Marble::MarbleWidget::mapScreenShot
QPixmap mapScreenShot()
Return a QPixmap with the current contents of the widget.
Definition: MarbleWidget.cpp:385
Marble::ControlView::cloudSyncManager
CloudSyncManager * cloudSyncManager()
Definition: ControlView.cpp:676
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Marble::ControlView::applicationVersion
static QString applicationVersion()
Returns the version of the Marble applications (which differs from the Marble library version)...
Definition: ControlView.cpp:109
Marble::ControlView::moveDown
void moveDown()
Definition: ControlView.cpp:144
Marble::CurrentLocationWidget
Definition: CurrentLocationWidget.h:30
Marble::ControlView::moveLeft
void moveLeft()
Definition: ControlView.cpp:129
QPrintDialog
Marble::ControlView::moveUp
void moveUp()
Definition: ControlView.cpp:139
Marble::ControlView::externalMapEditor
QString externalMapEditor() const
Returns the editor used to launch a map editor application.
Definition: ControlView.cpp:681
Marble::ControlView::paintPrintPreview
void paintPrintPreview(QPrinter *printer)
Definition: ControlView.cpp:286
Marble::MarbleWidget::model
MarbleModel * model()
Return the model that this view shows.
Definition: MarbleWidget.cpp:289
Marble::ControlView::handleTourLinkClicked
void handleTourLinkClicked(const QString &path)
Definition: ControlView.cpp:745
QString
QList< QAction * >
Marble::ControlView::mapScreenShot
QPixmap mapScreenShot()
Definition: ControlView.h:73
QMainWindow
Marble::MergeItem
Definition: MergeItem.h:23
QPixmap
Marble::ControlView::moveRight
void moveRight()
Definition: ControlView.cpp:134
QMenu
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QSplitter
Marble::ControlView::printPreview
void printPreview()
Definition: ControlView.cpp:272
Marble::ControlView::~ControlView
virtual ~ControlView()
Definition: ControlView.cpp:104
Marble::MapThemeManager
The class that handles map themes that are locally available .
Definition: MapThemeManager.h:48
Marble::ControlView::openGeoUri
void openGeoUri(const QString &geoUriString)
Opens the passed Geo URI.
Definition: ControlView.cpp:232
Marble::ControlView::setExternalMapEditor
void setExternalMapEditor(const QString &editor)
Change the editor to launch via.
Definition: ControlView.cpp:524
QTextDocument
QAction
Marble::ControlView::setWorkOffline
void setWorkOffline(bool workOffline)
Definition: ControlView.cpp:668
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::ControlView::addGeoDataFile
void addGeoDataFile(QString filename)
Definition: ControlView.cpp:686
Marble::ControlView::zoomOut
void zoomOut()
Definition: ControlView.cpp:124
Marble::ControlView::ControlView
ControlView(QWidget *=0)
Definition: ControlView.cpp:71
Marble::ControlView::currentLocationWidget
CurrentLocationWidget * currentLocationWidget()
Definition: ControlView.cpp:663
Marble::ControlView::marbleWidget
MarbleWidget * marbleWidget()
Definition: ControlView.h:60
Marble::ControlView
Definition: ControlView.h:46
Marble::ControlView::marbleModel
MarbleModel * marbleModel()
Definition: ControlView.h:61
Marble::CloudSyncManager
Definition: CloudSyncManager.h:24
Marble::ControlView::setupDockWidgets
QList< QAction * > setupDockWidgets(QMainWindow *mainWindow)
Definition: ControlView.cpp:529
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