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