Cppcheck
Public Member Functions | Private Attributes | List of all members
Application Class Reference

A class containing information of the application to execute. More...

#include <application.h>

Public Member Functions

 Application ()=default
 
 Application (QString name, QString path, QString params)
 
const QString & getName () const
 Get application name. More...
 
const QString & getPath () const
 Get application path. More...
 
const QString & getParameters () const
 Get application command line parameters. More...
 
void setName (const QString &name)
 Set application name. More...
 
void setPath (const QString &path)
 Set application path. More...
 
void setParameters (const QString &parameters)
 Set application command line parameters. More...
 

Private Attributes

QString mName
 Application's name. More...
 
QString mPath
 Application's path. More...
 
QString mParameters
 Application's parameters. More...
 

Detailed Description

A class containing information of the application to execute.

Each application has a name and a path. Name is displayed to the user and has no other meaning. It isn't used to start the application. Path contains the full path to the application containing the executable name. Parameters contains the command line arguments for the executable.

User can also specify certain predefined strings to parameters. These strings will be replaced with appropriate values concerning the error. Strings are: (file) - Filename containing the error (line) - Line number containing the error (message) - Error message (severity) - Error severity

Example opening a file with Kate and make Kate scroll to the correct line. Executable: kate Parameters: -l(line) (file)

Definition at line 43 of file application.h.

Constructor & Destructor Documentation

◆ Application() [1/2]

Application::Application ( )
default

◆ Application() [2/2]

Application::Application ( QString  name,
QString  path,
QString  params 
)

Definition at line 23 of file application.cpp.

Member Function Documentation

◆ getName()

const QString& Application::getName ( ) const
inline

◆ getParameters()

const QString& Application::getParameters ( ) const
inline

Get application command line parameters.

Returns
Application command line parameters.

Definition at line 68 of file application.h.

References mParameters.

Referenced by ApplicationDialog::ApplicationDialog(), ApplicationList::saveSettings(), and ResultsTree::startApplication().

◆ getPath()

const QString& Application::getPath ( ) const
inline

◆ setName()

void Application::setName ( const QString &  name)
inline

Set application name.

Parameters
nameApplication name.

Definition at line 76 of file application.h.

References mName.

Referenced by ApplicationList::checkAndAddApplication(), ApplicationList::loadSettings(), and ApplicationDialog::ok().

◆ setParameters()

void Application::setParameters ( const QString &  parameters)
inline

Set application command line parameters.

Parameters
parametersApplication command line parameters.

Definition at line 92 of file application.h.

References mParameters.

Referenced by ApplicationList::checkAndAddApplication(), ApplicationList::loadSettings(), and ApplicationDialog::ok().

◆ setPath()

void Application::setPath ( const QString &  path)
inline

Set application path.

Parameters
pathApplication path.

Definition at line 84 of file application.h.

References mPath.

Referenced by ApplicationList::checkAndAddApplication(), ApplicationList::loadSettings(), and ApplicationDialog::ok().

Member Data Documentation

◆ mName

QString Application::mName
private

Application's name.

Definition at line 101 of file application.h.

Referenced by getName(), and setName().

◆ mParameters

QString Application::mParameters
private

Application's parameters.

Definition at line 111 of file application.h.

Referenced by getParameters(), and setParameters().

◆ mPath

QString Application::mPath
private

Application's path.

Definition at line 106 of file application.h.

Referenced by getPath(), and setPath().


The documentation for this class was generated from the following files: