eric6/IconEditor/IconEditorGrid.py

changeset 7759
51aa6c6b66f7
parent 7717
f32d7965a17e
child 7833
4bc2413f6123
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
986 """ 986 """
987 Public slot to resize the image. 987 Public slot to resize the image.
988 """ 988 """
989 from .IconSizeDialog import IconSizeDialog 989 from .IconSizeDialog import IconSizeDialog
990 dlg = IconSizeDialog(self.__image.width(), self.__image.height()) 990 dlg = IconSizeDialog(self.__image.width(), self.__image.height())
991 res = dlg.exec_() 991 res = dlg.exec()
992 if res == QDialog.Accepted: 992 if res == QDialog.Accepted:
993 newWidth, newHeight = dlg.getData() 993 newWidth, newHeight = dlg.getData()
994 if ( 994 if (
995 newWidth != self.__image.width() or 995 newWidth != self.__image.width() or
996 newHeight != self.__image.height() 996 newHeight != self.__image.height()
1009 """ 1009 """
1010 Public slot to generate a new, empty image. 1010 Public slot to generate a new, empty image.
1011 """ 1011 """
1012 from .IconSizeDialog import IconSizeDialog 1012 from .IconSizeDialog import IconSizeDialog
1013 dlg = IconSizeDialog(self.__image.width(), self.__image.height()) 1013 dlg = IconSizeDialog(self.__image.width(), self.__image.height())
1014 res = dlg.exec_() 1014 res = dlg.exec()
1015 if res == QDialog.Accepted: 1015 if res == QDialog.Accepted:
1016 width, height = dlg.getData() 1016 width, height = dlg.getData()
1017 img = QImage(width, height, QImage.Format_ARGB32) 1017 img = QImage(width, height, QImage.Format_ARGB32)
1018 img.fill(qRgba(0, 0, 0, 0)) 1018 img.fill(qRgba(0, 0, 0, 0))
1019 self.setIconImage(img) 1019 self.setIconImage(img)

eric ide

mercurial