26 QStandardPaths, |
26 QStandardPaths, |
27 ) |
27 ) |
28 from PyQt6.QtGui import QImageWriter, QPixmap, QDrag, QKeySequence, QShortcut |
28 from PyQt6.QtGui import QImageWriter, QPixmap, QDrag, QKeySequence, QShortcut |
29 from PyQt6.QtWidgets import QWidget, QApplication |
29 from PyQt6.QtWidgets import QWidget, QApplication |
30 |
30 |
31 from EricWidgets import EricFileDialog, EricMessageBox |
31 from eric7.EricWidgets import EricFileDialog, EricMessageBox |
32 |
32 |
33 from .Ui_SnapWidget import Ui_SnapWidget |
33 from .Ui_SnapWidget import Ui_SnapWidget |
34 |
34 |
35 import UI.PixmapCache |
35 from eric7.EricGui import EricPixmapCache |
36 import Preferences |
36 from eric7 import Globals, Preferences |
37 import Globals |
|
38 |
37 |
39 from .SnapshotModes import SnapshotModes |
38 from .SnapshotModes import SnapshotModes |
40 |
39 |
41 |
40 |
42 class SnapWidget(QWidget, Ui_SnapWidget): |
41 class SnapWidget(QWidget, Ui_SnapWidget): |
51 @param parent reference to the parent widget (QWidget) |
50 @param parent reference to the parent widget (QWidget) |
52 """ |
51 """ |
53 super().__init__(parent) |
52 super().__init__(parent) |
54 self.setupUi(self) |
53 self.setupUi(self) |
55 |
54 |
56 self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSaveAs")) |
55 self.saveButton.setIcon(EricPixmapCache.getIcon("fileSaveAs")) |
57 self.takeButton.setIcon(UI.PixmapCache.getIcon("cameraPhoto")) |
56 self.takeButton.setIcon(EricPixmapCache.getIcon("cameraPhoto")) |
58 self.copyButton.setIcon(UI.PixmapCache.getIcon("editCopy")) |
57 self.copyButton.setIcon(EricPixmapCache.getIcon("editCopy")) |
59 self.copyPreviewButton.setIcon(UI.PixmapCache.getIcon("editCopy")) |
58 self.copyPreviewButton.setIcon(EricPixmapCache.getIcon("editCopy")) |
60 self.setWindowIcon(UI.PixmapCache.getIcon("ericSnap")) |
59 self.setWindowIcon(EricPixmapCache.getIcon("ericSnap")) |
61 |
60 |
62 if Globals.isWaylandSession(): |
61 if Globals.isWaylandSession(): |
63 from .SnapshotWaylandGrabber import SnapshotWaylandGrabber |
62 from .SnapshotWaylandGrabber import SnapshotWaylandGrabber |
64 |
63 |
65 self.__grabber = SnapshotWaylandGrabber(self) |
64 self.__grabber = SnapshotWaylandGrabber(self) |