• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

util

KDevelop::CommandExecutor

KDevelop::CommandExecutor Class Reference

#include <commandexecutor.h>

Inheritance diagram for KDevelop::CommandExecutor:

Inheritance graph
[legend]

List of all members.


Detailed Description

Simplifying the exeuction of a Command through (QK)Process.

This class emits only very basic signals when the process writes something to stdout or stderr and for signaling completed and failed status.

If you need more fine-grained control use (QK)Process directly and also check wether you can use KDevelop::ProcessLineMaker to use properly terminated lines of output.

Also this class provides only asynchronous operation, it doesn't allow to wait for the program to finish.

Author:
Andreas Pakulat <apaku@gmx.de> TODO: Should this be a KJob??

Definition at line 47 of file commandexecutor.h.


Signals

void completed ()
void failed ()
void receivedStandardError (const QStringList &)
void receivedStandardOutput (const QStringList &)

Public Member Functions

 CommandExecutor (const QString &command, QObject *parent=0)
void kill ()
void setArguments (const QStringList &args)
void setCommand (const QString &command)
void setEnvironment (const QMap< QString, QString > &env)
void setWorkingDirectory (const QString &dir)
void start ()

Constructor & Destructor Documentation

KDevelop::CommandExecutor::CommandExecutor ( const QString &  command,
QObject *  parent = 0 
) [explicit]

Create a command using the given executable, arguments and environment.

The process is not started immediately, instead start() has to be called.

Definition at line 61 of file commandexecutor.cpp.


Member Function Documentation

void KDevelop::CommandExecutor::kill (  ) 

kill the process, failed() will likely be emitted

Definition at line 117 of file commandexecutor.cpp.

void KDevelop::CommandExecutor::setArguments ( const QStringList &  args  ) 

set additional arguments to be used when executing the command

Definition at line 91 of file commandexecutor.cpp.

void KDevelop::CommandExecutor::setCommand ( const QString &  command  ) 

set the Command that should be started, now a commandexecutor can be reused

Definition at line 112 of file commandexecutor.cpp.

void KDevelop::CommandExecutor::setEnvironment ( const QMap< QString, QString > &  env  ) 

set additional environment variables to be used when executing the command

Definition at line 86 of file commandexecutor.cpp.

void KDevelop::CommandExecutor::setWorkingDirectory ( const QString &  dir  ) 

Sets the working directory of the command.

Definition at line 96 of file commandexecutor.cpp.

void KDevelop::CommandExecutor::start (  ) 

start the command, after this has been called signals may be emitted

Definition at line 101 of file commandexecutor.cpp.


The documentation for this class was generated from the following files:
  • commandexecutor.h
  • commandexecutor.cpp

util

Skip menu "util"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal