00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CONFIGURATIONDIALOG_HPP_
00021 #define _CONFIGURATIONDIALOG_HPP_
00022
00023 #include <QObject>
00024 #include <QProgressBar>
00025 #include <QNetworkReply>
00026 #include <QFile>
00027 #include "StelDialog.hpp"
00028
00029 class Ui_configurationDialogForm;
00030 class QSettings;
00031 class QDataStream;
00032 class QNetworkAccessManager;
00033 class QListWidgetItem;
00034 class StelGui;
00035
00036 class ConfigurationDialog : public StelDialog
00037 {
00038 Q_OBJECT
00039 public:
00040 ConfigurationDialog(StelGui* agui);
00041 virtual ~ConfigurationDialog();
00042 void languageChanged();
00044 void styleChanged();
00045 protected:
00047 virtual void createDialogContent();
00048 Ui_configurationDialogForm* ui;
00049
00050 private:
00052 QVariantMap nextStarCatalogToDownload;
00054 void refreshStarCatalogButton();
00056 bool hasDownloadedStarCatalog;
00057 QNetworkReply* starCatalogDownloadReply;
00058 QFile* currentDownloadFile;
00059 QProgressBar* progressBar;
00060
00061 private slots:
00062 void setNoSelectedInfo(void);
00063 void setAllSelectedInfo(void);
00064 void setBriefSelectedInfo(void);
00065 void languageChanged(const QString& languageCode);
00066 void setStartupTimeMode();
00067 void setDiskViewport(bool);
00068 void setSphericMirror(bool);
00069 void cursorTimeOutChanged();
00070 void cursorTimeOutChanged(double) {cursorTimeOutChanged();}
00071
00072 void newStarCatalogData();
00073 void downloadStars();
00074 void cancelDownload();
00075 void downloadFinished();
00076 void downloadError(QNetworkReply::NetworkError);
00077
00079 void updateConfigLabels();
00080
00084 void browseForScreenshotDir();
00085 void selectScreenshotDir(const QString& dir);
00086
00090 void saveCurrentViewOptions();
00091
00094 void setDefaultViewOptions();
00095
00096 void populatePluginsList();
00097 void pluginsSelectionChanged(const QString&);
00098 void pluginConfigureCurrentSelection();
00099 void loadAtStartupChanged(int);
00100
00103 void scriptSelectionChanged(const QString& s);
00104
00106 void runScriptClicked();
00108 void stopScriptClicked();
00109
00110 void aScriptIsRunning();
00111 void aScriptHasStopped();
00112
00113 void populateScriptsList();
00114 void setFixedDateTimeToCurrent();
00115
00116 void changePage(QListWidgetItem *current, QListWidgetItem *previous);
00117
00118 private:
00119 StelGui* gui;
00120
00121 int savedProjectionType;
00122 };
00123
00124 #endif // _CONFIGURATIONDIALOG_HPP_