-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_gui.py
424 lines (415 loc) · 24.7 KB
/
main_gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_image_manager.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1317, 764)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icon_/cam.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
MainWindow.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_imagebox = QtWidgets.QLabel(self.centralwidget)
self.label_imagebox.setText("")
self.label_imagebox.setAlignment(QtCore.Qt.AlignCenter)
self.label_imagebox.setObjectName("label_imagebox")
self.horizontalLayout.addWidget(self.label_imagebox)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1317, 26))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuSize_and_Orientation = QtWidgets.QMenu(self.menubar)
self.menuSize_and_Orientation.setObjectName("menuSize_and_Orientation")
self.menuAdd_Noise = QtWidgets.QMenu(self.menubar)
self.menuAdd_Noise.setObjectName("menuAdd_Noise")
self.menuBlur = QtWidgets.QMenu(self.menubar)
self.menuBlur.setObjectName("menuBlur")
self.menuSpecial = QtWidgets.QMenu(self.menubar)
self.menuSpecial.setObjectName("menuSpecial")
self.menuColor_2 = QtWidgets.QMenu(self.menubar)
self.menuColor_2.setObjectName("menuColor_2")
self.menuSwap_color_channels = QtWidgets.QMenu(self.menuColor_2)
self.menuSwap_color_channels.setObjectName("menuSwap_color_channels")
self.menuBlending = QtWidgets.QMenu(self.menubar)
self.menuBlending.setObjectName("menuBlending")
self.menuEdit = QtWidgets.QMenu(self.menubar)
self.menuEdit.setObjectName("menuEdit")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setIconSize(QtCore.QSize(25, 25))
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.actionNew = QtWidgets.QAction(MainWindow)
self.actionNew.setObjectName("actionNew")
self.actionOpen = QtWidgets.QAction(MainWindow)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/icon_/add.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionOpen.setIcon(icon1)
self.actionOpen.setObjectName("actionOpen")
self.actionSave = QtWidgets.QAction(MainWindow)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/icon_/save.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionSave.setIcon(icon2)
self.actionSave.setObjectName("actionSave")
self.actionExit = QtWidgets.QAction(MainWindow)
self.actionExit.setObjectName("actionExit")
self.actionResize = QtWidgets.QAction(MainWindow)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/icon_/resize.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionResize.setIcon(icon3)
self.actionResize.setObjectName("actionResize")
self.actionMirror = QtWidgets.QAction(MainWindow)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/icon_/mirror.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionMirror.setIcon(icon4)
self.actionMirror.setObjectName("actionMirror")
self.actionFlip_Upside_Down = QtWidgets.QAction(MainWindow)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/icon_/flip.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionFlip_Upside_Down.setIcon(icon5)
self.actionFlip_Upside_Down.setObjectName("actionFlip_Upside_Down")
self.actionRotate = QtWidgets.QAction(MainWindow)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/icon_/rotate.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionRotate.setIcon(icon6)
self.actionRotate.setObjectName("actionRotate")
self.actionGaussian = QtWidgets.QAction(MainWindow)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/icon_/gaussian noise.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionGaussian.setIcon(icon7)
self.actionGaussian.setObjectName("actionGaussian")
self.actionHorizontal_Bands = QtWidgets.QAction(MainWindow)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/icon_/horizontalnoise.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionHorizontal_Bands.setIcon(icon8)
self.actionHorizontal_Bands.setObjectName("actionHorizontal_Bands")
self.actionVertical_Bands = QtWidgets.QAction(MainWindow)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/icon_/verticalnoise.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionVertical_Bands.setIcon(icon9)
self.actionVertical_Bands.setObjectName("actionVertical_Bands")
self.actionSalt_and_Pepper = QtWidgets.QAction(MainWindow)
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/icon_/salt-n-pepper.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionSalt_and_Pepper.setIcon(icon10)
self.actionSalt_and_Pepper.setObjectName("actionSalt_and_Pepper")
self.actionGaussian_2 = QtWidgets.QAction(MainWindow)
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/icon_/blur-gaussian.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionGaussian_2.setIcon(icon11)
self.actionGaussian_2.setObjectName("actionGaussian_2")
self.actionMedian = QtWidgets.QAction(MainWindow)
icon12 = QtGui.QIcon()
icon12.addPixmap(QtGui.QPixmap(":/icon_/blur-median.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionMedian.setIcon(icon12)
self.actionMedian.setObjectName("actionMedian")
self.actionAverage = QtWidgets.QAction(MainWindow)
icon13 = QtGui.QIcon()
icon13.addPixmap(QtGui.QPixmap(":/icon_/blur-average.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionAverage.setIcon(icon13)
self.actionAverage.setObjectName("actionAverage")
self.actionPixelate = QtWidgets.QAction(MainWindow)
icon14 = QtGui.QIcon()
icon14.addPixmap(QtGui.QPixmap(":/icon_/pixelate.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionPixelate.setIcon(icon14)
self.actionPixelate.setObjectName("actionPixelate")
self.actionAdd_Border = QtWidgets.QAction(MainWindow)
icon15 = QtGui.QIcon()
icon15.addPixmap(QtGui.QPixmap(":/icon_/border.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionAdd_Border.setIcon(icon15)
self.actionAdd_Border.setObjectName("actionAdd_Border")
self.actionBlack_and_White = QtWidgets.QAction(MainWindow)
icon16 = QtGui.QIcon()
icon16.addPixmap(QtGui.QPixmap(":/icon_/bw.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionBlack_and_White.setIcon(icon16)
self.actionBlack_and_White.setObjectName("actionBlack_and_White")
self.actionExtract_Color = QtWidgets.QAction(MainWindow)
icon17 = QtGui.QIcon()
icon17.addPixmap(QtGui.QPixmap(":/icon_/extract_color.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionExtract_Color.setIcon(icon17)
self.actionExtract_Color.setObjectName("actionExtract_Color")
self.actionBrightness_Increase = QtWidgets.QAction(MainWindow)
icon18 = QtGui.QIcon()
icon18.addPixmap(QtGui.QPixmap(":/icon_/brightness_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionBrightness_Increase.setIcon(icon18)
self.actionBrightness_Increase.setObjectName("actionBrightness_Increase")
self.actionBrightness_Decrease = QtWidgets.QAction(MainWindow)
icon19 = QtGui.QIcon()
icon19.addPixmap(QtGui.QPixmap(":/icon_/brightness_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionBrightness_Decrease.setIcon(icon19)
self.actionBrightness_Decrease.setObjectName("actionBrightness_Decrease")
self.actionContrast_Increase = QtWidgets.QAction(MainWindow)
icon20 = QtGui.QIcon()
icon20.addPixmap(QtGui.QPixmap(":/icon_/contrast-up.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionContrast_Increase.setIcon(icon20)
self.actionContrast_Increase.setObjectName("actionContrast_Increase")
self.actionContrast_Decrease = QtWidgets.QAction(MainWindow)
icon21 = QtGui.QIcon()
icon21.addPixmap(QtGui.QPixmap(":/icon_/contrast-down.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionContrast_Decrease.setIcon(icon21)
self.actionContrast_Decrease.setObjectName("actionContrast_Decrease")
self.actionSwap_Color = QtWidgets.QAction(MainWindow)
self.actionSwap_Color.setObjectName("actionSwap_Color")
self.actionReplace_Color = QtWidgets.QAction(MainWindow)
icon22 = QtGui.QIcon()
icon22.addPixmap(QtGui.QPixmap(":/icon_/replace_color.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionReplace_Color.setIcon(icon22)
self.actionReplace_Color.setObjectName("actionReplace_Color")
self.actionRed_Green = QtWidgets.QAction(MainWindow)
icon23 = QtGui.QIcon()
icon23.addPixmap(QtGui.QPixmap(":/icon_/swap-red-green.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionRed_Green.setIcon(icon23)
self.actionRed_Green.setObjectName("actionRed_Green")
self.actionGreen_Blue = QtWidgets.QAction(MainWindow)
icon24 = QtGui.QIcon()
icon24.addPixmap(QtGui.QPixmap(":/icon_/swap-green-blue.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionGreen_Blue.setIcon(icon24)
self.actionGreen_Blue.setObjectName("actionGreen_Blue")
self.actionBlue_Red = QtWidgets.QAction(MainWindow)
icon25 = QtGui.QIcon()
icon25.addPixmap(QtGui.QPixmap(":/icon_/swap-blue-red.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionBlue_Red.setIcon(icon25)
self.actionBlue_Red.setObjectName("actionBlue_Red")
self.actionImage_Histogram = QtWidgets.QAction(MainWindow)
icon26 = QtGui.QIcon()
icon26.addPixmap(QtGui.QPixmap(":/icon_/hist.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionImage_Histogram.setIcon(icon26)
self.actionImage_Histogram.setObjectName("actionImage_Histogram")
self.actionIntensity_Map = QtWidgets.QAction(MainWindow)
icon27 = QtGui.QIcon()
icon27.addPixmap(QtGui.QPixmap(":/icon_/heatmap.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionIntensity_Map.setIcon(icon27)
self.actionIntensity_Map.setObjectName("actionIntensity_Map")
self.actionHistogram_Equalization = QtWidgets.QAction(MainWindow)
icon28 = QtGui.QIcon()
icon28.addPixmap(QtGui.QPixmap(":/icon_/histequal.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionHistogram_Equalization.setIcon(icon28)
self.actionHistogram_Equalization.setObjectName("actionHistogram_Equalization")
self.actionCartoonify = QtWidgets.QAction(MainWindow)
icon29 = QtGui.QIcon()
icon29.addPixmap(QtGui.QPixmap(":/icon_/cartoonify.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionCartoonify.setIcon(icon29)
self.actionCartoonify.setObjectName("actionCartoonify")
self.actionAlpha = QtWidgets.QAction(MainWindow)
icon30 = QtGui.QIcon()
icon30.addPixmap(QtGui.QPixmap(":/icon_/alpha_blending.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionAlpha.setIcon(icon30)
self.actionAlpha.setObjectName("actionAlpha")
self.actionPyramid = QtWidgets.QAction(MainWindow)
icon31 = QtGui.QIcon()
icon31.addPixmap(QtGui.QPixmap(":/icon_/pyramid blending.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionPyramid.setIcon(icon31)
self.actionPyramid.setObjectName("actionPyramid")
self.actionDithering = QtWidgets.QAction(MainWindow)
icon32 = QtGui.QIcon()
icon32.addPixmap(QtGui.QPixmap(":/icon_/dithered.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionDithering.setIcon(icon32)
self.actionDithering.setObjectName("actionDithering")
self.actionContrast_Stretching = QtWidgets.QAction(MainWindow)
icon33 = QtGui.QIcon()
icon33.addPixmap(QtGui.QPixmap(":/icon_/stretch.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionContrast_Stretching.setIcon(icon33)
self.actionContrast_Stretching.setObjectName("actionContrast_Stretching")
self.actionGamma_Correction = QtWidgets.QAction(MainWindow)
icon34 = QtGui.QIcon()
icon34.addPixmap(QtGui.QPixmap(":/icon_/gamma_correction.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionGamma_Correction.setIcon(icon34)
self.actionGamma_Correction.setObjectName("actionGamma_Correction")
self.actionNegative = QtWidgets.QAction(MainWindow)
icon35 = QtGui.QIcon()
icon35.addPixmap(QtGui.QPixmap(":/icon_/neg.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionNegative.setIcon(icon35)
self.actionNegative.setObjectName("actionNegative")
self.actionEdge_Detection = QtWidgets.QAction(MainWindow)
icon36 = QtGui.QIcon()
icon36.addPixmap(QtGui.QPixmap(":/icon_/canny.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionEdge_Detection.setIcon(icon36)
self.actionEdge_Detection.setObjectName("actionEdge_Detection")
self.actionApply_Mask = QtWidgets.QAction(MainWindow)
icon37 = QtGui.QIcon()
icon37.addPixmap(QtGui.QPixmap(":/icon_/mask_button.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionApply_Mask.setIcon(icon37)
self.actionApply_Mask.setObjectName("actionApply_Mask")
self.actionUndo = QtWidgets.QAction(MainWindow)
icon38 = QtGui.QIcon()
icon38.addPixmap(QtGui.QPixmap(":/icon_/undo.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionUndo.setIcon(icon38)
self.actionUndo.setObjectName("actionUndo")
self.actionRedo = QtWidgets.QAction(MainWindow)
icon39 = QtGui.QIcon()
icon39.addPixmap(QtGui.QPixmap(":/icon_/redo.png"), QtGui.QIcon.Normal, QtGui.QIcon.On)
self.actionRedo.setIcon(icon39)
self.actionRedo.setObjectName("actionRedo")
self.menuFile.addAction(self.actionOpen)
self.menuFile.addAction(self.actionSave)
self.menuFile.addAction(self.actionExit)
self.menuSize_and_Orientation.addAction(self.actionResize)
self.menuSize_and_Orientation.addAction(self.actionMirror)
self.menuSize_and_Orientation.addAction(self.actionFlip_Upside_Down)
self.menuSize_and_Orientation.addAction(self.actionRotate)
self.menuSize_and_Orientation.addAction(self.actionAdd_Border)
self.menuAdd_Noise.addAction(self.actionGaussian)
self.menuAdd_Noise.addAction(self.actionHorizontal_Bands)
self.menuAdd_Noise.addAction(self.actionVertical_Bands)
self.menuAdd_Noise.addAction(self.actionSalt_and_Pepper)
self.menuBlur.addAction(self.actionGaussian_2)
self.menuBlur.addAction(self.actionMedian)
self.menuBlur.addAction(self.actionAverage)
self.menuSpecial.addAction(self.actionPixelate)
self.menuSpecial.addAction(self.actionCartoonify)
self.menuSpecial.addAction(self.actionDithering)
self.menuSpecial.addAction(self.actionContrast_Stretching)
self.menuSpecial.addAction(self.actionEdge_Detection)
self.menuSwap_color_channels.addAction(self.actionRed_Green)
self.menuSwap_color_channels.addAction(self.actionGreen_Blue)
self.menuSwap_color_channels.addAction(self.actionBlue_Red)
self.menuColor_2.addAction(self.actionBrightness_Increase)
self.menuColor_2.addAction(self.actionBrightness_Decrease)
self.menuColor_2.addAction(self.actionContrast_Increase)
self.menuColor_2.addAction(self.actionContrast_Decrease)
self.menuColor_2.addAction(self.actionBlack_and_White)
self.menuColor_2.addAction(self.actionExtract_Color)
self.menuColor_2.addAction(self.actionReplace_Color)
self.menuColor_2.addAction(self.menuSwap_color_channels.menuAction())
self.menuColor_2.addAction(self.actionImage_Histogram)
self.menuColor_2.addAction(self.actionIntensity_Map)
self.menuColor_2.addAction(self.actionHistogram_Equalization)
self.menuColor_2.addAction(self.actionGamma_Correction)
self.menuColor_2.addAction(self.actionNegative)
self.menuColor_2.addAction(self.actionApply_Mask)
self.menuBlending.addAction(self.actionAlpha)
self.menuBlending.addAction(self.actionPyramid)
self.menuEdit.addAction(self.actionUndo)
self.menuEdit.addAction(self.actionRedo)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuEdit.menuAction())
self.menubar.addAction(self.menuSize_and_Orientation.menuAction())
self.menubar.addAction(self.menuColor_2.menuAction())
self.menubar.addAction(self.menuBlending.menuAction())
self.menubar.addAction(self.menuBlur.menuAction())
self.menubar.addAction(self.menuAdd_Noise.menuAction())
self.menubar.addAction(self.menuSpecial.menuAction())
self.toolBar.addAction(self.actionOpen)
self.toolBar.addAction(self.actionSave)
self.toolBar.addAction(self.actionUndo)
self.toolBar.addAction(self.actionRedo)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionResize)
self.toolBar.addAction(self.actionMirror)
self.toolBar.addAction(self.actionFlip_Upside_Down)
self.toolBar.addAction(self.actionRotate)
self.toolBar.addAction(self.actionAdd_Border)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionBrightness_Increase)
self.toolBar.addAction(self.actionBrightness_Decrease)
self.toolBar.addAction(self.actionContrast_Increase)
self.toolBar.addAction(self.actionContrast_Decrease)
self.toolBar.addAction(self.actionBlack_and_White)
self.toolBar.addAction(self.actionExtract_Color)
self.toolBar.addAction(self.actionReplace_Color)
self.toolBar.addAction(self.actionRed_Green)
self.toolBar.addAction(self.actionGreen_Blue)
self.toolBar.addAction(self.actionBlue_Red)
self.toolBar.addAction(self.actionImage_Histogram)
self.toolBar.addAction(self.actionIntensity_Map)
self.toolBar.addAction(self.actionHistogram_Equalization)
self.toolBar.addAction(self.actionGamma_Correction)
self.toolBar.addAction(self.actionNegative)
self.toolBar.addAction(self.actionApply_Mask)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionAlpha)
self.toolBar.addAction(self.actionPyramid)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionAverage)
self.toolBar.addAction(self.actionGaussian_2)
self.toolBar.addAction(self.actionMedian)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionGaussian)
self.toolBar.addAction(self.actionHorizontal_Bands)
self.toolBar.addAction(self.actionVertical_Bands)
self.toolBar.addAction(self.actionSalt_and_Pepper)
self.toolBar.addSeparator()
self.toolBar.addAction(self.actionPixelate)
self.toolBar.addAction(self.actionCartoonify)
self.toolBar.addAction(self.actionDithering)
self.toolBar.addAction(self.actionContrast_Stretching)
self.toolBar.addAction(self.actionEdge_Detection)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Image Editor and Manager"))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuSize_and_Orientation.setTitle(_translate("MainWindow", "Shape"))
self.menuAdd_Noise.setTitle(_translate("MainWindow", "Add Noise"))
self.menuBlur.setTitle(_translate("MainWindow", "Blur"))
self.menuSpecial.setTitle(_translate("MainWindow", "Other"))
self.menuColor_2.setTitle(_translate("MainWindow", "Color"))
self.menuSwap_color_channels.setTitle(_translate("MainWindow", "Swap color channels"))
self.menuBlending.setTitle(_translate("MainWindow", "Blending"))
self.menuEdit.setTitle(_translate("MainWindow", "Edit"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
self.actionNew.setText(_translate("MainWindow", "New"))
self.actionOpen.setText(_translate("MainWindow", "Open"))
self.actionSave.setText(_translate("MainWindow", "Save"))
self.actionExit.setText(_translate("MainWindow", "Exit"))
self.actionResize.setText(_translate("MainWindow", "Resize"))
self.actionMirror.setText(_translate("MainWindow", "Mirror"))
self.actionFlip_Upside_Down.setText(_translate("MainWindow", "Flip Upside Down"))
self.actionRotate.setText(_translate("MainWindow", "Rotate"))
self.actionGaussian.setText(_translate("MainWindow", "Gaussian"))
self.actionHorizontal_Bands.setText(_translate("MainWindow", "Horizontal Bands"))
self.actionVertical_Bands.setText(_translate("MainWindow", "Vertical Bands"))
self.actionSalt_and_Pepper.setText(_translate("MainWindow", "Salt and Pepper"))
self.actionGaussian_2.setText(_translate("MainWindow", "Gaussian"))
self.actionMedian.setText(_translate("MainWindow", "Median"))
self.actionAverage.setText(_translate("MainWindow", "Average"))
self.actionPixelate.setText(_translate("MainWindow", "Pixelate"))
self.actionAdd_Border.setText(_translate("MainWindow", "Add Border"))
self.actionBlack_and_White.setText(_translate("MainWindow", "Black and White"))
self.actionExtract_Color.setText(_translate("MainWindow", "Extract Color"))
self.actionBrightness_Increase.setText(_translate("MainWindow", "Brightness - Increase"))
self.actionBrightness_Decrease.setText(_translate("MainWindow", "Brightness - Decrease"))
self.actionContrast_Increase.setText(_translate("MainWindow", "Contrast - Increase"))
self.actionContrast_Decrease.setText(_translate("MainWindow", "Contrast Decrease"))
self.actionSwap_Color.setText(_translate("MainWindow", "Swap Color"))
self.actionReplace_Color.setText(_translate("MainWindow", "Replace Color"))
self.actionRed_Green.setText(_translate("MainWindow", "Red-Green"))
self.actionGreen_Blue.setText(_translate("MainWindow", "Green-Blue"))
self.actionBlue_Red.setText(_translate("MainWindow", "Blue-Red"))
self.actionImage_Histogram.setText(_translate("MainWindow", "Image Histogram"))
self.actionIntensity_Map.setText(_translate("MainWindow", "Intensity Map"))
self.actionHistogram_Equalization.setText(_translate("MainWindow", "Histogram Equalization"))
self.actionCartoonify.setText(_translate("MainWindow", "Cartoonify"))
self.actionAlpha.setText(_translate("MainWindow", "Alpha"))
self.actionPyramid.setText(_translate("MainWindow", "Pyramid"))
self.actionDithering.setText(_translate("MainWindow", "Dithering"))
self.actionContrast_Stretching.setText(_translate("MainWindow", "Contrast Stretching"))
self.actionGamma_Correction.setText(_translate("MainWindow", "Gamma Correction"))
self.actionNegative.setText(_translate("MainWindow", "Negative"))
self.actionEdge_Detection.setText(_translate("MainWindow", "Edge Detection"))
self.actionApply_Mask.setText(_translate("MainWindow", "Apply Mask"))
self.actionUndo.setText(_translate("MainWindow", "Undo"))
self.actionRedo.setText(_translate("MainWindow", "Redo"))
import icons_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())