Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QgsContextHelp Class Reference

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

#include <qgscontexthelp.h>

Inheritance diagram for QgsContextHelp:
Inheritance graph
[legend]
Collaboration diagram for QgsContextHelp:
Collaboration graph
[legend]

Static Public Member Functions

static void run (QString context)
 

Private Slots

void readPort ()
 
void processExited ()
 

Private Member Functions

 QgsContextHelp (QString context)
 Constructor. More...
 
 ~QgsContextHelp ()
 Destructor. More...
 
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 44 of file qgscontexthelp.h.

Constructor & Destructor Documentation

QgsContextHelp::QgsContextHelp ( QString  context)
private

Constructor.

Definition at line 49 of file qgscontexthelp.cpp.

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

Referenced by run().

QgsContextHelp::~QgsContextHelp ( )
private

Destructor.

Definition at line 62 of file qgscontexthelp.cpp.

References mNextProcess, and mProcess.

Member Function Documentation

void QgsContextHelp::processExited ( )
privateslot

Definition at line 121 of file qgscontexthelp.cpp.

References gContextHelp, mNextProcess, and mProcess.

Referenced by start().

void QgsContextHelp::readPort ( )
privateslot

Definition at line 91 of file qgscontexthelp.cpp.

References mProcess.

Referenced by QgsContextHelp().

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

Definition at line 102 of file qgscontexthelp.cpp.

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

Referenced by run().

QProcess * QgsContextHelp::start ( QString  context)
private

Definition at line 73 of file qgscontexthelp.cpp.

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

Referenced by QgsContextHelp(), and showContext().

Member Data Documentation

QgsContextHelp * QgsContextHelp::gContextHelp = NULL
staticprivate

Definition at line 63 of file qgscontexthelp.h.

Referenced by processExited(), and run().

QProcess* QgsContextHelp::mNextProcess
private

Definition at line 70 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: