Quantum GIS API Documentation  1.8
Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes
QgsContextHelp Class Reference

Provides a context based help browser for a dialog. More...

#include <qgscontexthelp.h>

Collaboration diagram for QgsContextHelp:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void run (QString context)

Private Slots

void readPort ()
void processExited ()

Private Member Functions

 QgsContextHelp (QString context)
 Constructor.
 ~QgsContextHelp ()
 Destructor.
QProcess * start (QString context)
void showContext (QString context)

Private Attributes

QProcess * mProcess
QProcess * mNextProcess

Static Private Attributes

static QgsContextHelpgContextHelp = NULL

Detailed Description

Provides a context based help browser for a dialog.

The help text is stored in SQLite and accessed by a context identifier unique to each dialog. This is a singleton class which invokes the help viewer using QProcess and ensures that only one viewer is open. The viewer will be terminated if open when the main application quits.

If the compile-time flag QGSCONTEXTHELP_REUSE is defined, the help viewer will be reused if it is still open. If this flag is not set, the viewer process will be terminated if open and restarted; this makes it the top window for window managers such as Linux/GNOME which will make a window active but not bring it to the top if raised programatically.

Definition at line 43 of file qgscontexthelp.h.


Constructor & Destructor Documentation

QgsContextHelp::QgsContextHelp ( QString  context) [private]

Constructor.

Definition at line 48 of file qgscontexthelp.cpp.

References mNextProcess, mProcess, readPort(), and start().

Referenced by run().

Destructor.

Definition at line 61 of file qgscontexthelp.cpp.

References mNextProcess, and mProcess.


Member Function Documentation

void QgsContextHelp::processExited ( ) [private, slot]

Definition at line 120 of file qgscontexthelp.cpp.

References gContextHelp, mNextProcess, and mProcess.

Referenced by start().

void QgsContextHelp::readPort ( ) [private, slot]

Definition at line 90 of file qgscontexthelp.cpp.

References mProcess.

Referenced by QgsContextHelp().

void QgsContextHelp::run ( QString  context) [static]
void QgsContextHelp::showContext ( QString  context) [private]

Definition at line 101 of file qgscontexthelp.cpp.

References mNextProcess, mProcess, QgsDebugMsg, and start().

Referenced by run().

QProcess * QgsContextHelp::start ( QString  context) [private]

Definition at line 72 of file qgscontexthelp.cpp.

References QgsApplication::helpAppPath(), processExited(), and QgsDebugMsg.

Referenced by QgsContextHelp(), and showContext().


Member Data Documentation

QgsContextHelp * QgsContextHelp::gContextHelp = NULL [static, private]

Definition at line 62 of file qgscontexthelp.h.

Referenced by processExited(), and run().

QProcess* QgsContextHelp::mNextProcess [private]

Definition at line 69 of file qgscontexthelp.h.

Referenced by processExited(), QgsContextHelp(), showContext(), and ~QgsContextHelp().

QProcess* QgsContextHelp::mProcess [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines