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

gui/HelpDialog.hpp

00001 /*
00002  * Stellarium
00003  * Copyright (C) 2007 Matthew Gates
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 _HELPDIALOG_HPP_
00021 #define _HELPDIALOG_HPP_
00022 
00023 #include <QString>
00024 #include <QObject>
00025 #include <QMultiMap>
00026 #include <QPair>
00027 #include <QHash>
00028 
00029 #include "StelDialog.hpp"
00030 
00031 class Ui_helpDialogForm;
00032 
00033 class HelpDialog : public StelDialog
00034 {
00035     Q_OBJECT
00036 public:
00037     HelpDialog();
00038     ~HelpDialog();
00039     
00051     void setKey(QString group, QString oldKey, QString newKey, QString description);
00052 
00053     void languageChanged();
00054     
00056     void styleChanged();
00057 
00058 protected:
00060     virtual void createDialogContent();
00061     
00062     Ui_helpDialogForm* ui;
00063     
00064 private slots:
00067     void updateLog(int);
00068     
00070     void refreshLog();
00071 
00072 private:
00074     QString getHeaderText(void);
00075 
00077     QString getFooterText(void);
00078 
00081     void updateText(void);
00082 
00086     QMultiMap<QString, QPair<QString, QString> > keyData;
00087 
00089     QHash<QString, QString> specialKeys;
00090 
00094     static bool helpItemSort(const QPair<QString, QString>& p1, const QPair<QString, QString>& p2);
00095 
00097     static bool helpGroupSort(const QString& s1, const QString& s2);
00098 };
00099 
00100 #endif /*_HELPDIALOG_HPP_*/
00101 

Generated on Mon Mar 9 16:16:16 2009 for Stellarium by  doxygen 1.5.5