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

gui/AddRemoveLandscapesDialog.hpp

00001 /*
00002  * Stellarium
00003  * 
00004  * Copyright (C) 2010 Bogdan Marinov (add/remove landscapes feature)
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 */
00020  
00021 #ifndef _ADDREMOVELANDSCAPESDIALOG_HPP_
00022 #define _ADDREMOVELANDSCAPESDIALOG_HPP_
00023 
00024 #include <QObject>
00025 #include <QStringList>
00026 
00027 #include "StelDialog.hpp"
00028 
00029 class Ui_addRemoveLandscapesDialogForm;
00030 class LandscapeMgr;
00031 
00033 class AddRemoveLandscapesDialog : public StelDialog
00034 {
00035     Q_OBJECT
00036 public:
00037     AddRemoveLandscapesDialog();
00038     virtual ~AddRemoveLandscapesDialog();
00039     void languageChanged();
00040 
00041 public slots:
00045     void setVisible(bool);
00046     void populateLists();
00047     
00048 protected:
00050     virtual void createDialogContent();
00051     Ui_addRemoveLandscapesDialogForm* ui;
00052 
00053 private slots:
00054     void browseForArchiveClicked();
00055     void removeClicked();
00056     void updateSidePane(int newRow);
00057 
00060     void messageAcknowledged();
00061 
00062     void messageUnableToOpen(QString path);
00063     void messageNotArchive();
00064     void messageNotUnique(QString nameOrID);
00065     void messageRemoveManually(QString path);
00066 
00067 private:
00068     LandscapeMgr* landscapeManager;
00069 
00072     QString lastUsedDirectoryPath;
00073 
00078     void displayMessage(QString title, QString message);
00079 };
00080 
00081 #endif // _ADDREMOVELANDSCAPESDIALOG_