|
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>eric5.Graphics.SvgDiagram</title> |
|
6 <style> |
|
7 b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' |
|
8 </style> |
|
9 </head> |
|
10 <body><a NAME="top" ID="top"></a> |
|
11 <h1>eric5.Graphics.SvgDiagram</h1> |
|
12 <p> |
|
13 Module implementing a dialog showing a SVG graphic. |
|
14 </p> |
|
15 <h3>Global Attributes</h3> |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#SvgDiagram">SvgDiagram</a></td> |
|
23 <td>Class implementing a dialog showing a SVG graphic.</td> |
|
24 </tr> |
|
25 </table> |
|
26 <h3>Functions</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <hr /><hr /> |
|
31 <a NAME="SvgDiagram" ID="SvgDiagram"></a> |
|
32 <h2>SvgDiagram</h2> |
|
33 <p> |
|
34 Class implementing a dialog showing a SVG graphic. |
|
35 </p> |
|
36 <h3>Derived from</h3> |
|
37 QMainWindow |
|
38 <h3>Class Attributes</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <h3>Methods</h3> |
|
43 <table> |
|
44 <tr> |
|
45 <td><a href="#SvgDiagram.__init__">SvgDiagram</a></td> |
|
46 <td>Constructor</td> |
|
47 </tr><tr> |
|
48 <td><a href="#SvgDiagram.__adjustScrollBar">__adjustScrollBar</a></td> |
|
49 <td>Private method to adjust a scrollbar by a certain factor.</td> |
|
50 </tr><tr> |
|
51 <td><a href="#SvgDiagram.__doZoom">__doZoom</a></td> |
|
52 <td>Private method to perform the zooming.</td> |
|
53 </tr><tr> |
|
54 <td><a href="#SvgDiagram.__initActions">__initActions</a></td> |
|
55 <td>Private method to initialize the view actions.</td> |
|
56 </tr><tr> |
|
57 <td><a href="#SvgDiagram.__initContextMenu">__initContextMenu</a></td> |
|
58 <td>Private method to initialize the context menu.</td> |
|
59 </tr><tr> |
|
60 <td><a href="#SvgDiagram.__initToolBars">__initToolBars</a></td> |
|
61 <td>Private method to populate the toolbars with our actions.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#SvgDiagram.__print">__print</a></td> |
|
64 <td>Private slot to the actual printing.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#SvgDiagram.__printDiagram">__printDiagram</a></td> |
|
67 <td>Private slot called to print the diagram.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#SvgDiagram.__printPreviewDiagram">__printPreviewDiagram</a></td> |
|
70 <td>Private slot called to show a print preview of the diagram.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#SvgDiagram.__showContextMenu">__showContextMenu</a></td> |
|
73 <td>Private slot to show the context menu of the listview.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#SvgDiagram.__zoom">__zoom</a></td> |
|
76 <td>Private method to handle the zoom context menu action.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#SvgDiagram.__zoomIn">__zoomIn</a></td> |
|
79 <td>Private method to handle the zoom in context menu entry.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#SvgDiagram.__zoomOut">__zoomOut</a></td> |
|
82 <td>Private method to handle the zoom out context menu entry.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#SvgDiagram.__zoomReset">__zoomReset</a></td> |
|
85 <td>Private method to handle the reset zoom context menu entry.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#SvgDiagram.getDiagramName">getDiagramName</a></td> |
|
88 <td>Method to retrieve a name for the diagram.</td> |
|
89 </tr> |
|
90 </table> |
|
91 <a NAME="SvgDiagram.__init__" ID="SvgDiagram.__init__"></a> |
|
92 <h4>SvgDiagram (Constructor)</h4> |
|
93 <b>SvgDiagram</b>(<i>svgFile, parent = None, name = None</i>) |
|
94 <p> |
|
95 Constructor |
|
96 </p><dl> |
|
97 <dt><i>svgFile</i></dt> |
|
98 <dd> |
|
99 filename of a SVG graphics file to show (string) |
|
100 </dd><dt><i>parent</i></dt> |
|
101 <dd> |
|
102 parent widget of the view (QWidget) |
|
103 </dd><dt><i>name</i></dt> |
|
104 <dd> |
|
105 name of the view widget (string) |
|
106 </dd> |
|
107 </dl><a NAME="SvgDiagram.__adjustScrollBar" ID="SvgDiagram.__adjustScrollBar"></a> |
|
108 <h4>SvgDiagram.__adjustScrollBar</h4> |
|
109 <b>__adjustScrollBar</b>(<i>scrollBar, factor</i>) |
|
110 <p> |
|
111 Private method to adjust a scrollbar by a certain factor. |
|
112 </p><dl> |
|
113 <dt><i>scrollBar</i></dt> |
|
114 <dd> |
|
115 reference to the scrollbar object (QScrollBar) |
|
116 </dd><dt><i>factor</i></dt> |
|
117 <dd> |
|
118 factor to adjust by (float) |
|
119 </dd> |
|
120 </dl><a NAME="SvgDiagram.__doZoom" ID="SvgDiagram.__doZoom"></a> |
|
121 <h4>SvgDiagram.__doZoom</h4> |
|
122 <b>__doZoom</b>(<i>factor</i>) |
|
123 <p> |
|
124 Private method to perform the zooming. |
|
125 </p><dl> |
|
126 <dt><i>factor</i></dt> |
|
127 <dd> |
|
128 zoom factor (float) |
|
129 </dd> |
|
130 </dl><a NAME="SvgDiagram.__initActions" ID="SvgDiagram.__initActions"></a> |
|
131 <h4>SvgDiagram.__initActions</h4> |
|
132 <b>__initActions</b>(<i></i>) |
|
133 <p> |
|
134 Private method to initialize the view actions. |
|
135 </p><a NAME="SvgDiagram.__initContextMenu" ID="SvgDiagram.__initContextMenu"></a> |
|
136 <h4>SvgDiagram.__initContextMenu</h4> |
|
137 <b>__initContextMenu</b>(<i></i>) |
|
138 <p> |
|
139 Private method to initialize the context menu. |
|
140 </p><a NAME="SvgDiagram.__initToolBars" ID="SvgDiagram.__initToolBars"></a> |
|
141 <h4>SvgDiagram.__initToolBars</h4> |
|
142 <b>__initToolBars</b>(<i></i>) |
|
143 <p> |
|
144 Private method to populate the toolbars with our actions. |
|
145 </p><a NAME="SvgDiagram.__print" ID="SvgDiagram.__print"></a> |
|
146 <h4>SvgDiagram.__print</h4> |
|
147 <b>__print</b>(<i>printer</i>) |
|
148 <p> |
|
149 Private slot to the actual printing. |
|
150 </p><dl> |
|
151 <dt><i>printer</i></dt> |
|
152 <dd> |
|
153 reference to the printer object (QPrinter) |
|
154 </dd> |
|
155 </dl><a NAME="SvgDiagram.__printDiagram" ID="SvgDiagram.__printDiagram"></a> |
|
156 <h4>SvgDiagram.__printDiagram</h4> |
|
157 <b>__printDiagram</b>(<i></i>) |
|
158 <p> |
|
159 Private slot called to print the diagram. |
|
160 </p><a NAME="SvgDiagram.__printPreviewDiagram" ID="SvgDiagram.__printPreviewDiagram"></a> |
|
161 <h4>SvgDiagram.__printPreviewDiagram</h4> |
|
162 <b>__printPreviewDiagram</b>(<i></i>) |
|
163 <p> |
|
164 Private slot called to show a print preview of the diagram. |
|
165 </p><a NAME="SvgDiagram.__showContextMenu" ID="SvgDiagram.__showContextMenu"></a> |
|
166 <h4>SvgDiagram.__showContextMenu</h4> |
|
167 <b>__showContextMenu</b>(<i>coord</i>) |
|
168 <p> |
|
169 Private slot to show the context menu of the listview. |
|
170 </p><dl> |
|
171 <dt><i>coord</i></dt> |
|
172 <dd> |
|
173 the position of the mouse pointer (QPoint) |
|
174 </dd> |
|
175 </dl><a NAME="SvgDiagram.__zoom" ID="SvgDiagram.__zoom"></a> |
|
176 <h4>SvgDiagram.__zoom</h4> |
|
177 <b>__zoom</b>(<i></i>) |
|
178 <p> |
|
179 Private method to handle the zoom context menu action. |
|
180 </p><a NAME="SvgDiagram.__zoomIn" ID="SvgDiagram.__zoomIn"></a> |
|
181 <h4>SvgDiagram.__zoomIn</h4> |
|
182 <b>__zoomIn</b>(<i></i>) |
|
183 <p> |
|
184 Private method to handle the zoom in context menu entry. |
|
185 </p><a NAME="SvgDiagram.__zoomOut" ID="SvgDiagram.__zoomOut"></a> |
|
186 <h4>SvgDiagram.__zoomOut</h4> |
|
187 <b>__zoomOut</b>(<i></i>) |
|
188 <p> |
|
189 Private method to handle the zoom out context menu entry. |
|
190 </p><a NAME="SvgDiagram.__zoomReset" ID="SvgDiagram.__zoomReset"></a> |
|
191 <h4>SvgDiagram.__zoomReset</h4> |
|
192 <b>__zoomReset</b>(<i></i>) |
|
193 <p> |
|
194 Private method to handle the reset zoom context menu entry. |
|
195 </p><a NAME="SvgDiagram.getDiagramName" ID="SvgDiagram.getDiagramName"></a> |
|
196 <h4>SvgDiagram.getDiagramName</h4> |
|
197 <b>getDiagramName</b>(<i></i>) |
|
198 <p> |
|
199 Method to retrieve a name for the diagram. |
|
200 </p><dl> |
|
201 <dt>Returns:</dt> |
|
202 <dd> |
|
203 name for the diagram |
|
204 </dd> |
|
205 </dl> |
|
206 <div align="right"><a href="#top">Up</a></div> |
|
207 <hr /> |
|
208 </body></html> |