Stellarium 0.12.3
HelpDialog.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2007 Matthew Gates
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef _HELPDIALOG_HPP_
21 #define _HELPDIALOG_HPP_
22 
23 #include <QString>
24 #include <QObject>
25 #include <QPair>
26 
27 #include "StelDialog.hpp"
28 
29 class Ui_helpDialogForm;
30 class QListWidgetItem;
31 class StelShortcutMgr;
32 
33 typedef QPair<QString, QString> KeyDescription;
34 
35 class HelpDialog : public StelDialog
36 {
37  Q_OBJECT
38 public:
39  HelpDialog();
40  ~HelpDialog();
41 
43  void styleChanged();
44 
45 public slots:
46  void retranslate();
47  void updateIconsColor();
48 
49 protected:
51  virtual void createDialogContent();
52 
53  Ui_helpDialogForm* ui;
54 
55 private slots:
57  void showShortcutsWindow();
58 
60  void updateLog(int);
61 
63  void refreshLog();
64 
65  void changePage(QListWidgetItem *current, QListWidgetItem *previous);
66 
67 private:
69  QString getHelpText(void);
70 
73  void updateText(void);
74 
75  StelShortcutMgr* keyMgr;
76 };
77 
78 #endif /*_HELPDIALOG_HPP_*/
79