Stellarium 0.13.2
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  QString userAgent;
76 
77 private slots:
78  void setNoSelectedInfo();
79  void setAllSelectedInfo();
80  void setBriefSelectedInfo();
84  void setSelectedInfoFromCheckBoxes();
85 
86  void updateCurrentLanguage();
87  void updateCurrentSkyLanguage();
88  void selectLanguage(const QString& languageCode);
89  void selectSkyLanguage(const QString& languageCode);
90  void setStartupTimeMode();
92  void showShortcutsWindow();
93  void setDiskViewport(bool);
94  void setSphericMirror(bool);
95  void cursorTimeOutChanged();
96  void cursorTimeOutChanged(double) {cursorTimeOutChanged();}
97 
98  void newStarCatalogData();
99  void downloadStars();
100  void cancelDownload();
101  void downloadFinished();
102  void downloadError(QNetworkReply::NetworkError);
103 
105  void updateConfigLabels();
106 
110  void browseForScreenshotDir();
111  void selectScreenshotDir(const QString& dir);
112 
116  void saveCurrentViewOptions();
117 
120  void setDefaultViewOptions();
121 
122  void populatePluginsList();
123  void pluginsSelectionChanged(QListWidgetItem *item, QListWidgetItem *previousItem);
124  void pluginConfigureCurrentSelection();
125  void loadAtStartupChanged(int);
126 
127  void setUpdatesFlag(bool b);
128 
129  void populateDeltaTAlgorithmsList();
130  void setDeltaTAlgorithm(int algorithmID);
131  void setDeltaTAlgorithmDescription();
132  void showCustomDeltaTEquationDialog();
133 
134  #ifndef DISABLE_SCRIPTING
135  void scriptSelectionChanged(const QString& s);
138 
140  void runScriptClicked();
142  void stopScriptClicked();
143 
144  void aScriptIsRunning();
145  void aScriptHasStopped();
146 
147  void populateScriptsList();
148  #endif
149  void setFixedDateTimeToCurrent();
150 
151 private:
152  StelGui* gui;
153 
154  CustomDeltaTEquationDialog* customDeltaTEquationDialog;
155 
156  int savedProjectionType;
157 
159  void updateSelectedInfoCheckBoxes();
162  void updateTabBarListWidgetWidth();
163 };
164 
165 #endif // _CONFIGURATIONDIALOG_HPP_
void styleChanged()
Notify that the application style changed.
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:44
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:49