Mon, 25 Mar 2013 03:11:06 +0100
Script changes: Future import added, super calls modified and unicode behavior for str.
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

1  # * coding: utf8 * 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

2  
2302
f29e9405c851
Updated copyright for 2013.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1674
diff
changeset

3  # Copyright (c) 2009  2013 Detlev Offenbach <detlev@dieoffenbachs.de> 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

4  # 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

5  
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

6  """ 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

7  Module implementing a scheme access handler for Python resources. 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

8  """ 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

9  
2525
8b507a9a2d40
Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
2403
diff
changeset

10  from __future__ import unicode_literals # __IGNORE_WARNING__ 
8b507a9a2d40
Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
2403
diff
changeset

11  
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

12  from PyQt4.QtCore import QFile, QByteArray 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

13  
12
1d8dd9706f46
First commit after changing to Python 3.1.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
0
diff
changeset

14  from .SchemeAccessHandler import SchemeAccessHandler 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

15  
945
8cd4d08fa9f6
Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
791
diff
changeset

16  
1674
7eb92d0bc124
Renamed PyrcAccessHandler to EricAccessHandler.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1670
diff
changeset

17  class EricAccessHandler(SchemeAccessHandler): 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

18  """ 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

19  Class implementing a scheme access handler for Python resources. 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

20  """ 
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

21  _homePage = None 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

22  _speedDialPage = None 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

23  
945
8cd4d08fa9f6
Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
791
diff
changeset

24  def createRequest(self, op, request, outgoingData=None): 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

25  """ 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

26  Protected method to create a request. 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

27  
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

28  @param op the operation to be performed (QNetworkAccessManager.Operation) 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

29  @param request reference to the request object (QNetworkRequest) 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

30  @param outgoingData reference to an IODevice containing data to be sent 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

31  (QIODevice) 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

32  @return reference to the created reply object (QNetworkReply) 
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

33  """ 
2403
e3d7a861547c
Continued implementing the delayed import.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
2302
diff
changeset

34  from .NetworkReply import NetworkReply 
e3d7a861547c
Continued implementing the delayed import.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
2302
diff
changeset

35  from .NetworkProtocolUnknownErrorReply import NetworkProtocolUnknownErrorReply 
e3d7a861547c
Continued implementing the delayed import.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
2302
diff
changeset

36  
1665
b248526d3a1b
Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1664
diff
changeset

37  if request.url().toString() == "eric:home": 
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

38  return NetworkReply(request, self.__createHomePage(), 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

39  "text/html", self.parent()) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

40  elif request.url().toString() == "eric:speeddial": 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

41  return NetworkReply(request, self.__createSpeedDialPage(), 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

42  "text/html", self.parent()) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

43  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

44  return NetworkProtocolUnknownErrorReply("eric", self.parent()) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

45  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

46  def __createHomePage(self): 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

47  """ 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

48  Private method to create the Home page. 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

49  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

50  @return prepared home page (QByteArray) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

51  """ 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

52  if self._homePage is None: 
1665
b248526d3a1b
Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1664
diff
changeset

53  htmlFile = QFile(":/html/startPage.html") 
b248526d3a1b
Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1664
diff
changeset

54  htmlFile.open(QFile.ReadOnly) 
b248526d3a1b
Reworked some stuff in the web browser to use Qt resources.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1664
diff
changeset

55  html = htmlFile.readAll() 
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

56  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

57  html.replace("@IMAGE@", "qrc:icons/ericWeb32.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

58  html.replace("@FAVICON@", "qrc:icons/ericWeb16.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

59  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

60  self._homePage = html 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

61  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

62  return QByteArray(self._homePage) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

63  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

64  def __createSpeedDialPage(self): 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

65  """ 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

66  Private method to create the Speeddial page. 
0
de9c2efb9d02
Started porting eric4 to Python3
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
diff
changeset

67  
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

68  @return prepared speeddial page (QByteArray) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

69  """ 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

70  if self._speedDialPage is None: 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

71  htmlFile = QFile(":/html/speeddialPage.html") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

72  htmlFile.open(QFile.ReadOnly) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

73  html = htmlFile.readAll() 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

74  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

75  html.replace("@FAVICON@", "qrc:icons/ericWeb16.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

76  html.replace("@IMG_PLUS@", "qrc:icons/plus.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

77  html.replace("@IMG_CLOSE@", "qrc:icons/close.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

78  html.replace("@IMG_EDIT@", "qrc:icons/edit.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

79  html.replace("@IMG_RELOAD@", "qrc:icons/reload.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

80  html.replace("@IMG_SETTINGS@", "qrc:icons/setting.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

81  html.replace("@LOADINGIMG@", "qrc:icons/loading.gif") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

82  html.replace("@BOXBORDER@", "qrc:icons/boxbordersmall.png") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

83  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

84  html.replace("@JQUERY@", "qrc:javascript/jquery.js") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

85  html.replace("@JQUERYUI@", "qrc:javascript/jqueryui.js") 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

86  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

87  html.replace("@SITETITLE@", self.trUtf8("Speed Dial")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

88  html.replace("@URL@", self.trUtf8("URL")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

89  html.replace("@TITLE@", self.trUtf8("Title")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

90  html.replace("@APPLY@", self.trUtf8("Apply")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

91  html.replace("@NEWPAGE@", self.trUtf8("New Page")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

92  html.replace("@TITLEEDIT@", self.trUtf8("Edit")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

93  html.replace("@TITLEREMOVE@", self.trUtf8("Remove")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

94  html.replace("@TITLERELOAD@", self.trUtf8("Reload")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

95  html.replace("@TITLEFETCHTITLE@", self.trUtf8("Load title from page")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

96  html.replace("@SETTINGSTITLE@", self.trUtf8("Speed Dial Settings")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

97  html.replace("@ADDTITLE@", self.trUtf8("Add New Page")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

98  html.replace("@TXT_NRROWS@", self.trUtf8("Maximum pages in a row:")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

99  html.replace("@TXT_SDSIZE@", self.trUtf8("Change size of pages:")) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

100  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

101  self._speedDialPage = html 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

102  
2403
e3d7a861547c
Continued implementing the delayed import.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
2302
diff
changeset

103  import Helpviewer.HelpWindow 
1670
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

104  html = QByteArray(self._speedDialPage) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

105  dial = Helpviewer.HelpWindow.HelpWindow.speedDial() 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

106  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

107  html.replace("@INITIALSCRIPT@", dial.initialScript()) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

108  html.replace("@ROWPAGES@", str(dial.pagesInRow())) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

109  html.replace("@SDSIZE@", str(dial.sdSize())) 
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

110  
6fd889391d2c
Added a Speed Dial to the web browser including the capability to select the first ten pages by pressing Meta+1 to Meta+0.
Detlev Offenbach <detlev@dieoffenbachs.de>
parents:
1665
diff
changeset

111  return html 