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

util

commandexecutor.h

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

util

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.9-20090814
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