~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/core/qgscontexthelp.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *   (at your option) any later version.                                   *
17
17
 *                                                                         *
18
18
 ***************************************************************************/
19
 
/* $Id: qgscontexthelp.h 4759 2006-01-28 01:20:04Z g_j_m $ */
 
19
/* $Id$ */
20
20
#ifndef QGSCONTEXTHELP_H
21
21
#define QGSCONTEXTHELP_H
22
22
#include <QObject>
27
27
#ifdef Q_OS_MACX
28
28
#define QGSCONTEXTHELP_REUSE 1
29
29
#endif
30
 
/*!
31
 
 * \class QgsContextHelp
32
 
 * \brief Provides a context based help browser for a dialog.
 
30
/** \ingroup core
 
31
 * Provides a context based help browser for a dialog.
33
32
 *
34
33
 * The help text is stored in SQLite and accessed by a context identifier
35
34
 * unique to each dialog. This is a singleton class which invokes the help
42
41
 * window for window managers such as Linux/GNOME which will make a window
43
42
 * active but not bring it to the top if raised programatically.
44
43
 */
45
 
class QgsContextHelp : public QObject {
46
 
  Q_OBJECT
47
 
public:
48
 
  static void run(int contextId);
49
 
 
50
 
private slots:
51
 
  void readPort();
52
 
  void processExited();
53
 
 
54
 
private:
55
 
  //! Constructor
56
 
  QgsContextHelp(int contextId);
57
 
  //! Destructor
58
 
  ~QgsContextHelp();
59
 
 
60
 
  QProcess *start(int contextId);
61
 
  void showContext(int contextId);
62
 
 
63
 
  static QgsContextHelp *gContextHelp; // Singleton instance
64
 
  QProcess *mProcess;
 
44
class CORE_EXPORT QgsContextHelp : public QObject
 
45
{
 
46
    Q_OBJECT
 
47
  public:
 
48
    static void run( QString context );
 
49
 
 
50
  private slots:
 
51
    void readPort();
 
52
    void processExited();
 
53
 
 
54
  private:
 
55
    //! Constructor
 
56
    QgsContextHelp( QString context );
 
57
    //! Destructor
 
58
    ~QgsContextHelp();
 
59
 
 
60
    QProcess *start( QString context );
 
61
    void showContext( QString context );
 
62
 
 
63
    static QgsContextHelp *gContextHelp; // Singleton instance
 
64
    QProcess *mProcess;
65
65
#ifdef QGSCONTEXTHELP_REUSE
66
 
  // Communications socket when reusing existing process
67
 
  QTcpSocket *mSocket;
 
66
    // Communications socket when reusing existing process
 
67
    QTcpSocket *mSocket;
68
68
#else
69
 
  // Replacement process when terminating and restarting
70
 
  QProcess *mNextProcess;
 
69
    // Replacement process when terminating and restarting
 
70
    QProcess *mNextProcess;
71
71
#endif
72
72
};
 
73
 
73
74
#endif //QGSCONTEXTHELP_H