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();
00055     QNetworkReply* starCatalogDownloadReply;
00056     QFile* currentDownloadFile;
00057     QProgressBar* progressBar;
00058 
00059 private slots:
00060     void setNoSelectedInfo(void);
00061     void setAllSelectedInfo(void);
00062     void setBriefSelectedInfo(void);
00063     void languageChanged(const QString& languageCode);
00064     void setStartupTimeMode(void);
00065     void setDiskViewport(bool);
00066     void setSphericMirror(bool);
00067     void cursorTimeOutChanged();
00068     void cursorTimeOutChanged(double d) {cursorTimeOutChanged();}
00069 
00070     void newStarCatalogData();
00071     void downloadStars();
00072     void cancelDownload();
00073     void downloadFinished();
00074     void downloadError(QNetworkReply::NetworkError);
00075 
00077     void updateConfigLabels();
00078 
00082     void browseForScreenshotDir();
00083     void selectScreenshotDir(const QString& dir);
00084 
00088     void saveCurrentViewOptions();
00089 
00092     void setDefaultViewOptions();
00093 
00094     void populatePluginsList(void);
00095     void pluginsSelectionChanged(const QString&);
00096     void pluginConfigureCurrentSelection(void);
00097     void loadAtStartupChanged(int);
00098 
00101     void scriptSelectionChanged(const QString& s);
00102 
00104     void runScriptClicked(void);
00106     void stopScriptClicked(void);
00107 
00108     void aScriptIsRunning(void);
00109     void aScriptHasStopped(void);
00110 
00111     void populateScriptsList(void);
00112     void setFixedDateTimeToCurrent(void);
00113 
00114     void changePage(QListWidgetItem *current, QListWidgetItem *previous);
00115 
00116 private:
00117     StelGui* gui;
00118 
00119     int savedProjectionType;
00120 };
00121 
00122 #endif // _CONFIGURATIONDIALOG_HPP_

Generated on Mon Mar 22 09:55:38 2010 for Stellarium by  doxygen 1.5.5