parts/valgrind/valgrind_part.h
Go to the documentation of this file.00001 /* 00002 * Copyright (C) 2002 Harald Fernengel <harry@kdevelop.org> 00003 */ 00004 00005 #ifndef __KDEVPART_VALGRIND_H__ 00006 #define __KDEVPART_VALGRIND_H__ 00007 00008 #include <qguardedptr.h> 00009 #include <qstring.h> 00010 #include <qstringlist.h> 00011 #include <kdevplugin.h> 00012 00013 class ValgrindWidget; 00014 class KProcess; 00015 00016 class ValgrindPart : public KDevPlugin 00017 { 00018 Q_OBJECT 00019 00020 public: 00021 ValgrindPart( QObject *parent, const char *name, const QStringList & ); 00022 ~ValgrindPart(); 00023 00024 void runValgrind( const QString& exec, const QString& parameters, const QString& valExec, const QString& valParameters ); 00025 00026 void savePartialProjectSession( QDomElement* el ); 00027 void restorePartialProjectSession( const QDomElement* el ); 00028 00029 private slots: 00030 void slotExecValgrind(); 00031 void slotKillValgrind(); 00032 void slotStopButtonClicked( KDevPlugin* which ); 00033 void receivedStdout( KProcess*, char*, int ); 00034 void receivedStderr( KProcess*, char*, int ); 00035 void processExited( KProcess* ); 00036 void loadOutput(); 00037 void projectOpened(); 00038 00039 private: 00040 void getActiveFiles(); 00041 void appendMessage( const QString& message ); 00042 void appendMessages( const QStringList& lines ); 00043 void receivedString( const QString& str ); 00044 void clear(); 00045 QString _lastExec, _lastParams, _lastValExec, _lastValParams; 00046 KProcess* proc; 00047 QString currentMessage; 00048 QString lastPiece; 00049 QStringList activeFiles; 00050 int currentPid; 00051 QGuardedPtr<ValgrindWidget> m_widget; 00052 }; 00053 00054 00055 #endif