|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2009 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a class to apply AdBlock rules to a web page. |
|
8 """ |
|
9 |
|
10 from PyQt4.QtCore import * |
|
11 |
|
12 import Helpviewer.HelpWindow |
|
13 |
|
14 class AdBlockPage(QObject): |
|
15 """ |
|
16 Class to apply AdBlock rules to a web page. |
|
17 """ |
|
18 def __checkRule(self, rule, page, host): |
|
19 """ |
|
20 Private method to check, if a rule applies to the given web page and host. |
|
21 |
|
22 @param rule reference to the rule to check (AdBlockRule) |
|
23 @param page reference to the web page (QWebPage) |
|
24 @param host host name (string) |
|
25 """ |
|
26 # This is a noop until Qt 4.6 is supported by PyQt4 |
|
27 return |
|
28 |
|
29 def applyRulesToPage(self, page): |
|
30 """ |
|
31 Public method to applay AdBlock rules to a web page. |
|
32 |
|
33 @param page reference to the web page (QWebPage) |
|
34 """ |
|
35 # This is a noop until Qt 4.6 is supported by PyQt4 |
|
36 return |