languages/php/phpsupportpart.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2001 by Sandy Meier * 00003 * smeier@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef _PHPSUPPORTPART_H_ 00013 #define _PHPSUPPORTPART_H_ 00014 00015 #include <kdialogbase.h> 00016 #include "kdevlanguagesupport.h" 00017 #include <kio/job.h> 00018 #include <kdevgenericfactory.h> 00019 00020 #include <ktexteditor/editinterface.h> 00021 00022 class QStringList; 00023 class PHPHTMLView; 00024 class KShellProcess; 00025 class KProcess; 00026 class PHPErrorView; 00027 class PHPConfigData; 00028 class PHPCodeCompletion; 00029 class PHPParser; 00030 00031 class PHPSupportPart : public KDevLanguageSupport 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 PHPSupportPart( QObject *parent, const char *name, const QStringList & ); 00037 ~PHPSupportPart(); 00038 00039 protected: 00040 virtual Features features(); 00041 virtual KMimeType::List mimeTypes(); 00042 00043 private slots: 00044 void projectOpened(); 00045 void projectClosed(); 00046 void savedFile(const QString &fileName); 00047 void addedFilesToProject(const QStringList &fileList); 00048 void removedFilesFromProject(const QStringList &fileList); 00049 void slotRun(); 00050 void slotNewClass(); 00051 void projectConfigWidget(KDialogBase *dlg); 00052 void slotReceivedPHPExeStderr (KProcess* proc, char* buffer, int buflen); 00053 void slotReceivedPHPExeStdout (KProcess* proc, char* buffer, int buflen); 00054 void slotPHPExeExited (KProcess* proc); 00055 void slotErrorMessageSelected(const QString&filename,int line); 00056 void slotWebData(KIO::Job* job,const QByteArray& data); 00057 void slotWebResult(KIO::Job* job); 00058 void slotWebJobStarted(KIO::Job* job); 00059 00060 // Internal 00061 void initialParse(); 00062 void slotActivePartChanged(KParts::Part *part); 00063 void slotTextChanged(); 00064 /* the configuration was written, mostly after a config dialog call 00065 -> reorder connects 00066 */ 00067 void slotConfigStored(); 00068 00069 private: 00070 void maybeParse(const QString fileName); 00071 void executeOnWebserver(); 00072 void executeInTerminal(); 00073 bool validateConfig(); 00074 PHPHTMLView* m_htmlView; 00075 PHPErrorView* m_phpErrorView; 00076 KShellProcess* phpExeProc; 00077 QString m_phpExeOutput; 00078 PHPConfigData* configData; 00079 PHPCodeCompletion* m_codeCompletion; 00080 PHPParser* m_parser; 00081 KTextEditor::EditInterface *m_editInterface; 00082 }; 00083 00084 typedef KDevGenericFactory<PHPSupportPart> PHPSupportFactory; 00085 00086 #endif