11 from PyQt6.QtGui import QPalette, QPainter, QFont, QColor, QAction |
11 from PyQt6.QtGui import QPalette, QPainter, QFont, QColor, QAction |
12 from PyQt6.QtWidgets import QSizePolicy, QScrollArea, QMenu, QToolBar |
12 from PyQt6.QtWidgets import QSizePolicy, QScrollArea, QMenu, QToolBar |
13 from PyQt6.QtPrintSupport import QPrinter, QPrintDialog |
13 from PyQt6.QtPrintSupport import QPrinter, QPrintDialog |
14 from PyQt6.QtSvgWidgets import QSvgWidget |
14 from PyQt6.QtSvgWidgets import QSvgWidget |
15 |
15 |
16 from E5Gui.E5MainWindow import E5MainWindow |
16 from E5Gui.EricMainWindow import EricMainWindow |
17 from E5Gui.E5ZoomWidget import E5ZoomWidget |
17 from E5Gui.EricZoomWidget import EricZoomWidget |
18 |
18 |
19 import UI.Config |
19 import UI.Config |
20 |
20 |
21 import Preferences |
21 import Preferences |
22 |
22 |
23 |
23 |
24 class SvgDiagram(E5MainWindow): |
24 class SvgDiagram(EricMainWindow): |
25 """ |
25 """ |
26 Class implementing a dialog showing a SVG graphic. |
26 Class implementing a dialog showing a SVG graphic. |
27 """ |
27 """ |
28 ZoomLevels = [ |
28 ZoomLevels = [ |
29 1, 3, 5, 7, 9, |
29 1, 3, 5, 7, 9, |
63 self.svgView.setBackgroundRole(QPalette.ColorRole.Dark) |
63 self.svgView.setBackgroundRole(QPalette.ColorRole.Dark) |
64 self.svgView.setWidget(self.svgWidget) |
64 self.svgView.setWidget(self.svgWidget) |
65 |
65 |
66 self.setCentralWidget(self.svgView) |
66 self.setCentralWidget(self.svgView) |
67 |
67 |
68 self.__zoomWidget = E5ZoomWidget( |
68 self.__zoomWidget = EricZoomWidget( |
69 UI.PixmapCache.getPixmap("zoomOut"), |
69 UI.PixmapCache.getPixmap("zoomOut"), |
70 UI.PixmapCache.getPixmap("zoomIn"), |
70 UI.PixmapCache.getPixmap("zoomIn"), |
71 UI.PixmapCache.getPixmap("zoomReset"), self) |
71 UI.PixmapCache.getPixmap("zoomReset"), self) |
72 self.statusBar().addPermanentWidget(self.__zoomWidget) |
72 self.statusBar().addPermanentWidget(self.__zoomWidget) |
73 self.__zoomWidget.setMapping( |
73 self.__zoomWidget.setMapping( |