• 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
  • 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 CurrentLocationWidget;
39 class MapThemeManager;
40 class ConflictDialog;
41 class MarbleModel;
42 class MergeItem;
43 class CloudSyncManager;
44 
45 class ControlView : public QWidget
46 {
47  Q_OBJECT
48 
49  public:
50  explicit ControlView( QWidget * = 0 );
51  virtual ~ControlView();
52 
57  static QString applicationVersion();
58 
59  MarbleWidget *marbleWidget() const { return m_marbleWidget; }
60  MarbleModel *marbleModel() { return m_marbleWidget->model(); }
61  MapThemeManager *mapThemeManager();
62 
63  void zoomIn();
64  void zoomOut();
65  void moveLeft();
66  void moveRight();
67  void moveUp();
68  void moveDown();
69 
70  void addGeoDataFile( QString filename );
71 
72  QPixmap mapScreenShot() { return m_marbleWidget->mapScreenShot(); }
73 
79  QString defaultMapThemeId() const;
80 
84  QString externalMapEditor() const;
85 
90  void setExternalMapEditor( const QString &editor );
91 
92  QList<QAction*> setupDockWidgets( QMainWindow* mainWindow );
93 
94  CurrentLocationWidget* currentLocationWidget();
95 
96  void setWorkOffline( bool workOffline );
97 
98  CloudSyncManager* cloudSyncManager();
99 
100  public slots:
101  void printMapScreenShot( QPointer<QPrintDialog> dialog );
102  void printPixmap( QPrinter * printer, const QPixmap& pixmap );
103  void printPreview();
104  void paintPrintPreview( QPrinter * printer );
105 
109  void launchExternalMapEditor();
110 
111 signals:
112  void showMapWizard();
113  void showUploadDialog();
114  void mapThemeDeleted();
115 
116 private Q_SLOTS:
117  void showSearch();
118  // Bookmark sync slots
119  void showConflictDialog( MergeItem *item );
120 
121  private:
129  void synchronizeWithExternalMapEditor( const QString &application, const QString &argument );
130 
131  void printMap( QTextDocument &document, QString &text, QPrinter *printer );
132  void printLegend( QTextDocument &document, QString &text );
133  void printRouteSummary( QTextDocument &document, QString &text );
134  void printDrivingInstructions( QTextDocument &document, QString &text );
135  void printDrivingInstructionsAdvice( QTextDocument &document, QString &text );
136 
137  MapThemeManager *const m_mapThemeManager;
138  MarbleWidget *m_marbleWidget;
139  QString m_externalEditor;
140  QDockWidget *m_searchDock;
141  CurrentLocationWidget* m_locationWidget;
142  ConflictDialog *m_conflictDialog;
143  CloudSyncManager *m_cloudSyncManager;
144 };
145 
146 }
147 
148 #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:142
Marble::ControlView::printMapScreenShot
void printMapScreenShot(QPointer< QPrintDialog > dialog)
Definition: ControlView.cpp:164
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:414
Marble::ControlView::mapThemeManager
MapThemeManager * mapThemeManager()
Definition: ControlView.cpp:107
QWidget
MapThemeManager
Provides access to all map themes installed locally.
Definition: DeclarativeMapThemeManager.h:40
Marble::ControlView::mapThemeDeleted
void mapThemeDeleted()
Marble::ControlView::printPixmap
void printPixmap(QPrinter *printer, const QPixmap &pixmap)
Definition: ControlView.cpp:225
Marble::ControlView::zoomIn
void zoomIn()
Definition: ControlView.cpp:112
Marble::MarbleWidget::mapScreenShot
QPixmap mapScreenShot()
Return a QPixmap with the current contents of the widget.
Definition: MarbleWidget.cpp:412
Marble::ControlView::cloudSyncManager
CloudSyncManager * cloudSyncManager()
Definition: ControlView.cpp:604
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:102
Marble::ControlView::applicationVersion
static QString applicationVersion()
Returns the version of the Marble applications (which differs from the Marble library version)...
Definition: ControlView.cpp:102
Marble::ControlView::moveDown
void moveDown()
Definition: ControlView.cpp:137
Marble::CurrentLocationWidget
Definition: CurrentLocationWidget.h:30
Marble::ControlView::moveLeft
void moveLeft()
Definition: ControlView.cpp:122
Marble::ControlView::moveUp
void moveUp()
Definition: ControlView.cpp:132
Marble::ControlView::externalMapEditor
QString externalMapEditor() const
Returns the editor used to launch a map editor application.
Definition: ControlView.cpp:609
Marble::ControlView::paintPrintPreview
void paintPrintPreview(QPrinter *printer)
Definition: ControlView.cpp:258
Marble::MarbleWidget::model
MarbleModel * model() const
Return the model that this view shows.
Definition: MarbleWidget.cpp:283
Marble::ControlView::mapScreenShot
QPixmap mapScreenShot()
Definition: ControlView.h:72
Marble::MergeItem
Definition: MergeItem.h:23
Marble::ControlView::moveRight
void moveRight()
Definition: ControlView.cpp:127
Marble::ControlView::marbleWidget
MarbleWidget * marbleWidget() const
Definition: ControlView.h:59
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
Marble::ControlView::printPreview
void printPreview()
Definition: ControlView.cpp:244
Marble::ControlView::~ControlView
virtual ~ControlView()
Definition: ControlView.cpp:97
Marble::MapThemeManager
The class that handles map themes that are locally available .
Definition: MapThemeManager.h:48
Marble::ControlView::setExternalMapEditor
void setExternalMapEditor(const QString &editor)
Change the editor to launch via.
Definition: ControlView.cpp:496
QMainWindow
Marble::ControlView::setWorkOffline
void setWorkOffline(bool workOffline)
Definition: ControlView.cpp:596
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::ControlView::addGeoDataFile
void addGeoDataFile(QString filename)
Definition: ControlView.cpp:614
Marble::ControlView::zoomOut
void zoomOut()
Definition: ControlView.cpp:117
Marble::ControlView::ControlView
ControlView(QWidget *=0)
Definition: ControlView.cpp:67
Marble::ControlView::currentLocationWidget
CurrentLocationWidget * currentLocationWidget()
Definition: ControlView.cpp:591
Marble::ControlView
Definition: ControlView.h:45
Marble::ControlView::marbleModel
MarbleModel * marbleModel()
Definition: ControlView.h:60
Marble::CloudSyncManager
Definition: CloudSyncManager.h:25
Marble::ControlView::setupDockWidgets
QList< QAction * > setupDockWidgets(QMainWindow *mainWindow)
Definition: ControlView.cpp:501
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 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