QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgscontexthelp.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscontexthelp.h
3  Display context help for a dialog by invoking the
4  QgsHelpViewer
5  -------------------
6  begin : 2005-06-19
7  copyright : (C) 2005 by Gary E.Sherman
8  email : sherman at mrcc.com
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 #ifndef QGSCONTEXTHELP_H
20 #define QGSCONTEXTHELP_H
21 
22 #include <QObject>
23 #include <QHash>
24 #include <QProcess>
25 
35 class CORE_EXPORT QgsContextHelp : public QObject
36 {
37  Q_OBJECT
38  public:
39  static void run( QString context );
40 
41  private slots:
42  void processExited();
43  void error( QProcess::ProcessError error );
44 
45  private:
49  ~QgsContextHelp();
50 
51  QProcess *start();
52  void showContext( QString context );
53 
54  static QgsContextHelp *gContextHelp; // Singleton instance
55  QProcess *mProcess;
56 
57  static QHash<QString, QString> gContextHelpTexts;
58 
59  void init();
60 };
61 
62 #endif //QGSCONTEXTHELP_H