~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/php/phpconfigdata.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   Copyright (C) 2005 by Nicolas Escuder <n.escuder@intra-links.com>
3
 
   Copyright (C) 2001 by smeier@kdevelop.org
4
 
 
5
 
   This library is free software; you can redistribute it and/or
6
 
   modify it under the terms of the GNU Library General Public
7
 
   version 2, License as published by the Free Software Foundation.
8
 
 
9
 
   This library is distributed in the hope that it will be useful,
10
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
 
   Library General Public License for more details.
13
 
 
14
 
   You should have received a copy of the GNU Library General Public License
15
 
   along with this library; see the file COPYING.LIB.  If not, write to
16
 
   the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
17
 
   Boston, MA 02110-1301, USA.
18
 
*/
19
 
 
20
 
#ifndef PHPCONFIGDATA_H
21
 
#define PHPCONFIGDATA_H
22
 
 
23
 
#include <qstring.h>
24
 
#include <qdom.h>
25
 
#include <qobject.h>
26
 
 
27
 
/**
28
 
  *@author Sandy Meier
29
 
  */
30
 
 
31
 
class PHPConfigData : public QObject {
32
 
Q_OBJECT
33
 
 
34
 
signals:
35
 
   void  configStored(); 
36
 
 
37
 
public: 
38
 
   enum InvocationMode {Web=1,Shell=2};
39
 
   enum StartupFileMode {Current=1,Default=2};
40
 
 
41
 
   PHPConfigData(QDomDocument* document);
42
 
   ~PHPConfigData();
43
 
 
44
 
   /** returns true if the configuration is ok, false if something is missing
45
 
   */
46
 
   bool validateConfig();
47
 
   /** write the configuration to the DOM document(project file)
48
 
   */
49
 
   void storeConfig();
50
 
 
51
 
   InvocationMode getInvocationMode() {
52
 
      return invocationMode;
53
 
   }
54
 
 
55
 
   void setInvocationMode(InvocationMode mode) {
56
 
      invocationMode = mode;
57
 
   }
58
 
 
59
 
   // web
60
 
   QString getWebURL() {
61
 
      return webURL;
62
 
   }
63
 
   void setWebURL(QString weburl) {
64
 
      webURL = weburl;
65
 
   }
66
 
 
67
 
   // shell
68
 
   QString getPHPExecPath() {
69
 
      return phpExePath;
70
 
   }
71
 
 
72
 
   void setPHPExePath(QString path) {
73
 
      phpExePath = path;
74
 
   }
75
 
 
76
 
   // config
77
 
   QString getPHPIniPath() {
78
 
      return phpIniPath;
79
 
   }
80
 
 
81
 
   void setPHPIniPath(QString path) {
82
 
      phpIniPath = path;
83
 
   }
84
 
 
85
 
   // options
86
 
   QString getPHPIncludePath() {
87
 
      return phpIncludePath;
88
 
   }
89
 
   void setPHPIncludePath(QString path) {
90
 
      phpIncludePath = path;
91
 
   }
92
 
 
93
 
   QString getStartupFile() {
94
 
      return phpStartupFile;
95
 
   }
96
 
   void setStartupFile(QString defaultFile) {
97
 
      phpStartupFile = defaultFile;
98
 
   }
99
 
 
100
 
   StartupFileMode getStartupFileMode() {
101
 
      return phpStartupFileMode;
102
 
   }
103
 
 
104
 
   void setStartupFileMode(StartupFileMode mode) {
105
 
      phpStartupFileMode = mode;
106
 
   }
107
 
 
108
 
   // code help
109
 
   void setCodeCompletion(bool enable) {
110
 
      m_codeCompletion = enable; 
111
 
   }
112
 
 
113
 
   bool getCodeCompletion() {
114
 
      return m_codeCompletion;
115
 
   }
116
 
 
117
 
   void setCodeHinting(bool enable) {
118
 
      m_codeHinting = enable;
119
 
   }
120
 
 
121
 
   bool getCodeHinting() {
122
 
      return m_codeHinting;
123
 
   }
124
 
 
125
 
   void setRealtimeParsing(bool enable) {
126
 
      m_realtimeParsing = enable;
127
 
   }
128
 
 
129
 
   bool getRealtimeParsing() {
130
 
      return m_realtimeParsing;
131
 
   }
132
 
 
133
 
private:
134
 
   QDomDocument* document;
135
 
   InvocationMode invocationMode;
136
 
   // web
137
 
   QString webURL;
138
 
 
139
 
   // shell
140
 
   QString phpExePath;
141
 
   QString phpIniPath;
142
 
   QString phpStartupFile;
143
 
 
144
 
   // options
145
 
   QString phpIncludePath;
146
 
   QString phpDefaultFile;
147
 
   StartupFileMode phpStartupFileMode;
148
 
 
149
 
   // code help
150
 
   bool m_codeCompletion;
151
 
   bool m_codeHinting;
152
 
   bool m_realtimeParsing;
153
 
};
154
 
 
155
 
#endif