• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

Public Types | Signals | Public Member Functions | List of all members
ProcessControl Class Reference

#include <processcontrol.h>

Inheritance diagram for ProcessControl:
Inheritance graph
[legend]

Public Types

enum  CrashPolicy { StopOnCrash, RestartOnCrash }
 

Signals

void finished (bool clean)
 
void processErrorMessages (const QString &errorMsg)
 

Public Member Functions

 ProcessControl (QObject *parent=0)
 
 ~ProcessControl ()
 
bool isRunning () const
 
void setCrashPolicy (CrashPolicy policy)
 
void start (const QString &application, const QStringList &arguments=QStringList(), CrashPolicy policy=RestartOnCrash, int maxCrashes=5)
 
void terminate (bool waitAndKill=false)
 
bool waitForStarted ()
 

Detailed Description

This class starts and observes a process.

Depending on the policy it also restarts the process when it crashes.

Definition at line 32 of file processcontrol.h.

Member Enumeration Documentation

enum ProcessControl::CrashPolicy

Theses enums describe the behaviour when the observed application crashed.

  • StopOnCrash - The application won't be restarted.
  • RestartOnCrash - The application is restarted with the same arguments.
Enumerator
StopOnCrash 
RestartOnCrash 

Definition at line 44 of file processcontrol.h.

Constructor & Destructor Documentation

ProcessControl::ProcessControl ( QObject *  parent = 0)

Creates a new process control.

Parameters
parentThe parent object.

Definition at line 29 of file processcontrol.cpp.

ProcessControl::~ProcessControl ( )

Destroys the process control.

Definition at line 39 of file processcontrol.cpp.

Member Function Documentation

void ProcessControl::finished ( bool  clean)
signal
bool ProcessControl::isRunning ( ) const

Definition at line 116 of file processcontrol.cpp.

void ProcessControl::processErrorMessages ( const QString &  errorMsg)
signal

This signal is emitted whenever the observed application writes something to stderr.

Parameters
errorMsgThe error output of the observed application.
void ProcessControl::setCrashPolicy ( CrashPolicy  policy)

Sets the crash policy.

Definition at line 57 of file processcontrol.cpp.

void ProcessControl::start ( const QString &  application,
const QStringList &  arguments = QStringList(),
CrashPolicy  policy = RestartOnCrash,
int  maxCrashes = 5 
)

Starts the application with the given list of arguments.

Definition at line 45 of file processcontrol.cpp.

void ProcessControl::terminate ( bool  waitAndKill = false)

Sends the term signal to the process.

Parameters
waitAndKillIf true does wait for the process to finish and if it does not kills the process after a timeout. If false a timer is used instead.

Definition at line 126 of file processcontrol.cpp.

bool ProcessControl::waitForStarted ( )

Definition at line 143 of file processcontrol.cpp.


The documentation for this class was generated from the following files:
  • processcontrol.h
  • processcontrol.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal