QGIS API Documentation  2.99.0-Master (7fe5405)
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 
26 #include "qgis_core.h"
27 
37 class CORE_EXPORT QgsContextHelp : public QObject
38 {
39  Q_OBJECT
40  public:
41  static void run( const QString& context );
42 
43  private slots:
44  void processExited();
45  void error( QProcess::ProcessError error );
46 
47  private:
50 
51  ~QgsContextHelp();
52 
53  QProcess *start();
54  void showContext( const QString& context );
55 
56  static QgsContextHelp *sContextHelp; // Singleton instance
57  QProcess *mProcess;
58 
59  static QHash<QString, QString> sContextHelpTexts;
60 
61  void init();
62 };
63 
64 #endif //QGSCONTEXTHELP_H
Provides a context based help browser for a dialog.