Documentation/Source/eric4.Helpviewer.AdBlock.AdBlockRule.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.Helpviewer.AdBlock.AdBlockRule</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.Helpviewer.AdBlock.AdBlockRule</h1>
24 <p>
25 Module implementing the AdBlock rule class.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#AdBlockRule">AdBlockRule</a></td>
35 <td>Class implementing the AdBlock rule.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="AdBlockRule" ID="AdBlockRule"></a>
44 <h2>AdBlockRule</h2>
45 <p>
46 Class implementing the AdBlock rule.
47 </p>
48 <h3>Derived from</h3>
49 object
50 <h3>Class Attributes</h3>
51 <table>
52 <tr><td>None</td></tr>
53 </table>
54 <h3>Methods</h3>
55 <table>
56 <tr>
57 <td><a href="#AdBlockRule.__init__">AdBlockRule</a></td>
58 <td>Constructor</td>
59 </tr><tr>
60 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td>
61 <td>Private method to convert a wildcard pattern to a regular expression.</td>
62 </tr><tr>
63 <td><a href="#AdBlockRule.filter">filter</a></td>
64 <td>Public method to get the rule filter string.</td>
65 </tr><tr>
66 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td>
67 <td>Public method to check, if the rule is a CSS rule.</td>
68 </tr><tr>
69 <td><a href="#AdBlockRule.isEnabled">isEnabled</a></td>
70 <td>Public method to check, if the rule is enabled.</td>
71 </tr><tr>
72 <td><a href="#AdBlockRule.isException">isException</a></td>
73 <td>Public method to check, if the rule defines an exception.</td>
74 </tr><tr>
75 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td>
76 <td>Public method to check the rule for a match.</td>
77 </tr><tr>
78 <td><a href="#AdBlockRule.regExpPattern">regExpPattern</a></td>
79 <td>Public method to get the regexp pattern of the rule.</td>
80 </tr><tr>
81 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td>
82 <td>Public method to set the rule's enabled state.</td>
83 </tr><tr>
84 <td><a href="#AdBlockRule.setException">setException</a></td>
85 <td>Public method to set the rule's exception flag.</td>
86 </tr><tr>
87 <td><a href="#AdBlockRule.setFilter">setFilter</a></td>
88 <td>Public method to set the rule filter string.</td>
89 </tr><tr>
90 <td><a href="#AdBlockRule.setPattern">setPattern</a></td>
91 <td>Public method to set the rule pattern.</td>
92 </tr>
93 </table>
94 <a NAME="AdBlockRule.__init__" ID="AdBlockRule.__init__"></a>
95 <h4>AdBlockRule (Constructor)</h4>
96 <b>AdBlockRule</b>(<i>filter = ""</i>)
97 <p>
98 Constructor
99 </p><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a>
100 <h4>AdBlockRule.__convertPatternToRegExp</h4>
101 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>)
102 <p>
103 Private method to convert a wildcard pattern to a regular expression.
104 </p><dl>
105 <dt><i>wildcardPattern</i></dt>
106 <dd>
107 string containing the wildcard pattern (string)
108 </dd>
109 </dl><dl>
110 <dt>Returns:</dt>
111 <dd>
112 string containing a regular expression (string)
113 </dd>
114 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a>
115 <h4>AdBlockRule.filter</h4>
116 <b>filter</b>(<i></i>)
117 <p>
118 Public method to get the rule filter string.
119 </p><dl>
120 <dt>Returns:</dt>
121 <dd>
122 rule filter string (string)
123 </dd>
124 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a>
125 <h4>AdBlockRule.isCSSRule</h4>
126 <b>isCSSRule</b>(<i></i>)
127 <p>
128 Public method to check, if the rule is a CSS rule.
129 </p><dl>
130 <dt>Returns:</dt>
131 <dd>
132 flag indicating a CSS rule (boolean)
133 </dd>
134 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a>
135 <h4>AdBlockRule.isEnabled</h4>
136 <b>isEnabled</b>(<i></i>)
137 <p>
138 Public method to check, if the rule is enabled.
139 </p><dl>
140 <dt>Returns:</dt>
141 <dd>
142 flag indicating enabled state (boolean)
143 </dd>
144 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a>
145 <h4>AdBlockRule.isException</h4>
146 <b>isException</b>(<i></i>)
147 <p>
148 Public method to check, if the rule defines an exception.
149 </p><dl>
150 <dt>Returns:</dt>
151 <dd>
152 flag indicating an exception (boolean)
153 </dd>
154 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a>
155 <h4>AdBlockRule.networkMatch</h4>
156 <b>networkMatch</b>(<i>encodedUrl</i>)
157 <p>
158 Public method to check the rule for a match.
159 </p><dl>
160 <dt><i>encodedUrl</i></dt>
161 <dd>
162 string encoded URL to be checked (string)
163 </dd>
164 </dl><dl>
165 <dt>Returns:</dt>
166 <dd>
167 flag indicating a match (boolean)
168 </dd>
169 </dl><a NAME="AdBlockRule.regExpPattern" ID="AdBlockRule.regExpPattern"></a>
170 <h4>AdBlockRule.regExpPattern</h4>
171 <b>regExpPattern</b>(<i></i>)
172 <p>
173 Public method to get the regexp pattern of the rule.
174 </p><dl>
175 <dt>Returns:</dt>
176 <dd>
177 regexp pattern (QRegExp)
178 </dd>
179 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a>
180 <h4>AdBlockRule.setEnabled</h4>
181 <b>setEnabled</b>(<i>enabled</i>)
182 <p>
183 Public method to set the rule's enabled state.
184 </p><dl>
185 <dt><i>enabled</i></dt>
186 <dd>
187 flag indicating the new enabled state (boolean)
188 </dd>
189 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a>
190 <h4>AdBlockRule.setException</h4>
191 <b>setException</b>(<i>exception</i>)
192 <p>
193 Public method to set the rule's exception flag.
194 </p><dl>
195 <dt><i>exception</i></dt>
196 <dd>
197 flag indicating an exception rule (boolean)
198 </dd>
199 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a>
200 <h4>AdBlockRule.setFilter</h4>
201 <b>setFilter</b>(<i>filter</i>)
202 <p>
203 Public method to set the rule filter string.
204 </p><dl>
205 <dt><i>filter</i></dt>
206 <dd>
207 rule filter string (string)
208 </dd>
209 </dl><a NAME="AdBlockRule.setPattern" ID="AdBlockRule.setPattern"></a>
210 <h4>AdBlockRule.setPattern</h4>
211 <b>setPattern</b>(<i>pattern, isRegExp</i>)
212 <p>
213 Public method to set the rule pattern.
214 </p><dl>
215 <dt><i>pattern</i></dt>
216 <dd>
217 string containing the pattern (string)
218 </dd><dt><i>isRegExp</i></dt>
219 <dd>
220 flag indicating a reg exp pattern (boolean)
221 </dd>
222 </dl>
223 <div align="right"><a href="#top">Up</a></div>
224 <hr />
225 </body></html>

eric ide

mercurial