|
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.Graphics.SvgDiagram</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.Graphics.SvgDiagram</h1> |
|
24 <p> |
|
25 Module implementing a dialog showing a SVG graphic. |
|
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="#SvgDiagram">SvgDiagram</a></td> |
|
35 <td>Class implementing a dialog showing a SVG graphic.</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="SvgDiagram" ID="SvgDiagram"></a> |
|
44 <h2>SvgDiagram</h2> |
|
45 <p> |
|
46 Class implementing a dialog showing a SVG graphic. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QMainWindow |
|
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="#SvgDiagram.__init__">SvgDiagram</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#SvgDiagram.__adjustScrollBar">__adjustScrollBar</a></td> |
|
61 <td>Private method to adjust a scrollbar by a certain factor.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#SvgDiagram.__doZoom">__doZoom</a></td> |
|
64 <td>Private method to perform the zooming.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SvgDiagram.__initActions">__initActions</a></td> |
|
67 <td>Private method to initialize the view actions.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SvgDiagram.__initContextMenu">__initContextMenu</a></td> |
|
70 <td>Private method to initialize the context menu.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SvgDiagram.__initToolBars">__initToolBars</a></td> |
|
73 <td>Private method to populate the toolbars with our actions.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SvgDiagram.__print">__print</a></td> |
|
76 <td>Private slot to the actual printing.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SvgDiagram.__printDiagram">__printDiagram</a></td> |
|
79 <td>Private slot called to print the diagram.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SvgDiagram.__printPreviewDiagram">__printPreviewDiagram</a></td> |
|
82 <td>Private slot called to show a print preview of the diagram.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SvgDiagram.__showContextMenu">__showContextMenu</a></td> |
|
85 <td>Private slot to show the context menu of the listview.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SvgDiagram.__zoom">__zoom</a></td> |
|
88 <td>Private method to handle the zoom context menu action.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#SvgDiagram.__zoomIn">__zoomIn</a></td> |
|
91 <td>Private method to handle the zoom in context menu entry.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#SvgDiagram.__zoomOut">__zoomOut</a></td> |
|
94 <td>Private method to handle the zoom out context menu entry.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#SvgDiagram.__zoomReset">__zoomReset</a></td> |
|
97 <td>Private method to handle the reset zoom context menu entry.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#SvgDiagram.getDiagramName">getDiagramName</a></td> |
|
100 <td>Method to retrieve a name for the diagram.</td> |
|
101 </tr> |
|
102 </table> |
|
103 <a NAME="SvgDiagram.__init__" ID="SvgDiagram.__init__"></a> |
|
104 <h4>SvgDiagram (Constructor)</h4> |
|
105 <b>SvgDiagram</b>(<i>svgFile, parent = None, name = None</i>) |
|
106 <p> |
|
107 Constructor |
|
108 </p><dl> |
|
109 <dt><i>svgFile</i></dt> |
|
110 <dd> |
|
111 filename of a SVG graphics file to show (string) |
|
112 </dd><dt><i>parent</i></dt> |
|
113 <dd> |
|
114 parent widget of the view (QWidget) |
|
115 </dd><dt><i>name</i></dt> |
|
116 <dd> |
|
117 name of the view widget (string) |
|
118 </dd> |
|
119 </dl><a NAME="SvgDiagram.__adjustScrollBar" ID="SvgDiagram.__adjustScrollBar"></a> |
|
120 <h4>SvgDiagram.__adjustScrollBar</h4> |
|
121 <b>__adjustScrollBar</b>(<i>scrollBar, factor</i>) |
|
122 <p> |
|
123 Private method to adjust a scrollbar by a certain factor. |
|
124 </p><dl> |
|
125 <dt><i>scrollBar</i></dt> |
|
126 <dd> |
|
127 reference to the scrollbar object (QScrollBar) |
|
128 </dd><dt><i>factor</i></dt> |
|
129 <dd> |
|
130 factor to adjust by (float) |
|
131 </dd> |
|
132 </dl><a NAME="SvgDiagram.__doZoom" ID="SvgDiagram.__doZoom"></a> |
|
133 <h4>SvgDiagram.__doZoom</h4> |
|
134 <b>__doZoom</b>(<i>factor</i>) |
|
135 <p> |
|
136 Private method to perform the zooming. |
|
137 </p><dl> |
|
138 <dt><i>factor</i></dt> |
|
139 <dd> |
|
140 zoom factor (float) |
|
141 </dd> |
|
142 </dl><a NAME="SvgDiagram.__initActions" ID="SvgDiagram.__initActions"></a> |
|
143 <h4>SvgDiagram.__initActions</h4> |
|
144 <b>__initActions</b>(<i></i>) |
|
145 <p> |
|
146 Private method to initialize the view actions. |
|
147 </p><a NAME="SvgDiagram.__initContextMenu" ID="SvgDiagram.__initContextMenu"></a> |
|
148 <h4>SvgDiagram.__initContextMenu</h4> |
|
149 <b>__initContextMenu</b>(<i></i>) |
|
150 <p> |
|
151 Private method to initialize the context menu. |
|
152 </p><a NAME="SvgDiagram.__initToolBars" ID="SvgDiagram.__initToolBars"></a> |
|
153 <h4>SvgDiagram.__initToolBars</h4> |
|
154 <b>__initToolBars</b>(<i></i>) |
|
155 <p> |
|
156 Private method to populate the toolbars with our actions. |
|
157 </p><a NAME="SvgDiagram.__print" ID="SvgDiagram.__print"></a> |
|
158 <h4>SvgDiagram.__print</h4> |
|
159 <b>__print</b>(<i>printer</i>) |
|
160 <p> |
|
161 Private slot to the actual printing. |
|
162 </p><dl> |
|
163 <dt><i>printer</i></dt> |
|
164 <dd> |
|
165 reference to the printer object (QPrinter) |
|
166 </dd> |
|
167 </dl><a NAME="SvgDiagram.__printDiagram" ID="SvgDiagram.__printDiagram"></a> |
|
168 <h4>SvgDiagram.__printDiagram</h4> |
|
169 <b>__printDiagram</b>(<i></i>) |
|
170 <p> |
|
171 Private slot called to print the diagram. |
|
172 </p><a NAME="SvgDiagram.__printPreviewDiagram" ID="SvgDiagram.__printPreviewDiagram"></a> |
|
173 <h4>SvgDiagram.__printPreviewDiagram</h4> |
|
174 <b>__printPreviewDiagram</b>(<i></i>) |
|
175 <p> |
|
176 Private slot called to show a print preview of the diagram. |
|
177 </p><a NAME="SvgDiagram.__showContextMenu" ID="SvgDiagram.__showContextMenu"></a> |
|
178 <h4>SvgDiagram.__showContextMenu</h4> |
|
179 <b>__showContextMenu</b>(<i>coord</i>) |
|
180 <p> |
|
181 Private slot to show the context menu of the listview. |
|
182 </p><dl> |
|
183 <dt><i>coord</i></dt> |
|
184 <dd> |
|
185 the position of the mouse pointer (QPoint) |
|
186 </dd> |
|
187 </dl><a NAME="SvgDiagram.__zoom" ID="SvgDiagram.__zoom"></a> |
|
188 <h4>SvgDiagram.__zoom</h4> |
|
189 <b>__zoom</b>(<i></i>) |
|
190 <p> |
|
191 Private method to handle the zoom context menu action. |
|
192 </p><a NAME="SvgDiagram.__zoomIn" ID="SvgDiagram.__zoomIn"></a> |
|
193 <h4>SvgDiagram.__zoomIn</h4> |
|
194 <b>__zoomIn</b>(<i></i>) |
|
195 <p> |
|
196 Private method to handle the zoom in context menu entry. |
|
197 </p><a NAME="SvgDiagram.__zoomOut" ID="SvgDiagram.__zoomOut"></a> |
|
198 <h4>SvgDiagram.__zoomOut</h4> |
|
199 <b>__zoomOut</b>(<i></i>) |
|
200 <p> |
|
201 Private method to handle the zoom out context menu entry. |
|
202 </p><a NAME="SvgDiagram.__zoomReset" ID="SvgDiagram.__zoomReset"></a> |
|
203 <h4>SvgDiagram.__zoomReset</h4> |
|
204 <b>__zoomReset</b>(<i></i>) |
|
205 <p> |
|
206 Private method to handle the reset zoom context menu entry. |
|
207 </p><a NAME="SvgDiagram.getDiagramName" ID="SvgDiagram.getDiagramName"></a> |
|
208 <h4>SvgDiagram.getDiagramName</h4> |
|
209 <b>getDiagramName</b>(<i></i>) |
|
210 <p> |
|
211 Method to retrieve a name for the diagram. |
|
212 </p><dl> |
|
213 <dt>Returns:</dt> |
|
214 <dd> |
|
215 name for the diagram |
|
216 </dd> |
|
217 </dl> |
|
218 <div align="right"><a href="#top">Up</a></div> |
|
219 <hr /> |
|
220 </body></html> |