• 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-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 #include <KDE/KWallet/Wallet>
26 
27 #include "ui_MarbleCloudSyncSettingsWidget.h"
28 
29 class KAboutData;
30 class KAction;
31 class KToggleAction;
32 class KConfigDialog;
33 class KToolBar;
34 
35 class QLabel;
36 class QPrinter;
37 class QProgressBar;
38 class QStandardItemModel;
39 
40 namespace KParts
41 {
42 class StatusBarExtension;
43 }
44 
45 namespace Marble
46 {
47 
48 class MovieCaptureDialog;
49 class ControlView;
50 class DownloadRegionDialog;
51 class RoutingProfilesWidget;
52 class SunControlWidget;
53 class TimeControlWidget;
54 class GeoDataFolder;
55 
56 class MarblePart: public KParts::ReadOnlyPart
57 {
58  Q_OBJECT
59 
60  public:
61  MarblePart( QWidget *parentWidget, QObject *parent, const QVariantList& );
62  virtual ~MarblePart();
63 
64  ControlView *controlView() const;
65 
66  static KAboutData* createAboutData();
67  void createInfoBoxesMenu();
68  void createOnlineServicesMenu();
69  void createRenderPluginActions();
70 
71  void readTrackingSettings();
72 
73  void initializeCustomTimezone();
74 
75  public Q_SLOTS:
76  bool openUrl( const KUrl &url );
77  bool openFile();
78  void showPosition( const QString& position);
79  void showZoomLevel( const int );
80  void showDateTime();
81  void mapThemeChanged( const QString& newMapTheme );
82  void createPluginMenus();
83  void createFolderList();
84  void fallBackToDefaultTheme();
85 
86  private Q_SLOTS:
87  void exportMapScreenShot();
88  void printMapScreenShot();
89  void copyMap();
90  void copyCoordinates();
91  void setShowClouds( bool );
92  void setShowBookmarks( bool isChecked );
93  void showFullScreen( bool );
94  void showStatusBar( bool );
95  void changeRecordingState();
96 
102  void showDateTimeLabel( bool isChecked );
103 
109  void showPositionLabel( bool isChecked );
110 
116  void showAltitudeLabel( bool isChecked );
117 
123  void showTileZoomLevelLabel( bool isChecked );
124 
130  void showDownloadProgressBar( bool isChecked );
131 
132  void handleProgress( int active, int queued);
133  void removeProgressItem();
134 
135  void lockFloatItemPosition( bool );
136  void controlSun();
137  void controlTime();
138  void showSun( bool );
139  void lockToSubSolarPoint( bool );
140  void setSubSolarPointIconVisible( bool );
141  void workOffline( bool );
142 
143  void setupStatusBar();
144  void showNewStuffDialog();
145  void showUploadNewStuffDialog();
146  void showDownloadRegionDialog();
147  void downloadRegion();
148  void showStatusBarContextMenu( const QPoint& pos );
149  void showMapWizard();
150 
151  void editSettings();
152 
153  void enableApplyButton();
154  void applyPluginState();
155 
156  void updateSettings();
157 
158  void updateStatusBar();
159 
160  void updateCloudSyncStatus(const QString &status);
161 
165  void writePluginSettings();
166 
170  void readPluginSettings();
171 
172  //Bookmark Menu
173  void openEditBookmarkDialog();
174  void setHome();
175  void openManageBookmarksDialog();
176  void createBookmarksListMenu( QMenu *, const GeoDataFolder& );
177  void lookAtBookmark( QAction * );
178 // void createBookmarkMenu();
179 
180  void updateMapEditButtonVisibility( const QString &mapTheme );
181  void showMovieCaptureDialog();
182  void stopRecording();
183  void updateCloudSyncCredentials();
184 
185  private:
186  void setupActions();
187  void setupDownloadProgressBar();
188  void setupStatusBarActions();
189  QLabel * setupStatusBarLabel( const QString& templateString );
190 
191  void readSettings();
192  void readStatusBarSettings();
193  void writeSettings();
194  void writeStatusBarSettings();
195 
198  void updateTileZoomLevel();
199  void migrateNewstuffConfigFiles() const;
200  static void repairNode( QDomNode node, const QString &child );
201 
202  private:
203  // All the functionality is provided by this widget.
204  ControlView *m_controlView; // MarbleControlBox and MarbleWidget
205  SunControlWidget *m_sunControlDialog;
206  TimeControlWidget *m_timeControlDialog;
207  DownloadRegionDialog *m_downloadRegionDialog;
208  MovieCaptureDialog *m_movieCaptureDialog;
209 
210  // Actions for the GUI.
211  KAction *m_exportMapAction;
212  KAction *m_printMapAction;
213  KAction *m_printPreviewAction;
214  KAction *m_workOfflineAction;
215  KAction *m_copyMapAction;
216  KAction *m_copyCoordinatesAction;
217  KAction *m_showCloudsAction;
218  KAction *m_fullScreenAct;
219  KAction *m_openAct;
220  KAction *m_newStuffAction;
221  KAction *m_downloadRegionAction;
222  KAction *m_controlSunAction;
223  KAction *m_controlTimeAction;
224  KAction *m_lockFloatItemsAct;
225  KAction *m_mapWizardAct;
226  KAction *m_externalMapEditorAction;
227  KAction *m_recordMovieAction;
228  KAction *m_stopRecordingAction;
229  KRecentFilesAction *m_recentFilesAction;
230 
231  //Bookmark Menu
232  KAction *m_addBookmarkAction;
233  KAction *m_toggleBookmarkDisplayAction;
234  KAction *m_setHomeAction;
235  KAction *m_manageBookmarksAction;
236  // Actions for the status bar
237  KAction *m_showPositionAction;
238  KAction *m_showDateTimeAction;
239  KAction *m_showAltitudeAction;
240  KAction *m_showTileZoomLevelAction;
241  KAction *m_showDownloadProgressAction;
242 
243  // Action for the tool bar
244  KToggleAction *m_showShadow;
245  KToggleAction *m_lockToSubSolarPoint;
246  KToggleAction *m_setSubSolarPointIconVisible;
247 
248  KConfigDialog *m_configDialog;
249 
250  QHash<QString, int> m_pluginEnabled;
251 
252  KWallet::Wallet *m_wallet;
253 
254  QString m_position;
255  QString m_clock;
256  QString m_tileZoomLevel;
257  KUrl m_lastFileOpenPath;
258 
259  // Items for the statusbar.
260  QLabel *m_positionLabel;
261  QLabel *m_clockLabel;
262  QLabel *m_distanceLabel;
263  QLabel *m_tileZoomLevelLabel;
264  QProgressBar *m_downloadProgressBar;
265 
266  KParts::StatusBarExtension *m_statusBarExtension;
267 
268  // Information about the graphics system
269  GraphicsSystem m_initialGraphicsSystem;
270  GraphicsSystem m_previousGraphicsSystem;
271 
272  QHash< int, int > m_timezone;
273  QMap<int, QString> m_externalEditorMapping;
274  Ui_MarbleCloudSyncSettingsWidget m_ui_cloudSyncSettings;
275 };
276 
277 }
278 
279 #endif
Marble::MarblePart
Definition: marble_part.h:56
Marble::TimeControlWidget
Definition: TimeControlWidget.h:31
QProgressBar
QStandardItemModel
QWidget
Marble::MarblePart::fallBackToDefaultTheme
void fallBackToDefaultTheme()
Definition: marble_part.cpp:1915
QPrinter
QMap< int, QString >
Marble::SunControlWidget
Definition: SunControlWidget.h:31
QPoint
QDomNode
Marble::MarblePart::createPluginMenus
void createPluginMenus()
Definition: marble_part.cpp:1158
Marble::MovieCaptureDialog
Definition: MovieCaptureDialog.h:27
QHash< QString, int >
Marble::MarblePart::createFolderList
void createFolderList()
Definition: marble_part.cpp:1028
QObject
Marble::MarblePart::showZoomLevel
void showZoomLevel(const int)
Definition: marble_part.cpp:1141
Marble::MarblePart::showPosition
void showPosition(const QString &position)
Definition: marble_part.cpp:1135
Marble::MarblePart::openUrl
bool openUrl(const KUrl &url)
Definition: marble_part.cpp:229
QString
MarbleGlobal.h
Marble::GeoDataFolder
Definition: GeoDataFolder.h:50
Marble::MarblePart::MarblePart
MarblePart(QWidget *parentWidget, QObject *parent, const QVariantList &)
Definition: marble_part.cpp:129
QMenu
Marble::MarblePart::openFile
bool openFile()
Definition: marble_part.cpp:244
Marble::MarblePart::readTrackingSettings
void readTrackingSettings()
Definition: marble_part.cpp:621
Marble::DownloadRegionDialog
Definition: DownloadRegionDialog.h:31
QAction
Marble::MarblePart::controlView
ControlView * controlView() const
Definition: marble_part.cpp:217
Marble::MarblePart::createAboutData
static KAboutData * createAboutData()
Definition: marble_part.cpp:222
Marble::MarblePart::mapThemeChanged
void mapThemeChanged(const QString &newMapTheme)
Definition: marble_part.cpp:1151
Marble::GraphicsSystem
GraphicsSystem
This enum is used to choose which graphics system Qt is using.
Definition: MarbleGlobal.h:93
Marble::MarblePart::createInfoBoxesMenu
void createInfoBoxesMenu()
Definition: marble_part.cpp:1075
QLabel
Marble::ControlView
Definition: ControlView.h:46
Marble::MarblePart::createOnlineServicesMenu
void createOnlineServicesMenu()
Definition: marble_part.cpp:1091
CloudSyncManager.h
Marble::MarblePart::~MarblePart
virtual ~MarblePart()
Definition: marble_part.cpp:209
Marble::MarblePart::showDateTime
void showDateTime()
Definition: marble_part.cpp:1129
Marble::MarblePart::createRenderPluginActions
void createRenderPluginActions()
Definition: marble_part.cpp:1111
Marble::MarblePart::initializeCustomTimezone
void initializeCustomTimezone()
Definition: marble_part.cpp:1861
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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