21 #include <QTextStream>    39   gContextHelp->showContext( context );
    42 QgsContextHelp::QgsContextHelp()
    47 QgsContextHelp::~QgsContextHelp()
    61   connect( process, SIGNAL( finished( 
int, QProcess::ExitStatus ) ), SLOT( processExited() ) );
    63   connect( process, SIGNAL( error( QProcess::ProcessError ) ), 
this, SLOT( error( QProcess::ProcessError ) ) );
    77 void QgsContextHelp::error( QProcess::ProcessError error )
    82 void QgsContextHelp::showContext( 
const QString& context )
    87                          tr( 
"<h3>Oops! QGIS can't find help for this form.</h3>"    88                              "The help file for %1 was not found for your language<br>"    89                              "If you would like to create it, contact the QGIS development team"    93   helpContents = 
"<head><style>" + myStyle + 
"</style></head><body>" + helpContents + 
"</body>\nEOH\n";
    95   mProcess->
write( helpContents.toUtf8() );
    98 void QgsContextHelp::processExited()
   102   gContextHelp = 
nullptr;
 
static bool isRunningFromBuildDir()
Indicates whether running from build directory (not installed) 
 
static QString reportStyleSheet()
get a standard css style sheet for reports. 
 
QString tr(const char *sourceText, const char *disambiguation, int n)
 
static void run(const QString &context)
 
Provides a context based help browser for a dialog. 
 
static QString helpAppPath()
Returns the path to the help application. 
 
static void logMessage(const QString &message, const QString &tag=QString::null, MessageLevel level=WARNING)
add a message to the instance (and create it if necessary) 
 
void setEnvironment(const QStringList &environment)
 
const T value(const Key &key) const
 
qint64 write(const char *data, qint64 maxSize)
 
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QString applicationDirPath()
 
void start(const QString &program, const QStringList &arguments, QFlags< QIODevice::OpenModeFlag > mode)