|
Quantum GIS API Documentation
master-ce49b66
|
00001 /*************************************************************************** 00002 qgscontexthelp.h 00003 Display context help for a dialog by invoking the 00004 QgsHelpViewer 00005 ------------------- 00006 begin : 2005-06-19 00007 copyright : (C) 2005 by Gary E.Sherman 00008 email : sherman at mrcc.com 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 #ifndef QGSCONTEXTHELP_H 00020 #define QGSCONTEXTHELP_H 00021 00022 #include <QObject> 00023 #include <QHash> 00024 00025 class QProcess; 00026 00027 #ifdef Q_OS_MACX 00028 #define QGSCONTEXTHELP_REUSE 1 00029 #endif 00030 00044 class CORE_EXPORT QgsContextHelp : public QObject 00045 { 00046 Q_OBJECT 00047 public: 00048 static void run( QString context ); 00049 00050 private slots: 00051 void processExited(); 00052 00053 private: 00055 QgsContextHelp(); 00057 ~QgsContextHelp(); 00058 00059 QProcess *start(); 00060 void showContext( QString context ); 00061 00062 static QgsContextHelp *gContextHelp; // Singleton instance 00063 QProcess *mProcess; 00064 00065 static QHash<QString, QString> gContextHelpTexts; 00066 00067 void init(); 00068 }; 00069 00070 #endif //QGSCONTEXTHELP_H