IconEditor/IconEditorPalette.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3345
071afe8be2a1
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
41 41
42 self.__preview = QLabel(self) 42 self.__preview = QLabel(self)
43 self.__preview.setFrameStyle(QFrame.Panel | QFrame.Sunken) 43 self.__preview.setFrameStyle(QFrame.Panel | QFrame.Sunken)
44 self.__preview.setFixedHeight(64) 44 self.__preview.setFixedHeight(64)
45 self.__preview.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) 45 self.__preview.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
46 self.__preview.setWhatsThis(self.trUtf8( 46 self.__preview.setWhatsThis(self.tr(
47 """<b>Preview</b>""" 47 """<b>Preview</b>"""
48 """<p>This is a 1:1 preview of the current icon.</p>""" 48 """<p>This is a 1:1 preview of the current icon.</p>"""
49 )) 49 ))
50 self.__layout.addWidget(self.__preview) 50 self.__layout.addWidget(self.__preview)
51 51
52 self.__color = QLabel(self) 52 self.__color = QLabel(self)
53 self.__color.setFrameStyle(QFrame.Panel | QFrame.Sunken) 53 self.__color.setFrameStyle(QFrame.Panel | QFrame.Sunken)
54 self.__color.setFixedHeight(24) 54 self.__color.setFixedHeight(24)
55 self.__color.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) 55 self.__color.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
56 self.__color.setWhatsThis(self.trUtf8( 56 self.__color.setWhatsThis(self.tr(
57 """<b>Current Color</b>""" 57 """<b>Current Color</b>"""
58 """<p>This is the currently selected color used for drawing.</p>""" 58 """<p>This is the currently selected color used for drawing.</p>"""
59 )) 59 ))
60 self.__layout.addWidget(self.__color) 60 self.__layout.addWidget(self.__color)
61 61
62 self.__colorTxt = QLabel(self) 62 self.__colorTxt = QLabel(self)
63 self.__colorTxt.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) 63 self.__colorTxt.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter)
64 self.__colorTxt.setWhatsThis(self.trUtf8( 64 self.__colorTxt.setWhatsThis(self.tr(
65 """<b>Current Color Value</b>""" 65 """<b>Current Color Value</b>"""
66 """<p>This is the currently selected color value used for""" 66 """<p>This is the currently selected color value used for"""
67 """ drawing.</p>""" 67 """ drawing.</p>"""
68 )) 68 ))
69 self.__layout.addWidget(self.__colorTxt) 69 self.__layout.addWidget(self.__colorTxt)
70 70
71 self.__colorButton = QPushButton(self.trUtf8("Select Color"), self) 71 self.__colorButton = QPushButton(self.tr("Select Color"), self)
72 self.__colorButton.setWhatsThis(self.trUtf8( 72 self.__colorButton.setWhatsThis(self.tr(
73 """<b>Select Color</b>""" 73 """<b>Select Color</b>"""
74 """<p>Select the current drawing color via a color selection""" 74 """<p>Select the current drawing color via a color selection"""
75 """ dialog.</p>""" 75 """ dialog.</p>"""
76 )) 76 ))
77 self.__colorButton.clicked[()].connect(self.__selectColor) 77 self.__colorButton.clicked[()].connect(self.__selectColor)
78 self.__layout.addWidget(self.__colorButton) 78 self.__layout.addWidget(self.__colorButton)
79 79
80 self.__colorAlpha = QSpinBox(self) 80 self.__colorAlpha = QSpinBox(self)
81 self.__colorAlpha.setRange(0, 255) 81 self.__colorAlpha.setRange(0, 255)
82 self.__colorAlpha.setWhatsThis(self.trUtf8( 82 self.__colorAlpha.setWhatsThis(self.tr(
83 """<b>Select alpha channel value</b>""" 83 """<b>Select alpha channel value</b>"""
84 """<p>Select the value for the alpha channel of the current""" 84 """<p>Select the value for the alpha channel of the current"""
85 """ color.</p>""" 85 """ color.</p>"""
86 )) 86 ))
87 self.__layout.addWidget(self.__colorAlpha) 87 self.__layout.addWidget(self.__colorAlpha)
88 self.__colorAlpha.valueChanged[int].connect(self.__alphaChanged) 88 self.__colorAlpha.valueChanged[int].connect(self.__alphaChanged)
89 89
90 self.__compositingGroup = QGroupBox(self.trUtf8("Compositing"), self) 90 self.__compositingGroup = QGroupBox(self.tr("Compositing"), self)
91 self.__compositingGroupLayout = QVBoxLayout(self.__compositingGroup) 91 self.__compositingGroupLayout = QVBoxLayout(self.__compositingGroup)
92 self.__compositingGroup.setLayout(self.__compositingGroupLayout) 92 self.__compositingGroup.setLayout(self.__compositingGroupLayout)
93 self.__sourceButton = QRadioButton(self.trUtf8("Replace"), 93 self.__sourceButton = QRadioButton(self.tr("Replace"),
94 self.__compositingGroup) 94 self.__compositingGroup)
95 self.__sourceButton.setWhatsThis(self.trUtf8( 95 self.__sourceButton.setWhatsThis(self.tr(
96 """<b>Replace</b>""" 96 """<b>Replace</b>"""
97 """<p>Replace the existing pixel with a new color.</p>""" 97 """<p>Replace the existing pixel with a new color.</p>"""
98 )) 98 ))
99 self.__sourceButton.clicked[bool].connect(self.__compositingChanged) 99 self.__sourceButton.clicked[bool].connect(self.__compositingChanged)
100 self.__compositingGroupLayout.addWidget(self.__sourceButton) 100 self.__compositingGroupLayout.addWidget(self.__sourceButton)
101 self.__sourceOverButton = QRadioButton(self.trUtf8("Blend"), 101 self.__sourceOverButton = QRadioButton(self.tr("Blend"),
102 self.__compositingGroup) 102 self.__compositingGroup)
103 self.__sourceOverButton.setWhatsThis(self.trUtf8( 103 self.__sourceOverButton.setWhatsThis(self.tr(
104 """<b>Blend</b>""" 104 """<b>Blend</b>"""
105 """<p>Blend the new color over the existing pixel.</p>""" 105 """<p>Blend the new color over the existing pixel.</p>"""
106 )) 106 ))
107 self.__sourceOverButton.setChecked(True) 107 self.__sourceOverButton.setChecked(True)
108 self.__sourceOverButton.clicked[bool].connect( 108 self.__sourceOverButton.clicked[bool].connect(

eric ide

mercurial