Stellarium  0.16.1
ConfigurationDialog.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2008 Fabien Chereau
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18 */
19 
20 #ifndef _CONFIGURATIONDIALOG_HPP_
21 #define _CONFIGURATIONDIALOG_HPP_
22 
23 #include <QObject>
24 #include <QNetworkReply>
25 #include <QFile>
26 #include "StelDialog.hpp"
27 
28 class Ui_configurationDialogForm;
29 class QSettings;
30 class QDataStream;
31 class QNetworkAccessManager;
32 class QListWidgetItem;
33 class StelGui;
35 
37 {
38  Q_OBJECT
39 public:
40  ConfigurationDialog(StelGui* agui, QObject* parent);
41  virtual ~ConfigurationDialog();
43  void styleChanged();
44 
45 public slots:
46  void retranslate();
47 
48 protected:
50  virtual void createDialogContent();
51  Ui_configurationDialogForm* ui;
52 
53 private:
55  QVariantMap nextStarCatalogToDownload;
59  void resetStarCatalogControls();
62  void updateStarCatalogControlsText();
64  bool isDownloadingStarCatalog;
66  int nextStarCatalogToDownloadIndex;
68  int starCatalogsCount;
70  bool hasDownloadedStarCatalog;
71  QNetworkReply* starCatalogDownloadReply;
72  QFile* currentDownloadFile;
73  class StelProgressController* progressBar;
74 
75 private slots:
76  void setNoSelectedInfo();
77  void setAllSelectedInfo();
78  void setBriefSelectedInfo();
82  void setSelectedInfoFromCheckBoxes();
83 
84  void updateCurrentLanguage();
85  void updateCurrentSkyLanguage();
86  void selectLanguage(const QString& languageCode);
87  void selectSkyLanguage(const QString& languageCode);
88  void setStartupTimeMode();
90  void showShortcutsWindow();
91  void setDiskViewport(bool);
92  void setSphericMirror(bool);
93  void cursorTimeOutChanged();
94  void cursorTimeOutChanged(double) {cursorTimeOutChanged();}
95  void usageButtonsBackgroundChanged(bool b);
96 
97  void updateStartPointForAzimuth(bool b);
98  void updateSettingFormattingOutput(bool b);
99  void updateSettingCCSDesignations(bool b);
100 
101  void newStarCatalogData();
102  void downloadStars();
103  void cancelDownload();
104  void downloadFinished();
105  void downloadError(QNetworkReply::NetworkError);
106  void resetEphemControls();
107 
109  void updateConfigLabels();
110 
114  void browseForScreenshotDir();
115  void selectScreenshotDir(const QString& dir);
116 
120  void saveAllSettings();
122  void saveCurrentViewDirSettings();
123 
126  void setDefaultViewOptions();
127 
128  void populatePluginsList();
129  void pluginsSelectionChanged(QListWidgetItem *item, QListWidgetItem *previousItem);
130  void pluginConfigureCurrentSelection();
131  void loadAtStartupChanged(int);
132 
133  void populateDeltaTAlgorithmsList();
134  void setDeltaTAlgorithm(int algorithmID);
135  void setDeltaTAlgorithmDescription();
136  void showCustomDeltaTEquationDialog();
137 
138  void populateDateFormatsList();
139  void setDateFormat();
140 
141  void populateTimeFormatsList();
142  void setTimeFormat();
143 
144  void setButtonBarDTFormat();
145 
146  #ifndef DISABLE_SCRIPTING
147  void scriptSelectionChanged(const QString& s);
150 
152  void runScriptClicked();
154  void stopScriptClicked();
155 
156  void aScriptIsRunning();
157  void aScriptHasStopped();
158 
159  void populateScriptsList();
160  #endif
161  void setFixedDateTimeToCurrent();
162 
163  void de430ButtonClicked();
164  void de431ButtonClicked();
165 
166 private:
167  StelGui* gui;
168 
169  CustomDeltaTEquationDialog* customDeltaTEquationDialog;
170 
171  int savedProjectionType;
172 
174  void updateSelectedInfoCheckBoxes();
177  void updateTabBarListWidgetWidth();
178 };
179 
180 #endif // _CONFIGURATIONDIALOG_HPP_
void styleChanged()
Notify that the application style changed.
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
Maintain the state of a progress bar.
virtual void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.
Main class for the GUI based on QGraphicView.
Definition: StelGui.hpp:53