• 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-kde
marble_part.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 2007 Tobias Koenig <tokoe@kde.org>
9 // Copyright 2008 Inge Wallin <inge@lysator.liu.se>
10 // Copyright 2009 Jens-Michael Hoffmann <jensmh@gmx.de>
11 // Copyright 2010 Harshit Jain <hjain.itbhu@gmail.com>
12 //
13 
14 #ifndef MARBLE_MARBLEPART_H
15 #define MARBLE_MARBLEPART_H
16 
17 #include <kparts/part.h>
18 #include <QHash>
19 #include <QDateTime>
20 #include <kmenu.h>
21 #include <kurl.h>
22 #include "MarbleGlobal.h"
23 #include "cloudsync/CloudSyncManager.h"
24 #include <krecentfilesaction.h>
25 
26 class KAboutData;
27 class KAction;
28 class KToggleAction;
29 class KConfigDialog;
30 class KToolBar;
31 
32 class QLabel;
33 class QPrinter;
34 class QProgressBar;
35 class QStandardItemModel;
36 
37 namespace KParts
38 {
39 class StatusBarExtension;
40 }
41 
42 namespace Marble
43 {
44 
45 class ControlView;
46 class DownloadRegionDialog;
47 class RoutingProfilesWidget;
48 class SunControlWidget;
49 class TimeControlWidget;
50 class GeoDataFolder;
51 
52 class MarblePart: public KParts::ReadOnlyPart
53 {
54  Q_OBJECT
55 
56  public:
57  MarblePart( QWidget *parentWidget, QObject *parent, const QVariantList& );
58  virtual ~MarblePart();
59 
60  ControlView *controlView() const;
61 
62  static KAboutData* createAboutData();
63  void createInfoBoxesMenu();
64  void createOnlineServicesMenu();
65  void createRenderPluginActions();
66 
67  void initializeCustomTimezone();
68 
69  public Q_SLOTS:
70  bool openUrl( const KUrl &url );
71  bool openFile();
72  void showPosition( const QString& position);
73  void showZoomLevel( const int );
74  void showDateTime();
75  void mapThemeChanged( const QString& newMapTheme );
76  void createPluginMenus();
77  void createFolderList();
78  void fallBackToDefaultTheme();
79 
80  private Q_SLOTS:
81  void exportMapScreenShot();
82  void printMapScreenShot();
83  void copyMap();
84  void copyCoordinates();
85  void setShowClouds( bool );
86  void setShowBookmarks( bool isChecked );
87  void showFullScreen( bool );
88  void showStatusBar( bool );
89 
95  void showDateTimeLabel( bool isChecked );
96 
102  void showPositionLabel( bool isChecked );
103 
109  void showAltitudeLabel( bool isChecked );
110 
116  void showTileZoomLevelLabel( bool isChecked );
117 
123  void showDownloadProgressBar( bool isChecked );
124 
125  void downloadJobAdded();
126  void downloadJobRemoved();
127 
128  void lockFloatItemPosition( bool );
129  void controlSun();
130  void controlTime();
131  void showSun( bool );
132  void lockToSubSolarPoint( bool );
133  void setSubSolarPointIconVisible( bool );
134  void workOffline( bool );
135 
136  void setupStatusBar();
137  void showNewStuffDialog();
138  void showUploadNewStuffDialog();
139  void showDownloadRegionDialog();
140  void downloadRegion();
141  void showStatusBarContextMenu( const QPoint& pos );
142  void showMapWizard();
143 
144  void editSettings();
145 
146  void enableApplyButton();
147  void applyPluginState();
148 
149  void updateSettings();
150 
151  void updateStatusBar();
152 
156  void writePluginSettings();
157 
161  void readPluginSettings();
162 
163  //Bookmark Menu
164  void openEditBookmarkDialog();
165  void setHome();
166  void openManageBookmarksDialog();
167  void createBookmarksListMenu( QMenu *, const GeoDataFolder& );
168  void lookAtBookmark( QAction * );
169 // void createBookmarkMenu();
170 
171  void updateMapEditButtonVisibility( const QString &mapTheme );
172 
173  private:
174  void setupActions();
175  void setupDownloadProgressBar();
176  void setupStatusBarActions();
177  QLabel * setupStatusBarLabel( const QString& templateString );
178 
179  void readSettings();
180  void readStatusBarSettings();
181  void writeSettings();
182  void writeStatusBarSettings();
183 
186  void updateTileZoomLevel();
187  void migrateNewstuffConfigFiles() const;
188  void repairNode( QDomNode node, const QString &child ) const;
189 
190  private:
191  // All the functionality is provided by this widget.
192  ControlView *m_controlView; // MarbleControlBox and MarbleWidget
193  SunControlWidget *m_sunControlDialog;
194  TimeControlWidget *m_timeControlDialog;
195  DownloadRegionDialog *m_downloadRegionDialog;
196 
197  // Actions for the GUI.
198  KAction *m_exportMapAction;
199  KAction *m_printMapAction;
200  KAction *m_printPreviewAction;
201  KAction *m_workOfflineAction;
202  KAction *m_copyMapAction;
203  KAction *m_copyCoordinatesAction;
204  KAction *m_showCloudsAction;
205  KAction *m_fullScreenAct;
206  KAction *m_openAct;
207  KAction *m_newStuffAction;
208  KAction *m_downloadRegionAction;
209  KAction *m_controlSunAction;
210  KAction *m_controlTimeAction;
211  KAction *m_lockFloatItemsAct;
212  KAction *m_mapWizardAct;
213  KAction *m_externalMapEditorAction;
214  KRecentFilesAction *m_recentFilesAction;
215 
216  //Bookmark Menu
217  KAction *m_addBookmarkAction;
218  KAction *m_toggleBookmarkDisplayAction;
219  KAction *m_setHomeAction;
220  KAction *m_manageBookmarksAction;
221  // Actions for the status bar
222  KAction *m_showPositionAction;
223  KAction *m_showDateTimeAction;
224  KAction *m_showAltitudeAction;
225  KAction *m_showTileZoomLevelAction;
226  KAction *m_showDownloadProgressAction;
227 
228  // Action for the tool bar
229  KToggleAction *m_showShadow;
230  KToggleAction *m_lockToSubSolarPoint;
231  KToggleAction *m_setSubSolarPointIconVisible;
232 
233  KConfigDialog *m_configDialog;
234 
235  QHash<QString, int> m_pluginEnabled;
236 
237  QString m_position;
238  QString m_clock;
239  QString m_tileZoomLevel;
240  KUrl m_lastFileOpenPath;
241 
242  // Items for the statusbar.
243  QLabel *m_positionLabel;
244  QLabel *m_clockLabel;
245  QLabel *m_distanceLabel;
246  QLabel *m_tileZoomLevelLabel;
247  QProgressBar *m_downloadProgressBar;
248 
249  KParts::StatusBarExtension *m_statusBarExtension;
250 
251  // Information about the graphics system
252  GraphicsSystem m_initialGraphicsSystem;
253  GraphicsSystem m_previousGraphicsSystem;
254 
255  QHash< int, int > m_timezone;
256  QMap<int, QString> m_externalEditorMapping;
257 };
258 
259 }
260 
261 #endif
Marble::MarblePart
Definition: marble_part.h:52
Marble::TimeControlWidget
Definition: TimeControlWidget.h:31
Marble::MarblePart::fallBackToDefaultTheme
void fallBackToDefaultTheme()
Definition: marble_part.cpp:1754
QWidget
Marble::SunControlWidget
Definition: SunControlWidget.h:31
QObject
Marble::MarblePart::createPluginMenus
void createPluginMenus()
Definition: marble_part.cpp:1035
Marble::MarblePart::createFolderList
void createFolderList()
Definition: marble_part.cpp:905
Marble::MarblePart::showZoomLevel
void showZoomLevel(const int)
Definition: marble_part.cpp:1018
Marble::MarblePart::showPosition
void showPosition(const QString &position)
Definition: marble_part.cpp:1012
Marble::MarblePart::openUrl
bool openUrl(const KUrl &url)
Definition: marble_part.cpp:221
MarbleGlobal.h
Marble::GeoDataFolder
Definition: GeoDataFolder.h:50
Marble::MarblePart::MarblePart
MarblePart(QWidget *parentWidget, QObject *parent, const QVariantList &)
Definition: marble_part.cpp:125
Marble::MarblePart::openFile
bool openFile()
Definition: marble_part.cpp:236
Marble::DownloadRegionDialog
Definition: DownloadRegionDialog.h:31
Marble::MarblePart::controlView
ControlView * controlView() const
Definition: marble_part.cpp:209
Marble::MarblePart::createAboutData
static KAboutData * createAboutData()
Definition: marble_part.cpp:214
Marble::MarblePart::mapThemeChanged
void mapThemeChanged(const QString &newMapTheme)
Definition: marble_part.cpp:1028
Marble::GraphicsSystem
GraphicsSystem
This enum is used to choose which graphics system Qt is using.
Definition: MarbleGlobal.h:91
Marble::MarblePart::createInfoBoxesMenu
void createInfoBoxesMenu()
Definition: marble_part.cpp:952
Marble::ControlView
Definition: ControlView.h:45
Marble::MarblePart::createOnlineServicesMenu
void createOnlineServicesMenu()
Definition: marble_part.cpp:968
CloudSyncManager.h
Marble::MarblePart::~MarblePart
virtual ~MarblePart()
Definition: marble_part.cpp:201
Marble::MarblePart::showDateTime
void showDateTime()
Definition: marble_part.cpp:1006
Marble::MarblePart::createRenderPluginActions
void createRenderPluginActions()
Definition: marble_part.cpp:988
Marble::MarblePart::initializeCustomTimezone
void initializeCustomTimezone()
Definition: marble_part.cpp:1700
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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