Documentation/Source/eric5.E5Graphics.E5GraphicsView.html

changeset 58
37f0444c3479
parent 51
7d80b0f20ca6
child 409
0ea528e80202
equal deleted inserted replaced
57:81326a94fdca 58:37f0444c3479
20 </style> 20 </style>
21 </head> 21 </head>
22 <body><a NAME="top" ID="top"></a> 22 <body><a NAME="top" ID="top"></a>
23 <h1>eric5.E5Graphics.E5GraphicsView</h1> 23 <h1>eric5.E5Graphics.E5GraphicsView</h1>
24 <p> 24 <p>
25 &#77;&#111;&#100;&#117;&#108;&#101; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#99;&#97;&#110;v&#97;&#115; v&#105;&#101;w &#99;&#108;&#97;&#115;&#115;. 25 Module implementing a canvas view class.
26 </p> 26 </p>
27 <h3>Global Attributes</h3> 27 <h3>Global Attributes</h3>
28 <table> 28 <table>
29 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
30 </table> 30 </table>
31 <h3>Classes</h3> 31 <h3>Classes</h3>
32 <table> 32 <table>
33 <tr> 33 <tr>
34 <td><a href="#E5GraphicsView">E5GraphicsView</a></td> 34 <td><a href="#E5GraphicsView">E5GraphicsView</a></td>
35 <td>&#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#103;&#114;&#97;&#112;&#104;&#105;&#99;&#115; v&#105;&#101;w.</td> 35 <td>Class implementing a graphics view.</td>
36 </tr> 36 </tr>
37 </table> 37 </table>
38 <h3>Functions</h3> 38 <h3>Functions</h3>
39 <table> 39 <table>
40 <tr><td>None</td></tr> 40 <tr><td>None</td></tr>
41 </table> 41 </table>
42 <hr /><hr /> 42 <hr /><hr />
43 <a NAME="E5GraphicsView" ID="E5GraphicsView"></a> 43 <a NAME="E5GraphicsView" ID="E5GraphicsView"></a>
44 <h2>E5GraphicsView</h2> 44 <h2>E5GraphicsView</h2>
45 <p> 45 <p>
46 &#67;&#108;&#97;&#115;&#115; &#105;&#109;&#112;&#108;&#101;&#109;&#101;&#110;&#116;&#105;&#110;&#103; &#97; &#103;&#114;&#97;&#112;&#104;&#105;&#99;&#115; v&#105;&#101;w. 46 Class implementing a graphics view.
47 </p> 47 </p>
48 <h3>Derived from</h3> 48 <h3>Derived from</h3>
49 QGraphicsView 49 QGraphicsView
50 <h3>Class Attributes</h3> 50 <h3>Class Attributes</h3>
51 <table> 51 <table>
53 </table> 53 </table>
54 <h3>Methods</h3> 54 <h3>Methods</h3>
55 <table> 55 <table>
56 <tr> 56 <tr>
57 <td><a href="#E5GraphicsView.__init__">E5GraphicsView</a></td> 57 <td><a href="#E5GraphicsView.__init__">E5GraphicsView</a></td>
58 <td>&#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114;</td> 58 <td>Constructor</td>
59 </tr><tr> 59 </tr><tr>
60 <td><a href="#E5GraphicsView.__getDiagram">__getDiagram</a></td> 60 <td><a href="#E5GraphicsView.__getDiagram">__getDiagram</a></td>
61 <td>&#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#105;&#116; &#105;&#110; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101;.</td> 61 <td>Private method to retrieve the diagram from the scene fitting it in the minimum rectangle.</td>
62 </tr><tr> 62 </tr><tr>
63 <td><a href="#E5GraphicsView._getDiagramRect">_getDiagramRect</a></td> 63 <td><a href="#E5GraphicsView._getDiagramRect">_getDiagramRect</a></td>
64 <td>&#80;&#114;&#111;&#116;&#101;&#99;&#116;&#101;&#100; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;.</td> 64 <td>Protected method to calculate the minimum rectangle fitting the diagram.</td>
65 </tr><tr> 65 </tr><tr>
66 <td><a href="#E5GraphicsView._getDiagramSize">_getDiagramSize</a></td> 66 <td><a href="#E5GraphicsView._getDiagramSize">_getDiagramSize</a></td>
67 <td>&#80;&#114;&#111;&#116;&#101;&#99;&#116;&#101;&#100; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#115;&#105;z&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;.</td> 67 <td>Protected method to calculate the minimum size fitting the diagram.</td>
68 </tr><tr> 68 </tr><tr>
69 <td><a href="#E5GraphicsView.filteredItems">filteredItems</a></td> 69 <td><a href="#E5GraphicsView.filteredItems">filteredItems</a></td>
70 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#102;&#105;&#108;&#116;&#101;&#114; &#97; &#108;&#105;&#115;&#116; &#111;&#102; &#105;&#116;&#101;&#109;&#115;.</td> 70 <td>Public method to filter a list of items.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#E5GraphicsView.printDiagram">printDiagram</a></td> 72 <td><a href="#E5GraphicsView.printDiagram">printDiagram</a></td>
73 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#112;&#114;&#105;&#110;&#116; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;.</td> 73 <td>Public method to print the diagram.</td>
74 </tr><tr> 74 </tr><tr>
75 <td><a href="#E5GraphicsView.resizeScene">resizeScene</a></td> 75 <td><a href="#E5GraphicsView.resizeScene">resizeScene</a></td>
76 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#115;&#105;z&#101; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101;.</td> 76 <td>Public method to resize the scene.</td>
77 </tr><tr> 77 </tr><tr>
78 <td><a href="#E5GraphicsView.saveImage">saveImage</a></td> 78 <td><a href="#E5GraphicsView.saveImage">saveImage</a></td>
79 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#97;v&#101; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#116;&#111; &#97; &#102;&#105;&#108;&#101;.</td> 79 <td>Public method to save the scene to a file.</td>
80 </tr><tr> 80 </tr><tr>
81 <td><a href="#E5GraphicsView.setSceneSize">setSceneSize</a></td> 81 <td><a href="#E5GraphicsView.setSceneSize">setSceneSize</a></td>
82 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#115;&#105;z&#101;.</td> 82 <td>Public method to set the scene size.</td>
83 </tr><tr> 83 </tr><tr>
84 <td><a href="#E5GraphicsView.setZoom">setZoom</a></td> 84 <td><a href="#E5GraphicsView.setZoom">setZoom</a></td>
85 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114;.</td> 85 <td>Public method to set the zoom factor.</td>
86 </tr><tr> 86 </tr><tr>
87 <td><a href="#E5GraphicsView.zoom">zoom</a></td> 87 <td><a href="#E5GraphicsView.zoom">zoom</a></td>
88 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#99;&#117;&#114;&#114;&#101;&#110;&#116; z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114;.</td> 88 <td>Public method to get the current zoom factor.</td>
89 </tr><tr> 89 </tr><tr>
90 <td><a href="#E5GraphicsView.zoomIn">zoomIn</a></td> 90 <td><a href="#E5GraphicsView.zoomIn">zoomIn</a></td>
91 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; z&#111;&#111;&#109; &#105;&#110;.</td> 91 <td>Public method to zoom in.</td>
92 </tr><tr> 92 </tr><tr>
93 <td><a href="#E5GraphicsView.zoomOut">zoomOut</a></td> 93 <td><a href="#E5GraphicsView.zoomOut">zoomOut</a></td>
94 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; z&#111;&#111;&#109; &#111;&#117;&#116;.</td> 94 <td>Public method to zoom out.</td>
95 </tr><tr> 95 </tr><tr>
96 <td><a href="#E5GraphicsView.zoomReset">zoomReset</a></td> 96 <td><a href="#E5GraphicsView.zoomReset">zoomReset</a></td>
97 <td>&#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#114;&#101;&#115;&#101;&#116; z&#111;&#111;&#109; &#99;&#111;&#110;&#116;&#101;x&#116; &#109;&#101;&#110;&#117; &#101;&#110;&#116;&#114;y.</td> 97 <td>Public method to handle the reset zoom context menu entry.</td>
98 </tr> 98 </tr>
99 </table> 99 </table>
100 <a NAME="E5GraphicsView.__init__" ID="E5GraphicsView.__init__"></a> 100 <a NAME="E5GraphicsView.__init__" ID="E5GraphicsView.__init__"></a>
101 <h4>E5GraphicsView (Constructor)</h4> 101 <h4>E5GraphicsView (Constructor)</h4>
102 <b>E5GraphicsView</b>(<i>scene, parent = None</i>) 102 <b>E5GraphicsView</b>(<i>scene, parent = None</i>)
103 <p> 103 <p>
104 &#67;&#111;&#110;&#115;&#116;&#114;&#117;&#99;&#116;&#111;&#114; 104 Constructor
105 </p><dl> 105 </p><dl>
106 <dt><i>scene</i></dt> 106 <dt><i>scene</i></dt>
107 <dd> 107 <dd>
108 &#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#111;&#98;&#106;&#101;&#99;&#116; (&#81;&#71;&#114;&#97;&#112;&#104;&#105;&#99;&#115;&#83;&#99;&#101;&#110;&#101;) 108 reference to the scene object (QGraphicsScene)
109 </dd><dt><i>parent</i></dt> 109 </dd><dt><i>parent</i></dt>
110 <dd> 110 <dd>
111 &#112;&#97;&#114;&#101;&#110;&#116; w&#105;&#100;&#103;&#101;&#116; (&#81;&#87;&#105;&#100;&#103;&#101;&#116;) 111 parent widget (QWidget)
112 </dd> 112 </dd>
113 </dl><a NAME="E5GraphicsView.__getDiagram" ID="E5GraphicsView.__getDiagram"></a> 113 </dl><a NAME="E5GraphicsView.__getDiagram" ID="E5GraphicsView.__getDiagram"></a>
114 <h4>E5GraphicsView.__getDiagram</h4> 114 <h4>E5GraphicsView.__getDiagram</h4>
115 <b>__getDiagram</b>(<i>rect, format = "PNG", filename = None</i>) 115 <b>__getDiagram</b>(<i>rect, format = "PNG", filename = None</i>)
116 <p> 116 <p>
117 &#80;&#114;&#105;v&#97;&#116;&#101; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#116;&#114;&#105;&#101;v&#101; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109; &#102;&#114;&#111;&#109; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#105;&#116; 117 Private method to retrieve the diagram from the scene fitting it
118 &#105;&#110; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101;. 118 in the minimum rectangle.
119 </p><dl> 119 </p><dl>
120 <dt><i>rect</i></dt> 120 <dt><i>rect</i></dt>
121 <dd> 121 <dd>
122 &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109; (&#81;&#82;&#101;&#99;&#116;&#70;) 122 minimum rectangle fitting the diagram (QRectF)
123 </dd><dt><i>format</i></dt> 123 </dd><dt><i>format</i></dt>
124 <dd> 124 <dd>
125 &#102;&#111;&#114;&#109;&#97;&#116; &#102;&#111;&#114; &#116;&#104;&#101; &#105;&#109;&#97;&#103;&#101; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;) 125 format for the image file (string)
126 </dd><dt><i>filename</i></dt> 126 </dd><dt><i>filename</i></dt>
127 <dd> 127 <dd>
128 &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#102;&#111;&#114; &#110;&#111;&#110; &#112;&#105;x&#109;&#97;&#112;&#115; (&#115;&#116;&#114;&#105;&#110;&#103;) 128 name of the file for non pixmaps (string)
129 </dd> 129 </dd>
130 </dl><dl> 130 </dl><dl>
131 <dt>Returns:</dt> 131 <dt>Returns:</dt>
132 <dd> 132 <dd>
133 &#100;&#105;&#97;&#103;&#114;&#97;&#109; &#112;&#105;x&#109;&#97;&#112; &#116;&#111; &#114;&#101;&#99;&#101;&#105;v&#101; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109; (&#81;&#80;&#105;x&#109;&#97;&#112;) 133 diagram pixmap to receive the diagram (QPixmap)
134 </dd> 134 </dd>
135 </dl><a NAME="E5GraphicsView._getDiagramRect" ID="E5GraphicsView._getDiagramRect"></a> 135 </dl><a NAME="E5GraphicsView._getDiagramRect" ID="E5GraphicsView._getDiagramRect"></a>
136 <h4>E5GraphicsView._getDiagramRect</h4> 136 <h4>E5GraphicsView._getDiagramRect</h4>
137 <b>_getDiagramRect</b>(<i>border = 0</i>) 137 <b>_getDiagramRect</b>(<i>border = 0</i>)
138 <p> 138 <p>
139 &#80;&#114;&#111;&#116;&#101;&#99;&#116;&#101;&#100; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;. 139 Protected method to calculate the minimum rectangle fitting the diagram.
140 </p><dl> 140 </p><dl>
141 <dt><i>border</i></dt> 141 <dt><i>border</i></dt>
142 <dd> 142 <dd>
143 &#98;&#111;&#114;&#100;&#101;&#114; w&#105;&#100;&#116;&#104; &#116;&#111; &#105;&#110;&#99;&#108;&#117;&#100;&#101; &#105;&#110; &#116;&#104;&#101; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#105;&#111;&#110; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 143 border width to include in the calculation (integer)
144 </dd> 144 </dd>
145 </dl><dl> 145 </dl><dl>
146 <dt>Returns:</dt> 146 <dt>Returns:</dt>
147 <dd> 147 <dd>
148 &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#114;&#101;&#99;&#116;&#97;&#110;&#103;&#108;&#101; (&#81;&#82;&#101;&#99;&#116;&#70;) 148 the minimum rectangle (QRectF)
149 </dd> 149 </dd>
150 </dl><a NAME="E5GraphicsView._getDiagramSize" ID="E5GraphicsView._getDiagramSize"></a> 150 </dl><a NAME="E5GraphicsView._getDiagramSize" ID="E5GraphicsView._getDiagramSize"></a>
151 <h4>E5GraphicsView._getDiagramSize</h4> 151 <h4>E5GraphicsView._getDiagramSize</h4>
152 <b>_getDiagramSize</b>(<i>border = 0</i>) 152 <b>_getDiagramSize</b>(<i>border = 0</i>)
153 <p> 153 <p>
154 &#80;&#114;&#111;&#116;&#101;&#99;&#116;&#101;&#100; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#101; &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#115;&#105;z&#101; &#102;&#105;&#116;&#116;&#105;&#110;&#103; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;. 154 Protected method to calculate the minimum size fitting the diagram.
155 </p><dl> 155 </p><dl>
156 <dt><i>border</i></dt> 156 <dt><i>border</i></dt>
157 <dd> 157 <dd>
158 &#98;&#111;&#114;&#100;&#101;&#114; w&#105;&#100;&#116;&#104; &#116;&#111; &#105;&#110;&#99;&#108;&#117;&#100;&#101; &#105;&#110; &#116;&#104;&#101; &#99;&#97;&#108;&#99;&#117;&#108;&#97;&#116;&#105;&#111;&#110; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 158 border width to include in the calculation (integer)
159 </dd> 159 </dd>
160 </dl><dl> 160 </dl><dl>
161 <dt>Returns:</dt> 161 <dt>Returns:</dt>
162 <dd> 162 <dd>
163 &#116;&#104;&#101; &#109;&#105;&#110;&#105;&#109;&#117;&#109; &#115;&#105;z&#101; (&#81;&#83;&#105;z&#101;&#70;) 163 the minimum size (QSizeF)
164 </dd> 164 </dd>
165 </dl><a NAME="E5GraphicsView.filteredItems" ID="E5GraphicsView.filteredItems"></a> 165 </dl><a NAME="E5GraphicsView.filteredItems" ID="E5GraphicsView.filteredItems"></a>
166 <h4>E5GraphicsView.filteredItems</h4> 166 <h4>E5GraphicsView.filteredItems</h4>
167 <b>filteredItems</b>(<i>items</i>) 167 <b>filteredItems</b>(<i>items</i>)
168 <p> 168 <p>
169 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#102;&#105;&#108;&#116;&#101;&#114; &#97; &#108;&#105;&#115;&#116; &#111;&#102; &#105;&#116;&#101;&#109;&#115;. 169 Public method to filter a list of items.
170 </p><dl> 170 </p><dl>
171 <dt><i>items</i></dt> 171 <dt><i>items</i></dt>
172 <dd> 172 <dd>
173 &#108;&#105;&#115;&#116; &#111;&#102; &#105;&#116;&#101;&#109;&#115; &#97;&#115; &#114;&#101;&#116;&#117;&#114;&#110;&#101;&#100; &#98;y &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#111;&#98;&#106;&#101;&#99;&#116; 173 list of items as returned by the scene object
174 (&#81;&#71;&#114;&#97;&#112;&#104;&#105;&#99;&#115;&#73;&#116;&#101;&#109;) 174 (QGraphicsItem)
175 </dd> 175 </dd>
176 </dl><dl> 176 </dl><dl>
177 <dt>Returns:</dt> 177 <dt>Returns:</dt>
178 <dd> 178 <dd>
179 &#108;&#105;&#115;&#116; &#111;&#102; &#105;&#110;&#116;&#101;&#114;&#101;&#115;&#116;&#105;&#110;&#103; &#99;&#111;&#108;&#108;&#105;&#115;&#105;&#111;&#110; &#105;&#116;&#101;&#109;&#115; (&#81;&#71;&#114;&#97;&#112;&#104;&#105;&#99;&#115;&#73;&#116;&#101;&#109;) 179 list of interesting collision items (QGraphicsItem)
180 </dd> 180 </dd>
181 </dl><a NAME="E5GraphicsView.printDiagram" ID="E5GraphicsView.printDiagram"></a> 181 </dl><a NAME="E5GraphicsView.printDiagram" ID="E5GraphicsView.printDiagram"></a>
182 <h4>E5GraphicsView.printDiagram</h4> 182 <h4>E5GraphicsView.printDiagram</h4>
183 <b>printDiagram</b>(<i>printer, diagramName = ""</i>) 183 <b>printDiagram</b>(<i>printer, diagramName = ""</i>)
184 <p> 184 <p>
185 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#112;&#114;&#105;&#110;&#116; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109;. 185 Public method to print the diagram.
186 </p><dl> 186 </p><dl>
187 <dt><i>printer</i></dt> 187 <dt><i>printer</i></dt>
188 <dd> 188 <dd>
189 &#114;&#101;&#102;&#101;&#114;&#101;&#110;&#99;&#101; &#116;&#111; &#97; &#114;&#101;&#97;&#100;y &#99;&#111;&#110;&#102;&#105;&#103;&#117;&#114;&#101;&#100; &#112;&#114;&#105;&#110;&#116;&#101;&#114; &#111;&#98;&#106;&#101;&#99;&#116; (&#81;&#80;&#114;&#105;&#110;&#116;&#101;&#114;) 189 reference to a ready configured printer object (QPrinter)
190 </dd><dt><i>diagramName</i></dt> 190 </dd><dt><i>diagramName</i></dt>
191 <dd> 191 <dd>
192 &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#100;&#105;&#97;&#103;&#114;&#97;&#109; (&#115;&#116;&#114;&#105;&#110;&#103;) 192 name of the diagram (string)
193 </dd> 193 </dd>
194 </dl><a NAME="E5GraphicsView.resizeScene" ID="E5GraphicsView.resizeScene"></a> 194 </dl><a NAME="E5GraphicsView.resizeScene" ID="E5GraphicsView.resizeScene"></a>
195 <h4>E5GraphicsView.resizeScene</h4> 195 <h4>E5GraphicsView.resizeScene</h4>
196 <b>resizeScene</b>(<i>amount, isWidth = True</i>) 196 <b>resizeScene</b>(<i>amount, isWidth = True</i>)
197 <p> 197 <p>
198 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#114;&#101;&#115;&#105;z&#101; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101;. 198 Public method to resize the scene.
199 </p><dl> 199 </p><dl>
200 <dt><i>isWidth</i></dt> 200 <dt><i>isWidth</i></dt>
201 <dd> 201 <dd>
202 &#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; w&#105;&#100;&#116;&#104; &#105;&#115; &#116;&#111; &#98;&#101; &#114;&#101;&#115;&#105;z&#101;&#100; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;) 202 flag indicating width is to be resized (boolean)
203 </dd><dt><i>amount</i></dt> 203 </dd><dt><i>amount</i></dt>
204 <dd> 204 <dd>
205 &#115;&#105;z&#101; &#105;&#110;&#99;&#114;&#101;&#109;&#101;&#110;&#116; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 205 size increment (integer)
206 </dd> 206 </dd>
207 </dl><a NAME="E5GraphicsView.saveImage" ID="E5GraphicsView.saveImage"></a> 207 </dl><a NAME="E5GraphicsView.saveImage" ID="E5GraphicsView.saveImage"></a>
208 <h4>E5GraphicsView.saveImage</h4> 208 <h4>E5GraphicsView.saveImage</h4>
209 <b>saveImage</b>(<i>filename, format = "PNG"</i>) 209 <b>saveImage</b>(<i>filename, format = "PNG"</i>)
210 <p> 210 <p>
211 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#97;v&#101; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#116;&#111; &#97; &#102;&#105;&#108;&#101;. 211 Public method to save the scene to a file.
212 </p><dl> 212 </p><dl>
213 <dt><i>filename</i></dt> 213 <dt><i>filename</i></dt>
214 <dd> 214 <dd>
215 &#110;&#97;&#109;&#101; &#111;&#102; &#116;&#104;&#101; &#102;&#105;&#108;&#101; &#116;&#111; w&#114;&#105;&#116;&#101; &#116;&#104;&#101; &#105;&#109;&#97;&#103;&#101; &#116;&#111; (&#115;&#116;&#114;&#105;&#110;&#103;) 215 name of the file to write the image to (string)
216 </dd><dt><i>format</i></dt> 216 </dd><dt><i>format</i></dt>
217 <dd> 217 <dd>
218 &#102;&#111;&#114;&#109;&#97;&#116; &#102;&#111;&#114; &#116;&#104;&#101; &#105;&#109;&#97;&#103;&#101; &#102;&#105;&#108;&#101; (&#115;&#116;&#114;&#105;&#110;&#103;) 218 format for the image file (string)
219 </dd> 219 </dd>
220 </dl><dl> 220 </dl><dl>
221 <dt>Returns:</dt> 221 <dt>Returns:</dt>
222 <dd> 222 <dd>
223 &#102;&#108;&#97;&#103; &#105;&#110;&#100;&#105;&#99;&#97;&#116;&#105;&#110;&#103; &#115;&#117;&#99;&#99;&#101;&#115;&#115; (&#98;&#111;&#111;&#108;&#101;&#97;&#110;) 223 flag indicating success (boolean)
224 </dd> 224 </dd>
225 </dl><a NAME="E5GraphicsView.setSceneSize" ID="E5GraphicsView.setSceneSize"></a> 225 </dl><a NAME="E5GraphicsView.setSceneSize" ID="E5GraphicsView.setSceneSize"></a>
226 <h4>E5GraphicsView.setSceneSize</h4> 226 <h4>E5GraphicsView.setSceneSize</h4>
227 <b>setSceneSize</b>(<i>width, height</i>) 227 <b>setSceneSize</b>(<i>width, height</i>)
228 <p> 228 <p>
229 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; &#115;&#105;z&#101;. 229 Public method to set the scene size.
230 </p><dl> 230 </p><dl>
231 <dt><i>width</i></dt> 231 <dt><i>width</i></dt>
232 <dd> 232 <dd>
233 w&#105;&#100;&#116;&#104; &#102;&#111;&#114; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 233 width for the scene (integer)
234 </dd><dt><i>height</i></dt> 234 </dd><dt><i>height</i></dt>
235 <dd> 235 <dd>
236 &#104;&#101;&#105;&#103;&#104;&#116; &#102;&#111;&#114; &#116;&#104;&#101; &#115;&#99;&#101;&#110;&#101; (&#105;&#110;&#116;&#101;&#103;&#101;&#114;) 236 height for the scene (integer)
237 </dd> 237 </dd>
238 </dl><a NAME="E5GraphicsView.setZoom" ID="E5GraphicsView.setZoom"></a> 238 </dl><a NAME="E5GraphicsView.setZoom" ID="E5GraphicsView.setZoom"></a>
239 <h4>E5GraphicsView.setZoom</h4> 239 <h4>E5GraphicsView.setZoom</h4>
240 <b>setZoom</b>(<i>zoomFactor</i>) 240 <b>setZoom</b>(<i>zoomFactor</i>)
241 <p> 241 <p>
242 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#115;&#101;&#116; &#116;&#104;&#101; z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114;. 242 Public method to set the zoom factor.
243 </p><dl> 243 </p><dl>
244 <dt><i>zoomFactor</i></dt> 244 <dt><i>zoomFactor</i></dt>
245 <dd> 245 <dd>
246 &#110;&#101;w z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114; (&#102;&#108;&#111;&#97;&#116;) 246 new zoom factor (float)
247 </dd> 247 </dd>
248 </dl><a NAME="E5GraphicsView.zoom" ID="E5GraphicsView.zoom"></a> 248 </dl><a NAME="E5GraphicsView.zoom" ID="E5GraphicsView.zoom"></a>
249 <h4>E5GraphicsView.zoom</h4> 249 <h4>E5GraphicsView.zoom</h4>
250 <b>zoom</b>(<i></i>) 250 <b>zoom</b>(<i></i>)
251 <p> 251 <p>
252 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#103;&#101;&#116; &#116;&#104;&#101; &#99;&#117;&#114;&#114;&#101;&#110;&#116; z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114;. 252 Public method to get the current zoom factor.
253 </p><dl> 253 </p><dl>
254 <dt>Returns:</dt> 254 <dt>Returns:</dt>
255 <dd> 255 <dd>
256 &#99;&#117;&#114;&#114;&#101;&#110;&#116; z&#111;&#111;&#109; &#102;&#97;&#99;&#116;&#111;&#114; (&#102;&#108;&#111;&#97;&#116;) 256 current zoom factor (float)
257 </dd> 257 </dd>
258 </dl><a NAME="E5GraphicsView.zoomIn" ID="E5GraphicsView.zoomIn"></a> 258 </dl><a NAME="E5GraphicsView.zoomIn" ID="E5GraphicsView.zoomIn"></a>
259 <h4>E5GraphicsView.zoomIn</h4> 259 <h4>E5GraphicsView.zoomIn</h4>
260 <b>zoomIn</b>(<i></i>) 260 <b>zoomIn</b>(<i></i>)
261 <p> 261 <p>
262 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; z&#111;&#111;&#109; &#105;&#110;. 262 Public method to zoom in.
263 </p><a NAME="E5GraphicsView.zoomOut" ID="E5GraphicsView.zoomOut"></a> 263 </p><a NAME="E5GraphicsView.zoomOut" ID="E5GraphicsView.zoomOut"></a>
264 <h4>E5GraphicsView.zoomOut</h4> 264 <h4>E5GraphicsView.zoomOut</h4>
265 <b>zoomOut</b>(<i></i>) 265 <b>zoomOut</b>(<i></i>)
266 <p> 266 <p>
267 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; z&#111;&#111;&#109; &#111;&#117;&#116;. 267 Public method to zoom out.
268 </p><a NAME="E5GraphicsView.zoomReset" ID="E5GraphicsView.zoomReset"></a> 268 </p><a NAME="E5GraphicsView.zoomReset" ID="E5GraphicsView.zoomReset"></a>
269 <h4>E5GraphicsView.zoomReset</h4> 269 <h4>E5GraphicsView.zoomReset</h4>
270 <b>zoomReset</b>(<i></i>) 270 <b>zoomReset</b>(<i></i>)
271 <p> 271 <p>
272 &#80;&#117;&#98;&#108;&#105;&#99; &#109;&#101;&#116;&#104;&#111;&#100; &#116;&#111; &#104;&#97;&#110;&#100;&#108;&#101; &#116;&#104;&#101; &#114;&#101;&#115;&#101;&#116; z&#111;&#111;&#109; &#99;&#111;&#110;&#116;&#101;x&#116; &#109;&#101;&#110;&#117; &#101;&#110;&#116;&#114;y. 272 Public method to handle the reset zoom context menu entry.
273 </p> 273 </p>
274 <div align="right"><a href="#top">Up</a></div> 274 <div align="right"><a href="#top">Up</a></div>
275 <hr /> 275 <hr />
276 </body></html> 276 </body></html>

eric ide

mercurial