Marble

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

KDE's Doxygen guidelines are available online.