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