53 </table> |
53 </table> |
54 <h3>Methods</h3> |
54 <h3>Methods</h3> |
55 <table> |
55 <table> |
56 <tr> |
56 <tr> |
57 <td><a href="#AdBlockRule.__init__">AdBlockRule</a></td> |
57 <td><a href="#AdBlockRule.__init__">AdBlockRule</a></td> |
58 <td>Constructor</td> |
58 <td>Constructor</td> |
59 </tr><tr> |
59 </tr><tr> |
60 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
60 <td><a href="#AdBlockRule.__convertPatternToRegExp">__convertPatternToRegExp</a></td> |
61 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
61 <td>Private method to convert a wildcard pattern to a regular expression.</td> |
62 </tr><tr> |
62 </tr><tr> |
63 <td><a href="#AdBlockRule.filter">filter</a></td> |
63 <td><a href="#AdBlockRule.filter">filter</a></td> |
64 <td>Public method to get the rule filter string.</td> |
64 <td>Public method to get the rule filter string.</td> |
65 </tr><tr> |
65 </tr><tr> |
66 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
66 <td><a href="#AdBlockRule.isCSSRule">isCSSRule</a></td> |
67 <td>Public method to check, if the rule is a CSS rule.</td> |
67 <td>Public method to check, if the rule is a CSS rule.</td> |
68 </tr><tr> |
68 </tr><tr> |
69 <td><a href="#AdBlockRule.isEnabled">isEnabled</a></td> |
69 <td><a href="#AdBlockRule.isEnabled">isEnabled</a></td> |
70 <td>Public method to check, if the rule is enabled.</td> |
70 <td>Public method to check, if the rule is enabled.</td> |
71 </tr><tr> |
71 </tr><tr> |
72 <td><a href="#AdBlockRule.isException">isException</a></td> |
72 <td><a href="#AdBlockRule.isException">isException</a></td> |
73 <td>Public method to check, if the rule defines an exception.</td> |
73 <td>Public method to check, if the rule defines an exception.</td> |
74 </tr><tr> |
74 </tr><tr> |
75 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
75 <td><a href="#AdBlockRule.networkMatch">networkMatch</a></td> |
76 <td>Public method to check the rule for a match.</td> |
76 <td>Public method to check the rule for a match.</td> |
77 </tr><tr> |
77 </tr><tr> |
78 <td><a href="#AdBlockRule.regExpPattern">regExpPattern</a></td> |
78 <td><a href="#AdBlockRule.regExpPattern">regExpPattern</a></td> |
79 <td>Public method to get the regexp pattern of the rule.</td> |
79 <td>Public method to get the regexp pattern of the rule.</td> |
80 </tr><tr> |
80 </tr><tr> |
81 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
81 <td><a href="#AdBlockRule.setEnabled">setEnabled</a></td> |
82 <td>Public method to set the rule's enabled state.</td> |
82 <td>Public method to set the rule's enabled state.</td> |
83 </tr><tr> |
83 </tr><tr> |
84 <td><a href="#AdBlockRule.setException">setException</a></td> |
84 <td><a href="#AdBlockRule.setException">setException</a></td> |
85 <td>Public method to set the rule's exception flag.</td> |
85 <td>Public method to set the rule's exception flag.</td> |
86 </tr><tr> |
86 </tr><tr> |
87 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
87 <td><a href="#AdBlockRule.setFilter">setFilter</a></td> |
88 <td>Public method to set the rule filter string.</td> |
88 <td>Public method to set the rule filter string.</td> |
89 </tr><tr> |
89 </tr><tr> |
90 <td><a href="#AdBlockRule.setPattern">setPattern</a></td> |
90 <td><a href="#AdBlockRule.setPattern">setPattern</a></td> |
91 <td>Public method to set the rule pattern.</td> |
91 <td>Public method to set the rule pattern.</td> |
92 </tr> |
92 </tr> |
93 </table> |
93 </table> |
94 <a NAME="AdBlockRule.__init__" ID="AdBlockRule.__init__"></a> |
94 <a NAME="AdBlockRule.__init__" ID="AdBlockRule.__init__"></a> |
95 <h4>AdBlockRule (Constructor)</h4> |
95 <h4>AdBlockRule (Constructor)</h4> |
96 <b>AdBlockRule</b>(<i>filter = ""</i>) |
96 <b>AdBlockRule</b>(<i>filter = ""</i>) |
97 <p> |
97 <p> |
98 Constructor |
98 Constructor |
99 </p><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
99 </p><a NAME="AdBlockRule.__convertPatternToRegExp" ID="AdBlockRule.__convertPatternToRegExp"></a> |
100 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
100 <h4>AdBlockRule.__convertPatternToRegExp</h4> |
101 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
101 <b>__convertPatternToRegExp</b>(<i>wildcardPattern</i>) |
102 <p> |
102 <p> |
103 Private method to convert a wildcard pattern to a regular expression. |
103 Private method to convert a wildcard pattern to a regular expression. |
104 </p><dl> |
104 </p><dl> |
105 <dt><i>wildcardPattern</i></dt> |
105 <dt><i>wildcardPattern</i></dt> |
106 <dd> |
106 <dd> |
107 string containing the wildcard pattern (string) |
107 string containing the wildcard pattern (string) |
108 </dd> |
108 </dd> |
109 </dl><dl> |
109 </dl><dl> |
110 <dt>Returns:</dt> |
110 <dt>Returns:</dt> |
111 <dd> |
111 <dd> |
112 string containing a regular expression (string) |
112 string containing a regular expression (string) |
113 </dd> |
113 </dd> |
114 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
114 </dl><a NAME="AdBlockRule.filter" ID="AdBlockRule.filter"></a> |
115 <h4>AdBlockRule.filter</h4> |
115 <h4>AdBlockRule.filter</h4> |
116 <b>filter</b>(<i></i>) |
116 <b>filter</b>(<i></i>) |
117 <p> |
117 <p> |
118 Public method to get the rule filter string. |
118 Public method to get the rule filter string. |
119 </p><dl> |
119 </p><dl> |
120 <dt>Returns:</dt> |
120 <dt>Returns:</dt> |
121 <dd> |
121 <dd> |
122 rule filter string (string) |
122 rule filter string (string) |
123 </dd> |
123 </dd> |
124 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
124 </dl><a NAME="AdBlockRule.isCSSRule" ID="AdBlockRule.isCSSRule"></a> |
125 <h4>AdBlockRule.isCSSRule</h4> |
125 <h4>AdBlockRule.isCSSRule</h4> |
126 <b>isCSSRule</b>(<i></i>) |
126 <b>isCSSRule</b>(<i></i>) |
127 <p> |
127 <p> |
128 Public method to check, if the rule is a CSS rule. |
128 Public method to check, if the rule is a CSS rule. |
129 </p><dl> |
129 </p><dl> |
130 <dt>Returns:</dt> |
130 <dt>Returns:</dt> |
131 <dd> |
131 <dd> |
132 flag indicating a CSS rule (boolean) |
132 flag indicating a CSS rule (boolean) |
133 </dd> |
133 </dd> |
134 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
134 </dl><a NAME="AdBlockRule.isEnabled" ID="AdBlockRule.isEnabled"></a> |
135 <h4>AdBlockRule.isEnabled</h4> |
135 <h4>AdBlockRule.isEnabled</h4> |
136 <b>isEnabled</b>(<i></i>) |
136 <b>isEnabled</b>(<i></i>) |
137 <p> |
137 <p> |
138 Public method to check, if the rule is enabled. |
138 Public method to check, if the rule is enabled. |
139 </p><dl> |
139 </p><dl> |
140 <dt>Returns:</dt> |
140 <dt>Returns:</dt> |
141 <dd> |
141 <dd> |
142 flag indicating enabled state (boolean) |
142 flag indicating enabled state (boolean) |
143 </dd> |
143 </dd> |
144 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
144 </dl><a NAME="AdBlockRule.isException" ID="AdBlockRule.isException"></a> |
145 <h4>AdBlockRule.isException</h4> |
145 <h4>AdBlockRule.isException</h4> |
146 <b>isException</b>(<i></i>) |
146 <b>isException</b>(<i></i>) |
147 <p> |
147 <p> |
148 Public method to check, if the rule defines an exception. |
148 Public method to check, if the rule defines an exception. |
149 </p><dl> |
149 </p><dl> |
150 <dt>Returns:</dt> |
150 <dt>Returns:</dt> |
151 <dd> |
151 <dd> |
152 flag indicating an exception (boolean) |
152 flag indicating an exception (boolean) |
153 </dd> |
153 </dd> |
154 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
154 </dl><a NAME="AdBlockRule.networkMatch" ID="AdBlockRule.networkMatch"></a> |
155 <h4>AdBlockRule.networkMatch</h4> |
155 <h4>AdBlockRule.networkMatch</h4> |
156 <b>networkMatch</b>(<i>encodedUrl</i>) |
156 <b>networkMatch</b>(<i>encodedUrl</i>) |
157 <p> |
157 <p> |
158 Public method to check the rule for a match. |
158 Public method to check the rule for a match. |
159 </p><dl> |
159 </p><dl> |
160 <dt><i>encodedUrl</i></dt> |
160 <dt><i>encodedUrl</i></dt> |
161 <dd> |
161 <dd> |
162 string encoded URL to be checked (string) |
162 string encoded URL to be checked (string) |
163 </dd> |
163 </dd> |
164 </dl><dl> |
164 </dl><dl> |
165 <dt>Returns:</dt> |
165 <dt>Returns:</dt> |
166 <dd> |
166 <dd> |
167 flag indicating a match (boolean) |
167 flag indicating a match (boolean) |
168 </dd> |
168 </dd> |
169 </dl><a NAME="AdBlockRule.regExpPattern" ID="AdBlockRule.regExpPattern"></a> |
169 </dl><a NAME="AdBlockRule.regExpPattern" ID="AdBlockRule.regExpPattern"></a> |
170 <h4>AdBlockRule.regExpPattern</h4> |
170 <h4>AdBlockRule.regExpPattern</h4> |
171 <b>regExpPattern</b>(<i></i>) |
171 <b>regExpPattern</b>(<i></i>) |
172 <p> |
172 <p> |
173 Public method to get the regexp pattern of the rule. |
173 Public method to get the regexp pattern of the rule. |
174 </p><dl> |
174 </p><dl> |
175 <dt>Returns:</dt> |
175 <dt>Returns:</dt> |
176 <dd> |
176 <dd> |
177 regexp pattern (QRegExp) |
177 regexp pattern (QRegExp) |
178 </dd> |
178 </dd> |
179 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
179 </dl><a NAME="AdBlockRule.setEnabled" ID="AdBlockRule.setEnabled"></a> |
180 <h4>AdBlockRule.setEnabled</h4> |
180 <h4>AdBlockRule.setEnabled</h4> |
181 <b>setEnabled</b>(<i>enabled</i>) |
181 <b>setEnabled</b>(<i>enabled</i>) |
182 <p> |
182 <p> |
183 Public method to set the rule's enabled state. |
183 Public method to set the rule's enabled state. |
184 </p><dl> |
184 </p><dl> |
185 <dt><i>enabled</i></dt> |
185 <dt><i>enabled</i></dt> |
186 <dd> |
186 <dd> |
187 flag indicating the new enabled state (boolean) |
187 flag indicating the new enabled state (boolean) |
188 </dd> |
188 </dd> |
189 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
189 </dl><a NAME="AdBlockRule.setException" ID="AdBlockRule.setException"></a> |
190 <h4>AdBlockRule.setException</h4> |
190 <h4>AdBlockRule.setException</h4> |
191 <b>setException</b>(<i>exception</i>) |
191 <b>setException</b>(<i>exception</i>) |
192 <p> |
192 <p> |
193 Public method to set the rule's exception flag. |
193 Public method to set the rule's exception flag. |
194 </p><dl> |
194 </p><dl> |
195 <dt><i>exception</i></dt> |
195 <dt><i>exception</i></dt> |
196 <dd> |
196 <dd> |
197 flag indicating an exception rule (boolean) |
197 flag indicating an exception rule (boolean) |
198 </dd> |
198 </dd> |
199 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
199 </dl><a NAME="AdBlockRule.setFilter" ID="AdBlockRule.setFilter"></a> |
200 <h4>AdBlockRule.setFilter</h4> |
200 <h4>AdBlockRule.setFilter</h4> |
201 <b>setFilter</b>(<i>filter</i>) |
201 <b>setFilter</b>(<i>filter</i>) |
202 <p> |
202 <p> |
203 Public method to set the rule filter string. |
203 Public method to set the rule filter string. |
204 </p><dl> |
204 </p><dl> |
205 <dt><i>filter</i></dt> |
205 <dt><i>filter</i></dt> |
206 <dd> |
206 <dd> |
207 rule filter string (string) |
207 rule filter string (string) |
208 </dd> |
208 </dd> |
209 </dl><a NAME="AdBlockRule.setPattern" ID="AdBlockRule.setPattern"></a> |
209 </dl><a NAME="AdBlockRule.setPattern" ID="AdBlockRule.setPattern"></a> |
210 <h4>AdBlockRule.setPattern</h4> |
210 <h4>AdBlockRule.setPattern</h4> |
211 <b>setPattern</b>(<i>pattern, isRegExp</i>) |
211 <b>setPattern</b>(<i>pattern, isRegExp</i>) |
212 <p> |
212 <p> |
213 Public method to set the rule pattern. |
213 Public method to set the rule pattern. |
214 </p><dl> |
214 </p><dl> |
215 <dt><i>pattern</i></dt> |
215 <dt><i>pattern</i></dt> |
216 <dd> |
216 <dd> |
217 string containing the pattern (string) |
217 string containing the pattern (string) |
218 </dd><dt><i>isRegExp</i></dt> |
218 </dd><dt><i>isRegExp</i></dt> |
219 <dd> |
219 <dd> |
220 flag indicating a reg exp pattern (boolean) |
220 flag indicating a reg exp pattern (boolean) |
221 </dd> |
221 </dd> |
222 </dl> |
222 </dl> |
223 <div align="right"><a href="#top">Up</a></div> |
223 <div align="right"><a href="#top">Up</a></div> |
224 <hr /> |
224 <hr /> |
225 </body></html> |
225 </body></html> |