Graphics/UMLGraphicsView.py

changeset 882
34b86be88bf0
parent 880
52ed20236a1c
child 945
8cd4d08fa9f6
child 1113
95d837803666
equal deleted inserted replaced
881:ff23d907f87b 882:34b86be88bf0
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import *
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import *
12 12
13 from E5Graphics.E5GraphicsView import E5GraphicsView 13 from E5Graphics.E5GraphicsView import E5GraphicsView
14 14
15 from E5Gui import E5MessageBox 15 from E5Gui import E5MessageBox, E5FileDialog
16 16
17 from .UMLItem import UMLItem 17 from .UMLItem import UMLItem
18 from .UMLSceneSizeDialog import UMLSceneSizeDialog 18 from .UMLSceneSizeDialog import UMLSceneSizeDialog
19 from .ZoomDialog import ZoomDialog 19 from .ZoomDialog import ZoomDialog
20 20
320 320
321 def __saveImage(self): 321 def __saveImage(self):
322 """ 322 """
323 Private method to handle the save context menu entry. 323 Private method to handle the save context menu entry.
324 """ 324 """
325 fname, selectedFilter = QFileDialog.getSaveFileNameAndFilter( 325 fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter(
326 self, 326 self,
327 self.trUtf8("Save Diagram"), 327 self.trUtf8("Save Diagram"),
328 "", 328 "",
329 self.trUtf8("Portable Network Graphics (*.png);;" 329 self.trUtf8("Portable Network Graphics (*.png);;"
330 "Scalable Vector Graphics (*.svg)"), 330 "Scalable Vector Graphics (*.svg)"),
331 "", 331 "",
332 QFileDialog.Options(QFileDialog.DontConfirmOverwrite | 332 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
333 QFileDialog.DontUseNativeDialog))
334 if fname: 333 if fname:
335 ext = QFileInfo(fname).suffix() 334 ext = QFileInfo(fname).suffix()
336 if not ext: 335 if not ext:
337 ex = selectedFilter.split("(*")[1].split(")")[0] 336 ex = selectedFilter.split("(*")[1].split(")")[0]
338 if ex: 337 if ex:

eric ide

mercurial