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     
00049     void setKey(QString group, QString oldKey, QString newKey, QString description);
00050 
00051     void languageChanged();
00052     
00054     void styleChanged();
00055 
00056 protected:
00058     virtual void createDialogContent();
00059     
00060     Ui_helpDialogForm* ui;
00061     
00062 private slots:
00065     void updateLog(int);
00066     
00068     void refreshLog();
00069 
00070 private:
00072     QString getHeaderText(void);
00073 
00075     QString getFooterText(void);
00076 
00079     void updateText(void);
00080 
00084     QMultiMap<QString, QPair<QString, QString> > keyData;
00085 
00087     QHash<QString, QString> specialKeys;
00088 
00092     static bool helpItemSort(const QPair<QString, QString>& p1, const QPair<QString, QString>& p2);
00093 
00095     static bool helpGroupSort(const QString& s1, const QString& s2);
00096 };
00097 
00098 #endif /*_HELPDIALOG_HPP_*/
00099 

Generated on Mon Feb 2 17:23:47 2009 for Stellarium by  doxygen 1.5.5