languages/php/phpconfigdata.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 begin : Thu Jun 14 2001 00003 copyright : (C) 2001 by Sandy Meier 00004 email : smeier@kdevelop.org 00005 ***************************************************************************/ 00006 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 00016 #ifndef PHPCONFIGDATA_H 00017 #define PHPCONFIGDATA_H 00018 00019 #include <qstring.h> 00020 #include <qdom.h> 00021 #include <qobject.h> 00022 00027 class PHPConfigData : public QObject { 00028 00029 Q_OBJECT 00030 00031 signals: 00032 void configStored(); 00033 00034 public: 00035 enum InvocationMode {Web=1,Shell=2}; 00036 enum WebFileMode {Current=1,Default=2}; 00037 00038 00039 PHPConfigData(QDomDocument* document); 00040 ~PHPConfigData(); 00041 00045 bool validateConfig(); 00048 void storeConfig(); 00049 00050 InvocationMode getInvocationMode(){ 00051 return invocationMode; 00052 } 00053 void setInvocationMode(InvocationMode mode){ 00054 invocationMode = mode; 00055 } 00056 00057 // web 00058 WebFileMode getWebFileMode(){ 00059 return webFileMode; 00060 } 00061 QString getWebURL(){ 00062 return webURL; 00063 } 00064 QString getWebDefaultFile(){ 00065 return webDefaultFile; 00066 } 00067 void setWebFileMode(WebFileMode mode){ 00068 webFileMode = mode; 00069 } 00070 void setWebURL(QString weburl){ 00071 webURL = weburl; 00072 } 00073 void setWebDefaultFile(QString defaultFile){ 00074 webDefaultFile = defaultFile; 00075 } 00076 00077 // shell 00078 QString getPHPExecPath(){ 00079 return phpExePath; 00080 } 00081 void setPHPExePath(QString path){ 00082 phpExePath = path; 00083 } 00084 00085 // code help 00086 void setCodeCompletion(bool enable){ 00087 m_codeCompletion = enable; 00088 } 00089 bool getCodeCompletion(){ 00090 return m_codeCompletion; 00091 } 00092 void setCodeHinting(bool enable){ 00093 m_codeHinting = enable; 00094 } 00095 bool getCodeHinting(){ 00096 return m_codeHinting; 00097 } 00098 void setRealtimeParsing(bool enable){ 00099 m_realtimeParsing = enable; 00100 } 00101 bool getRealtimeParsing(){ 00102 return m_realtimeParsing; 00103 } 00104 00105 00106 private: 00107 QDomDocument* document; 00108 InvocationMode invocationMode; 00109 // web 00110 WebFileMode webFileMode; 00111 QString webURL; 00112 QString webDefaultFile; 00113 00114 // shell 00115 QString phpExePath; 00116 00117 // code help 00118 bool m_codeCompletion; 00119 bool m_codeHinting; 00120 bool m_realtimeParsing; 00121 00122 }; 00123 00124 #endif