|
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.HelpTocWidget</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.HelpTocWidget</h1> |
|
24 <p> |
|
25 Module implementing a window for showing the QtHelp TOC. |
|
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="#HelpTocWidget">HelpTocWidget</a></td> |
|
35 <td>Class implementing a window for showing the QtHelp TOC.</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="HelpTocWidget" ID="HelpTocWidget"></a> |
|
44 <h2>HelpTocWidget</h2> |
|
45 <p> |
|
46 Class implementing a window for showing the QtHelp TOC. |
|
47 </p><h4>Signals</h4> |
|
48 <dl> |
|
49 <dt>escapePressed()</dt> |
|
50 <dd> |
|
51 emitted when the ESC key was pressed |
|
52 </dd><dt>linkActivated(const QUrl&)</dt> |
|
53 <dd> |
|
54 emitted when a TOC entry is activated |
|
55 </dd> |
|
56 </dl> |
|
57 <h3>Derived from</h3> |
|
58 QWidget |
|
59 <h3>Class Attributes</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#HelpTocWidget.__init__">HelpTocWidget</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr><tr> |
|
69 <td><a href="#HelpTocWidget.__expandTOC">__expandTOC</a></td> |
|
70 <td>Private slot to expand the table of contents.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#HelpTocWidget.__showContextMenu">__showContextMenu</a></td> |
|
73 <td>Private slot showing the context menu.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#HelpTocWidget.eventFilter">eventFilter</a></td> |
|
76 <td>Public method called to filter the event queue.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#HelpTocWidget.expandToDepth">expandToDepth</a></td> |
|
79 <td>Public slot to expand the table of contents to a specific depth.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#HelpTocWidget.focusInEvent">focusInEvent</a></td> |
|
82 <td>Protected method handling focus in events.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#HelpTocWidget.itemClicked">itemClicked</a></td> |
|
85 <td>Public slot handling a click of a TOC entry.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#HelpTocWidget.keyPressEvent">keyPressEvent</a></td> |
|
88 <td>Protected method handling key press events.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#HelpTocWidget.syncToContent">syncToContent</a></td> |
|
91 <td>Public method to sync the TOC to the displayed page.</td> |
|
92 </tr> |
|
93 </table> |
|
94 <a NAME="HelpTocWidget.__init__" ID="HelpTocWidget.__init__"></a> |
|
95 <h4>HelpTocWidget (Constructor)</h4> |
|
96 <b>HelpTocWidget</b>(<i>engine, mainWindow, parent = None</i>) |
|
97 <p> |
|
98 Constructor |
|
99 </p><dl> |
|
100 <dt><i>engine</i></dt> |
|
101 <dd> |
|
102 reference to the help engine (QHelpEngine) |
|
103 </dd><dt><i>mainWindow</i></dt> |
|
104 <dd> |
|
105 reference to the main window object (QMainWindow) |
|
106 </dd><dt><i>parent</i></dt> |
|
107 <dd> |
|
108 reference to the parent widget (QWidget) |
|
109 </dd> |
|
110 </dl><a NAME="HelpTocWidget.__expandTOC" ID="HelpTocWidget.__expandTOC"></a> |
|
111 <h4>HelpTocWidget.__expandTOC</h4> |
|
112 <b>__expandTOC</b>(<i></i>) |
|
113 <p> |
|
114 Private slot to expand the table of contents. |
|
115 </p><a NAME="HelpTocWidget.__showContextMenu" ID="HelpTocWidget.__showContextMenu"></a> |
|
116 <h4>HelpTocWidget.__showContextMenu</h4> |
|
117 <b>__showContextMenu</b>(<i>pos</i>) |
|
118 <p> |
|
119 Private slot showing the context menu. |
|
120 </p><dl> |
|
121 <dt><i>pos</i></dt> |
|
122 <dd> |
|
123 position to show the menu at (QPoint) |
|
124 </dd> |
|
125 </dl><a NAME="HelpTocWidget.eventFilter" ID="HelpTocWidget.eventFilter"></a> |
|
126 <h4>HelpTocWidget.eventFilter</h4> |
|
127 <b>eventFilter</b>(<i>watched, event</i>) |
|
128 <p> |
|
129 Public method called to filter the event queue. |
|
130 </p><dl> |
|
131 <dt><i>watched</i></dt> |
|
132 <dd> |
|
133 the QObject being watched (QObject) |
|
134 </dd><dt><i>event</i></dt> |
|
135 <dd> |
|
136 the event that occurred (QEvent) |
|
137 </dd> |
|
138 </dl><dl> |
|
139 <dt>Returns:</dt> |
|
140 <dd> |
|
141 flag indicating whether the event was handled (boolean) |
|
142 </dd> |
|
143 </dl><a NAME="HelpTocWidget.expandToDepth" ID="HelpTocWidget.expandToDepth"></a> |
|
144 <h4>HelpTocWidget.expandToDepth</h4> |
|
145 <b>expandToDepth</b>(<i>depth</i>) |
|
146 <p> |
|
147 Public slot to expand the table of contents to a specific depth. |
|
148 </p><dl> |
|
149 <dt><i>depth</i></dt> |
|
150 <dd> |
|
151 depth to expand to (integer) |
|
152 </dd> |
|
153 </dl><a NAME="HelpTocWidget.focusInEvent" ID="HelpTocWidget.focusInEvent"></a> |
|
154 <h4>HelpTocWidget.focusInEvent</h4> |
|
155 <b>focusInEvent</b>(<i>evt</i>) |
|
156 <p> |
|
157 Protected method handling focus in events. |
|
158 </p><dl> |
|
159 <dt><i>evt</i></dt> |
|
160 <dd> |
|
161 reference to the focus event object (QFocusEvent) |
|
162 </dd> |
|
163 </dl><a NAME="HelpTocWidget.itemClicked" ID="HelpTocWidget.itemClicked"></a> |
|
164 <h4>HelpTocWidget.itemClicked</h4> |
|
165 <b>itemClicked</b>(<i>index</i>) |
|
166 <p> |
|
167 Public slot handling a click of a TOC entry. |
|
168 </p><dl> |
|
169 <dt><i>index</i></dt> |
|
170 <dd> |
|
171 index of the TOC clicked (QModelIndex) |
|
172 </dd> |
|
173 </dl><a NAME="HelpTocWidget.keyPressEvent" ID="HelpTocWidget.keyPressEvent"></a> |
|
174 <h4>HelpTocWidget.keyPressEvent</h4> |
|
175 <b>keyPressEvent</b>(<i>evt</i>) |
|
176 <p> |
|
177 Protected method handling key press events. |
|
178 </p><dl> |
|
179 <dt><i>evt</i></dt> |
|
180 <dd> |
|
181 reference to the key press event (QKeyEvent) |
|
182 </dd> |
|
183 </dl><a NAME="HelpTocWidget.syncToContent" ID="HelpTocWidget.syncToContent"></a> |
|
184 <h4>HelpTocWidget.syncToContent</h4> |
|
185 <b>syncToContent</b>(<i>url</i>) |
|
186 <p> |
|
187 Public method to sync the TOC to the displayed page. |
|
188 </p><dl> |
|
189 <dt><i>url</i></dt> |
|
190 <dd> |
|
191 URL of the displayed page (QUrl) |
|
192 </dd> |
|
193 </dl><dl> |
|
194 <dt>Returns:</dt> |
|
195 <dd> |
|
196 flag indicating a successful synchronization (boolean) |
|
197 </dd> |
|
198 </dl> |
|
199 <div align="right"><a href="#top">Up</a></div> |
|
200 <hr /> |
|
201 </body></html> |