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