Quantum GIS API Documentation  master-693a1fe
QgsContextHelp Class Reference

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

#include <qgscontexthelp.h>

+ Collaboration diagram for QgsContextHelp:

List of all members.

Static Public Member Functions

static void run (QString context)

Private Slots

void processExited ()

Private Member Functions

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

Private Attributes

QProcess * mProcess

Static Private Attributes

static QgsContextHelpgContextHelp = 0
static QHash< QString, QString > gContextHelpTexts

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

Constructor.

Definition at line 42 of file qgscontexthelp.cpp.

References mProcess, and start().

Referenced by run().

Destructor.

Definition at line 47 of file qgscontexthelp.cpp.

References mProcess.


Member Function Documentation

void QgsContextHelp::init ( ) [private]

Referenced by showContext().

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

Definition at line 86 of file qgscontexthelp.cpp.

References gContextHelp.

Referenced by start().

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

Definition at line 70 of file qgscontexthelp.cpp.

References gContextHelpTexts, init(), mProcess, QgsApplication::reportStyleSheet(), and tr.

Referenced by run().

QProcess * QgsContextHelp::start ( ) [private]

Definition at line 52 of file qgscontexthelp.cpp.

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

Referenced by QgsContextHelp().


Member Data Documentation

Definition at line 62 of file qgscontexthelp.h.

Referenced by processExited(), and run().

QHash<QString, QString> QgsContextHelp::gContextHelpTexts [static, private]

Definition at line 65 of file qgscontexthelp.h.

Referenced by showContext().

QProcess* QgsContextHelp::mProcess [private]

Definition at line 63 of file qgscontexthelp.h.

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


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