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

util

commandexecutor.h

00001 /* KDevelop Util Library
00002  *
00003  * Copyright 2007 Andreas Pakulat <apaku@gmx.de>
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301, USA.
00019  */
00020 
00021 #ifndef COMMANDEXECUTOR_H
00022 #define COMMANDEXECUTOR_H
00023 
00024 #include <QtCore/QObject>
00025 #include <QtCore/QProcess>
00026 #include "utilexport.h"
00027 
00028 namespace KDevelop
00029 {
00030 
00047 class KDEVPLATFORMUTIL_EXPORT CommandExecutor : public QObject
00048 {
00049     Q_OBJECT
00050 public:
00056     explicit CommandExecutor( const QString& command, QObject* parent = 0 );
00057     ~CommandExecutor();
00058 
00062     void setArguments( const QStringList& args );
00066     void setEnvironment( const QMap<QString,QString>& env );
00067 
00071     void setWorkingDirectory( const QString& dir );
00072 
00076     void start();
00077     
00081     void kill();
00082 
00086     void setCommand( const QString& command );
00087 
00088 Q_SIGNALS:
00089     void receivedStandardError( const QStringList& );
00090     void receivedStandardOutput( const QStringList& );
00091     void failed();
00092     void completed();
00093 private:
00094     Q_PRIVATE_SLOT( d, void procError( QProcess::ProcessError ) )
00095     Q_PRIVATE_SLOT( d, void procFinished( int, QProcess::ExitStatus ) )
00096     class CommandExecutorPrivate* const d;
00097     friend class CommandExecutorPrivate;
00098 };
00099 
00100 }
00101 
00102 #endif

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
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • 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