22 #include <QTextStream>
57 QgsDebugMsg( QString(
"Help path is %1" ).arg( helpPath ) );
59 QProcess *process =
new QProcess;
62 connect( process, SIGNAL( finished(
int, QProcess::ExitStatus ) ), SLOT(
processExited() ) );
65 connect( qApp, SIGNAL( aboutToQuit() ), process, SLOT( terminate() ) );
67 connect( process, SIGNAL(
error( QProcess::ProcessError ) ),
this, SLOT(
error( QProcess::ProcessError ) ) );
72 process->setEnvironment( QStringList() << QString(
"PATH=%1;%2" ).arg( getenv(
"PATH" ) ).arg( QApplication::applicationDirPath() ) );
76 process->start( helpPath, QStringList() );
91 tr(
"<h3>Oops! QGIS can't find help for this form.</h3>"
92 "The help file for %1 was not found for your language<br>"
93 "If you would like to create it, contact the QGIS development team"
97 helpContents =
"<head><style>" + myStyle +
"</style></head><body>" + helpContents +
"</body>\nEOH\n";
99 mProcess->write( helpContents.toUtf8() );
static const QString helpAppPath()
Returns the path to the help application.
void showContext(QString context)
static bool isRunningFromBuildDir()
Indicates whether running from build directory (not installed)
static QString reportStyleSheet()
get a standard css style sheet for reports.
static void logMessage(QString message, QString tag=QString::null, MessageLevel level=WARNING)
add a message to the instance (and create it if necessary)
Provides a context based help browser for a dialog.
void error(QProcess::ProcessError error)
~QgsContextHelp()
Destructor.
static QgsContextHelp * gContextHelp
QgsContextHelp()
Constructor.
static QHash< QString, QString > gContextHelpTexts
static void run(QString context)