-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathui_DM3Viewer.py
282 lines (275 loc) · 17.3 KB
/
ui_DM3Viewer.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DM3Viewer.ui'
#
# Created by: PyQt5 UI code generator 5.15.7
#
# 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_DM3Viewer(object):
def setupUi(self, DM3Viewer):
DM3Viewer.setObjectName("DM3Viewer")
DM3Viewer.resize(827, 746)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(DM3Viewer.sizePolicy().hasHeightForWidth())
DM3Viewer.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Icons/viewer.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
DM3Viewer.setWindowIcon(icon)
self.centralwidget = QtWidgets.QWidget(DM3Viewer)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth())
self.centralwidget.setSizePolicy(sizePolicy)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.plotQF = QtWidgets.QFrame(self.centralwidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.plotQF.sizePolicy().hasHeightForWidth())
self.plotQF.setSizePolicy(sizePolicy)
self.plotQF.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.plotQF.setFrameShadow(QtWidgets.QFrame.Raised)
self.plotQF.setObjectName("plotQF")
self.gridLayout_2.addWidget(self.plotQF, 0, 0, 1, 2)
DM3Viewer.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(DM3Viewer)
self.menubar.setGeometry(QtCore.QRect(0, 0, 827, 36))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
self.menu_Export = QtWidgets.QMenu(self.menuFile)
self.menu_Export.setObjectName("menu_Export")
self.menuNavigation = QtWidgets.QMenu(self.menubar)
self.menuNavigation.setObjectName("menuNavigation")
self.menuTools = QtWidgets.QMenu(self.menubar)
self.menuTools.setObjectName("menuTools")
self.menuHelp = QtWidgets.QMenu(self.menubar)
self.menuHelp.setObjectName("menuHelp")
DM3Viewer.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(DM3Viewer)
self.statusbar.setObjectName("statusbar")
DM3Viewer.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(DM3Viewer)
self.toolBar.setOrientation(QtCore.Qt.Horizontal)
self.toolBar.setObjectName("toolBar")
DM3Viewer.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.action_About = QtWidgets.QAction(DM3Viewer)
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Icons/help.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_About.setIcon(icon1)
self.action_About.setObjectName("action_About")
self.action_Options = QtWidgets.QAction(DM3Viewer)
icon2 = QtGui.QIcon()
icon2.addPixmap(QtGui.QPixmap(":/Icons/options.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Options.setIcon(icon2)
self.action_Options.setObjectName("action_Options")
self.action_Open_DM3 = QtWidgets.QAction(DM3Viewer)
icon3 = QtGui.QIcon()
icon3.addPixmap(QtGui.QPixmap(":/Icons/open.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Open_DM3.setIcon(icon3)
self.action_Open_DM3.setObjectName("action_Open_DM3")
self.action_Quit_Viewer = QtWidgets.QAction(DM3Viewer)
icon4 = QtGui.QIcon()
icon4.addPixmap(QtGui.QPixmap(":/Icons/quit.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Quit_Viewer.setIcon(icon4)
self.action_Quit_Viewer.setObjectName("action_Quit_Viewer")
self.action_First_Image = QtWidgets.QAction(DM3Viewer)
icon5 = QtGui.QIcon()
icon5.addPixmap(QtGui.QPixmap(":/Icons/first.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_First_Image.setIcon(icon5)
self.action_First_Image.setObjectName("action_First_Image")
self.action_Previous_Image = QtWidgets.QAction(DM3Viewer)
icon6 = QtGui.QIcon()
icon6.addPixmap(QtGui.QPixmap(":/Icons/previous.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Previous_Image.setIcon(icon6)
self.action_Previous_Image.setObjectName("action_Previous_Image")
self.action_Next_Image = QtWidgets.QAction(DM3Viewer)
icon7 = QtGui.QIcon()
icon7.addPixmap(QtGui.QPixmap(":/Icons/next.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Next_Image.setIcon(icon7)
self.action_Next_Image.setObjectName("action_Next_Image")
self.action_Last_Image = QtWidgets.QAction(DM3Viewer)
icon8 = QtGui.QIcon()
icon8.addPixmap(QtGui.QPixmap(":/Icons/last.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Last_Image.setIcon(icon8)
self.action_Last_Image.setObjectName("action_Last_Image")
self.action_Timer = QtWidgets.QAction(DM3Viewer)
icon9 = QtGui.QIcon()
icon9.addPixmap(QtGui.QPixmap(":/Icons/timer.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Timer.setIcon(icon9)
self.action_Timer.setObjectName("action_Timer")
self.action_Export_Data = QtWidgets.QAction(DM3Viewer)
icon10 = QtGui.QIcon()
icon10.addPixmap(QtGui.QPixmap(":/Icons/save_dat.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Export_Data.setIcon(icon10)
self.action_Export_Data.setObjectName("action_Export_Data")
self.action_Export_PNG = QtWidgets.QAction(DM3Viewer)
icon11 = QtGui.QIcon()
icon11.addPixmap(QtGui.QPixmap(":/Icons/save_png.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Export_PNG.setIcon(icon11)
self.action_Export_PNG.setObjectName("action_Export_PNG")
self.action_Export_JPG = QtWidgets.QAction(DM3Viewer)
icon12 = QtGui.QIcon()
icon12.addPixmap(QtGui.QPixmap(":/Icons/save_jpg.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Export_JPG.setIcon(icon12)
self.action_Export_JPG.setObjectName("action_Export_JPG")
self.action_Export_TIF = QtWidgets.QAction(DM3Viewer)
icon13 = QtGui.QIcon()
icon13.addPixmap(QtGui.QPixmap(":/Icons/save_tif.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Export_TIF.setIcon(icon13)
self.action_Export_TIF.setObjectName("action_Export_TIF")
self.action_Export_PDF = QtWidgets.QAction(DM3Viewer)
icon14 = QtGui.QIcon()
icon14.addPixmap(QtGui.QPixmap(":/Icons/save_pdf.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Export_PDF.setIcon(icon14)
self.action_Export_PDF.setObjectName("action_Export_PDF")
self.action_Info = QtWidgets.QAction(DM3Viewer)
icon15 = QtGui.QIcon()
icon15.addPixmap(QtGui.QPixmap(":/Icons/info.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Info.setIcon(icon15)
self.action_Info.setObjectName("action_Info")
self.action_Close_DM3 = QtWidgets.QAction(DM3Viewer)
icon16 = QtGui.QIcon()
icon16.addPixmap(QtGui.QPixmap(":/Icons/close.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Close_DM3.setIcon(icon16)
self.action_Close_DM3.setObjectName("action_Close_DM3")
self.action_Reload_DM3 = QtWidgets.QAction(DM3Viewer)
icon17 = QtGui.QIcon()
icon17.addPixmap(QtGui.QPixmap(":/Icons/reload.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_Reload_DM3.setIcon(icon17)
self.action_Reload_DM3.setObjectName("action_Reload_DM3")
self.action_FFT = QtWidgets.QAction(DM3Viewer)
self.action_FFT.setCheckable(True)
icon18 = QtGui.QIcon()
icon18.addPixmap(QtGui.QPixmap(":/Icons/fft.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.action_FFT.setIcon(icon18)
self.action_FFT.setObjectName("action_FFT")
self.menu_Export.addAction(self.action_Export_Data)
self.menu_Export.addAction(self.action_Export_PNG)
self.menu_Export.addAction(self.action_Export_JPG)
self.menu_Export.addAction(self.action_Export_TIF)
self.menu_Export.addAction(self.action_Export_PDF)
self.menuFile.addAction(self.action_Open_DM3)
self.menuFile.addAction(self.action_Reload_DM3)
self.menuFile.addAction(self.action_Close_DM3)
self.menuFile.addSeparator()
self.menuFile.addAction(self.menu_Export.menuAction())
self.menuFile.addSeparator()
self.menuFile.addAction(self.action_Quit_Viewer)
self.menuNavigation.addAction(self.action_First_Image)
self.menuNavigation.addAction(self.action_Previous_Image)
self.menuNavigation.addAction(self.action_Next_Image)
self.menuNavigation.addAction(self.action_Last_Image)
self.menuTools.addAction(self.action_Info)
self.menuTools.addAction(self.action_FFT)
self.menuTools.addSeparator()
self.menuTools.addAction(self.action_Options)
self.menuTools.addAction(self.action_Timer)
self.menuHelp.addAction(self.action_About)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuNavigation.menuAction())
self.menubar.addAction(self.menuTools.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.toolBar.addAction(self.action_Open_DM3)
self.toolBar.addAction(self.action_Reload_DM3)
self.toolBar.addAction(self.action_Close_DM3)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_Export_Data)
self.toolBar.addAction(self.action_Export_PNG)
self.toolBar.addAction(self.action_Export_JPG)
self.toolBar.addAction(self.action_Export_TIF)
self.toolBar.addAction(self.action_Export_PDF)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_First_Image)
self.toolBar.addAction(self.action_Previous_Image)
self.toolBar.addAction(self.action_Next_Image)
self.toolBar.addAction(self.action_Last_Image)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_Info)
self.toolBar.addAction(self.action_FFT)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_Options)
self.toolBar.addAction(self.action_Timer)
self.toolBar.addSeparator()
self.toolBar.addAction(self.action_About)
self.retranslateUi(DM3Viewer)
QtCore.QMetaObject.connectSlotsByName(DM3Viewer)
def retranslateUi(self, DM3Viewer):
_translate = QtCore.QCoreApplication.translate
DM3Viewer.setWindowTitle(_translate("DM3Viewer", "DM3 Viewer"))
self.menuFile.setTitle(_translate("DM3Viewer", "&File"))
self.menu_Export.setTitle(_translate("DM3Viewer", "&Export"))
self.menuNavigation.setTitle(_translate("DM3Viewer", "&Navigation"))
self.menuTools.setTitle(_translate("DM3Viewer", "&Tools"))
self.menuHelp.setTitle(_translate("DM3Viewer", "&Help"))
self.action_About.setText(_translate("DM3Viewer", "About..."))
self.action_About.setToolTip(_translate("DM3Viewer", "About DM3 Viewer"))
self.action_About.setStatusTip(_translate("DM3Viewer", "See information about DM3 Viewer"))
self.action_About.setShortcut(_translate("DM3Viewer", "F1"))
self.action_Options.setText(_translate("DM3Viewer", "&Options..."))
self.action_Options.setToolTip(_translate("DM3Viewer", "Edit program options"))
self.action_Options.setStatusTip(_translate("DM3Viewer", "Edit configuration options for DM3 Viewer"))
self.action_Open_DM3.setText(_translate("DM3Viewer", "&Open DM3 file"))
self.action_Open_DM3.setToolTip(_translate("DM3Viewer", "Open DM3 file"))
self.action_Open_DM3.setStatusTip(_translate("DM3Viewer", "Select a DM3 file to open"))
self.action_Open_DM3.setShortcut(_translate("DM3Viewer", "Ctrl+O"))
self.action_Quit_Viewer.setText(_translate("DM3Viewer", "&Quit Viewer"))
self.action_Quit_Viewer.setToolTip(_translate("DM3Viewer", "Quit DM3 Viewer"))
self.action_Quit_Viewer.setStatusTip(_translate("DM3Viewer", "Quit the application"))
self.action_First_Image.setText(_translate("DM3Viewer", "&First image"))
self.action_First_Image.setToolTip(_translate("DM3Viewer", "Move to first image"))
self.action_First_Image.setStatusTip(_translate("DM3Viewer", "Load the first DM3 image in the current directory"))
self.action_First_Image.setShortcut(_translate("DM3Viewer", "Home"))
self.action_Previous_Image.setText(_translate("DM3Viewer", "&Previous image"))
self.action_Previous_Image.setToolTip(_translate("DM3Viewer", "Move to previous image"))
self.action_Previous_Image.setStatusTip(_translate("DM3Viewer", "Load the previous DM3 image in the current directory"))
self.action_Previous_Image.setShortcut(_translate("DM3Viewer", "PgUp"))
self.action_Next_Image.setText(_translate("DM3Viewer", "&Next image"))
self.action_Next_Image.setToolTip(_translate("DM3Viewer", "Move to next image"))
self.action_Next_Image.setStatusTip(_translate("DM3Viewer", "Load the next DM3 image in the current directory"))
self.action_Next_Image.setShortcut(_translate("DM3Viewer", "PgDown"))
self.action_Last_Image.setText(_translate("DM3Viewer", "&Last image"))
self.action_Last_Image.setToolTip(_translate("DM3Viewer", "Move to last image"))
self.action_Last_Image.setStatusTip(_translate("DM3Viewer", "Load the last DM3 image in the current directory"))
self.action_Last_Image.setShortcut(_translate("DM3Viewer", "End"))
self.action_Timer.setText(_translate("DM3Viewer", "&Timer"))
self.action_Timer.setToolTip(_translate("DM3Viewer", "Timer"))
self.action_Timer.setStatusTip(_translate("DM3Viewer", "Iterate automatically over all the DM3 images in the current directory"))
self.action_Timer.setShortcut(_translate("DM3Viewer", "Ctrl+T"))
self.action_Export_Data.setText(_translate("DM3Viewer", "Export &data..."))
self.action_Export_Data.setToolTip(_translate("DM3Viewer", "Export data as text"))
self.action_Export_Data.setStatusTip(_translate("DM3Viewer", "Export the data in the current DM3 image as text"))
self.action_Export_Data.setShortcut(_translate("DM3Viewer", "Ctrl+D"))
self.action_Export_PNG.setText(_translate("DM3Viewer", "Export as &PNG..."))
self.action_Export_PNG.setToolTip(_translate("DM3Viewer", "Export image as PNG"))
self.action_Export_PNG.setStatusTip(_translate("DM3Viewer", "Export the data in the current DM3 image as PNG"))
self.action_Export_PNG.setShortcut(_translate("DM3Viewer", "Ctrl+P"))
self.action_Export_JPG.setText(_translate("DM3Viewer", "Export as &JPG..."))
self.action_Export_JPG.setToolTip(_translate("DM3Viewer", "Export image as JPG"))
self.action_Export_JPG.setStatusTip(_translate("DM3Viewer", "Export the data in the current DM3 image as JPG"))
self.action_Export_JPG.setShortcut(_translate("DM3Viewer", "Ctrl+J"))
self.action_Export_TIF.setText(_translate("DM3Viewer", "Export as &TIF..."))
self.action_Export_TIF.setToolTip(_translate("DM3Viewer", "Export image as TIF"))
self.action_Export_TIF.setStatusTip(_translate("DM3Viewer", "Export the data in the current DM3 image as TIF"))
self.action_Export_TIF.setShortcut(_translate("DM3Viewer", "Ctrl+T"))
self.action_Export_PDF.setText(_translate("DM3Viewer", "Export as PD&F"))
self.action_Export_PDF.setToolTip(_translate("DM3Viewer", "Export image as PDF"))
self.action_Export_PDF.setStatusTip(_translate("DM3Viewer", "Export the data in the current DM3 image as PDF"))
self.action_Export_PDF.setShortcut(_translate("DM3Viewer", "Ctrl+F"))
self.action_Info.setText(_translate("DM3Viewer", "&Info..."))
self.action_Info.setToolTip(_translate("DM3Viewer", "Image info"))
self.action_Info.setStatusTip(_translate("DM3Viewer", "Show the info in the metadata of the current DM3 image"))
self.action_Close_DM3.setText(_translate("DM3Viewer", "&Close DM3 file"))
self.action_Close_DM3.setStatusTip(_translate("DM3Viewer", "Close the current DM3 file"))
self.action_Reload_DM3.setText(_translate("DM3Viewer", "&Reload DM3 file"))
self.action_Reload_DM3.setStatusTip(_translate("DM3Viewer", "Reload the current DM3 file"))
self.action_FFT.setText(_translate("DM3Viewer", "&FFT"))
self.action_FFT.setToolTip(_translate("DM3Viewer", "Fast Fourier Transform"))
self.action_FFT.setStatusTip(_translate("DM3Viewer", "Calculate the Fast Fourier Transform of the current DM3 file"))
import DM3Viewer_rc