Quantum GIS API Documentation  1.8
src/core/qgspythonrunner.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     qgspythonrunner.h
00003     ---------------------
00004     begin                : May 2011
00005     copyright            : (C) 2011 by Martin Dobias
00006     email                : wonder.sk at gmail.com
00007  ***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 #ifndef QGSPYTHONRUNNER_H
00016 #define QGSPYTHONRUNNER_H
00017 
00018 #include <QString>
00019 
00029 class CORE_EXPORT QgsPythonRunner
00030 {
00031   public:
00032 
00035     static bool isValid();
00036 
00038     static bool run( QString command, QString messageOnError = QString() );
00039 
00043     static void setInstance( QgsPythonRunner* runner );
00044 
00045   protected:
00047     QgsPythonRunner();
00048     virtual ~QgsPythonRunner();
00049 
00050     virtual bool runCommand( QString command, QString messageOnError = QString() ) = 0;
00051 
00052     static QgsPythonRunner* mInstance;
00053 };
00054 
00055 #endif // QGSPYTHONRUNNER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines