Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

gui/ConfigurationDialog.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) 2008 Fabien Chereau
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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_

Generated on Wed Jun 2 13:11:13 2010 for Stellarium by  doxygen 1.5.5