eric7/IconEditor/IconEditorGrid.py

branch
eric7
changeset 8356
68ec9c3d4de5
parent 8353
799196d0b05d
child 8358
144a6b854f70
equal deleted inserted replaced
8355:8a7677a63c8d 8356:68ec9c3d4de5
15 QImage, QColor, QPixmap, qRgba, QPainter, QCursor, QBrush, qGray, qAlpha, 15 QImage, QColor, QPixmap, qRgba, QPainter, QCursor, QBrush, qGray, qAlpha,
16 QUndoCommand, QUndoStack 16 QUndoCommand, QUndoStack
17 ) 17 )
18 from PyQt6.QtWidgets import QWidget, QSizePolicy, QApplication, QDialog 18 from PyQt6.QtWidgets import QWidget, QSizePolicy, QApplication, QDialog
19 19
20 from E5Gui import E5MessageBox 20 from E5Gui import EricMessageBox
21 21
22 22
23 class IconEditCommand(QUndoCommand): 23 class IconEditCommand(QUndoCommand):
24 """ 24 """
25 Class implementing an undo command for the icon editor. 25 Class implementing an undo command for the icon editor.
938 if ok: 938 if ok:
939 if ( 939 if (
940 img.width() > self.__image.width() or 940 img.width() > self.__image.width() or
941 img.height() > self.__image.height() 941 img.height() > self.__image.height()
942 ): 942 ):
943 res = E5MessageBox.yesNo( 943 res = EricMessageBox.yesNo(
944 self, 944 self,
945 self.tr("Paste"), 945 self.tr("Paste"),
946 self.tr( 946 self.tr(
947 """<p>The clipboard image is larger than the""" 947 """<p>The clipboard image is larger than the"""
948 """ current image.<br/>Paste as new image?</p>""")) 948 """ current image.<br/>Paste as new image?</p>"""))
969 969
970 self.__updateImageRect( 970 self.__updateImageRect(
971 self.__pasteRect.topLeft(), 971 self.__pasteRect.topLeft(),
972 self.__pasteRect.bottomRight() + QPoint(1, 1)) 972 self.__pasteRect.bottomRight() + QPoint(1, 1))
973 else: 973 else:
974 E5MessageBox.warning( 974 EricMessageBox.warning(
975 self, 975 self,
976 self.tr("Pasting Image"), 976 self.tr("Pasting Image"),
977 self.tr("""Invalid image data in clipboard.""")) 977 self.tr("""Invalid image data in clipboard."""))
978 978
979 def editPasteAsNew(self): 979 def editPasteAsNew(self):

eric ide

mercurial