Marble

QtMarbleConfigDialog.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2009 Bastian Holst <[email protected]>
4 //
5 
6 #ifndef MARBLE_QTMARBLECONFIGDIALOG_H
7 #define MARBLE_QTMARBLECONFIGDIALOG_H
8 
9 #include <QDialog>
10 
11 #include "marble_export.h"
12 #include "MarbleGlobal.h"
13 #include "MarbleLocale.h"
14 
15 namespace Marble
16 {
17 
18 class MarbleWidget;
19 class CloudSyncManager;
20 
21 class QtMarbleConfigDialogPrivate;
22 
23 class MARBLE_EXPORT QtMarbleConfigDialog : public QDialog
24 {
25  Q_OBJECT
26 
27  public:
28  explicit QtMarbleConfigDialog(MarbleWidget *marbleWidget, CloudSyncManager *syncManager = nullptr,
29  QWidget *parent = nullptr );
30  ~QtMarbleConfigDialog() override;
31 
32  // View Settings
33 
34  MarbleLocale::MeasurementSystem measurementSystem() const;
35  Marble::AngleUnit angleUnit() const;
36  void setAngleUnit(Marble::AngleUnit unit);
37  Marble::MapQuality stillQuality() const;
38  Marble::MapQuality animationQuality() const;
39  QFont mapFont() const;
40 
41  // Navigation Settings
42  int onStartup() const;
43  bool animateTargetVoyage() const;
44  QString externalMapEditor() const;
45  bool inertialEarthRotation() const;
46  bool mouseViewRotation() const;
47 
48  // Cache Settings
49  int volatileTileCacheLimit() const;
50  int persistentTileCacheLimit() const;
51  QString proxyUrl() const;
52  int proxyPort() const;
53 
54  QString proxyUser() const;
55  QString proxyPass() const;
56  bool proxyType() const;
57  bool proxyAuth() const;
58 
59  // Time Settings
60  /**
61  * Read the value of 'Time/systemTime' key from settings
62  */
63  bool systemTime() const;
64 
65  /**
66  * Read the value of 'Time/lastSessionTime' key from settings
67  */
68  bool lastSessionTime() const;
69 
70  /**
71  * Read the value of 'Time/systemTimezone' key from settings
72  */
73  bool systemTimezone() const;
74 
75  /**
76  * Read the value of 'Time/UTC' key from settings
77  */
78  bool UTC() const;
79 
80  /**
81  * Read the value of 'Time/customTimezone' key from settings
82  */
83  bool customTimezone() const;
84 
85  /**
86  * Read the value of 'Time/chosenTimezone' key from settings
87  */
88  int chosenTimezone() const;
89 
90  void initializeCustomTimezone();
91 
92  // CloudSync settings
93  bool syncEnabled() const;
94  QString syncBackend() const;
95  bool syncBookmarks() const;
96  bool syncRoutes() const;
97  QString owncloudServer() const;
98  QString owncloudUsername() const;
99  QString owncloudPassword() const;
100 
101  Q_SIGNALS:
102  /**
103  * This signal is emitted when the loaded settings were changed.
104  * Either by the user or by loading them initially from disk.
105  */
106  void settingsChanged();
107 
108  /**
109  * The user clicked on the button to clear volatile tile cache.
110  */
111  void clearVolatileCacheClicked();
112 
113  /**
114  * The user clicked on the button to clear persistent tile cache.
115  */
116  void clearPersistentCacheClicked();
117 
118  /**
119  * The user clicked on the button to manually synchronize bookmarks.
120  */
121  void syncNowClicked();
122 
123  public Q_SLOTS:
124  /**
125  * Disable "Sync Now" button while sync or for 30 sec of timout
126  */
127  void disableSyncNow();
128  void enableSyncNow();
129 
130  /**
131  * Sets new title for the "Last Sync" label indicator
132  */
133  void updateLastSync();
134 
135  /**
136  * Read settings and update interface.
137  */
138  void readSettings();
139 
140  /**
141  * Show status on cloud sync settings tab
142  */
143  void updateCloudSyncStatus( const QString &status );
144 
145  /**
146  * Write settings to disk.
147  */
148  void writeSettings();
149 
150  private Q_SLOTS:
151  /**
152  * Synchronize the loaded settings with the file on hard disk.
153  */
154  void syncSettings();
155 
156  void updateCloudSyncCredentials();
157 
158  private:
159  Q_DISABLE_COPY( QtMarbleConfigDialog )
160 
161  QtMarbleConfigDialogPrivate * const d;
162 };
163 
164 } // Marble namespace
165 
166 #endif
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:74
Q_SCRIPTABLE CaptureState status()
Binds a QML item to a specific geodetic location in screen coordinates.
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:09 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.