Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
label_2.setText("Dimention 2:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(185, 40, 91, 25))
self.lineEdit_2 = qt.QLineEdit(self)
self.lineEdit_2.setGeometry(qt.QRect(185, 70, 91, 25))
label_5 = qt.QLabel(self)
label_5.setGeometry(qt.QRect(105, 106, 51, 16))
label_5.setText("Offset:")
self.lineEdit_3 = qt.QLineEdit(self)
self.lineEdit_3.setGeometry(qt.QRect(184, 100, 91, 25))
self.lineEdit_3.setText('0')
label_3 = qt.QLabel(groupBox)
label_3.setGeometry(qt.QRect(70, 130, 91, 16))
label_3.setText("ByteCode:")
self.comboBox = qt.QComboBox(groupBox)
self.comboBox.setGeometry(qt.QRect(173, 123, 91, 25))
bytecodes = ["int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64",
"float32", "float64"]
for bytecode in bytecodes:
self.comboBox.addItem(bytecode)
self.comboBox.setCurrentIndex(2)
label_4 = qt.QLabel(self)
label_4.setGeometry(qt.QRect(98, 170, 61, 16))
label_4.setText("Endian:")
self.comboBox_2 = qt.QComboBox(self)
self.comboBox_2.setGeometry(qt.QRect(182, 166, 91, 25))
self.comboBox_2.addItem("Short")
self.comboBox_2.addItem("Long")
buttonBox.rejected.connect(self.cancel)
buttonBox.accepted.connect(self.binary_block_info)
self.dim1 = None
self.dim2 = None
self.offset = None
self.bytecode = None
self.endian = None
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(50, 230, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
groupBox = qt.QGroupBox(self)
groupBox.setGeometry(qt.QRect(10, 10, 370, 191))
groupBox.setTitle("Binary data block required informations:")
label = qt.QLabel(self)
label.setGeometry(qt.QRect(67, 48, 91, 16))
label.setText("Dimention 1:")
label_2 = qt.QLabel(self)
label_2.setGeometry(qt.QRect(66, 76, 91, 16))
label_2.setText("Dimention 2:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(185, 40, 91, 25))
self.lineEdit_2 = qt.QLineEdit(self)
self.lineEdit_2.setGeometry(qt.QRect(185, 70, 91, 25))
label_5 = qt.QLabel(self)
label_5.setGeometry(qt.QRect(105, 106, 51, 16))
label_5.setText("Offset:")
self.lineEdit_3 = qt.QLineEdit(self)
self.lineEdit_3.setGeometry(qt.QRect(184, 100, 91, 25))
self.lineEdit_3.setText('0')
label_3 = qt.QLabel(groupBox)
label_3.setGeometry(qt.QRect(70, 130, 91, 16))
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
self.lineEdit3 = qt.QLineEdit(self)
self.lineEdit3.setGeometry(qt.QRect(219, 130, 113, 25))
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
def __init__(self, parent=None):
qt.QDialog.__init__(self, parent)
self.resize(407, 250)
self.setWindowTitle('Downsampling')
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(45, 200, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 63, 181, 16))
label.setText("Number of files to sum up:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
groupBox = qt.QGroupBox(self)
groupBox.setGeometry(qt.QRect(10, 10, 370, 191))
groupBox.setTitle("Binary data block required informations:")
label = qt.QLabel(self)
label.setGeometry(qt.QRect(67, 48, 91, 16))
label.setText("Dimention 1:")
label_2 = qt.QLabel(self)
label_2.setGeometry(qt.QRect(66, 76, 91, 16))
label_2.setText("Dimention 2:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(185, 40, 91, 25))
self.lineEdit_2 = qt.QLineEdit(self)
self.lineEdit_2.setGeometry(qt.QRect(185, 70, 91, 25))
label_5 = qt.QLabel(self)
label_5.setGeometry(qt.QRect(105, 106, 51, 16))
label_5.setText("Offset:")
self.lineEdit_3 = qt.QLineEdit(self)
self.lineEdit_3.setGeometry(qt.QRect(184, 100, 91, 25))
self.lineEdit_3.setText('0')
label_3 = qt.QLabel(groupBox)
label_3.setGeometry(qt.QRect(70, 130, 91, 16))
label_3.setText("ByteCode:")
self.comboBox = qt.QComboBox(groupBox)
self.comboBox.setGeometry(qt.QRect(173, 123, 91, 25))
bytecodes = ["int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64",
"float32", "float64"]
for bytecode in bytecodes:
self.comboBox.addItem(bytecode)
def __init__(self, counter_format, parent=None):
qt.QDialog.__init__(self, parent)
self.resize(350, 100)
self.setWindowTitle('Options')
self.counter_format = counter_format
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(0, 60, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 23, 181, 16))
label.setText("File Counter format:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(175, 18, 113, 25))
self.lineEdit.setText(counter_format)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
def __init__(self, counter_format, parent=None):
qt.QDialog.__init__(self, parent)
self.resize(350, 100)
self.setWindowTitle('Options')
self.counter_format = counter_format
buttonBox = qt.QDialogButtonBox(self)
buttonBox.setGeometry(qt.QRect(0, 60, 341, 32))
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 23, 181, 16))
label.setText("File Counter format:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(175, 18, 113, 25))
self.lineEdit.setText(counter_format)
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 63, 181, 16))
label.setText("Number of files to sum up:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
self.lineEdit3 = qt.QLineEdit(self)
self.lineEdit3.setGeometry(qt.QRect(219, 130, 113, 25))
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
buttonBox.setOrientation(qt.Qt.Horizontal)
buttonBox.setStandardButtons(qt.QDialogButtonBox.Cancel | qt.QDialogButtonBox.Ok)
label = qt.QLabel(self)
label.setGeometry(qt.QRect(38, 63, 181, 16))
label.setText("Number of files to sum up:")
self.lineEdit = qt.QLineEdit(self)
self.lineEdit.setGeometry(qt.QRect(220, 58, 113, 25))
label2 = qt.QLabel(self)
label2.setGeometry(qt.QRect(90, 100, 131, 20))
label2.setText("Starting Phi angle:")
self.lineEdit2 = qt.QLineEdit(self)
self.lineEdit2.setGeometry(qt.QRect(220, 95, 113, 25))
label3 = qt.QLabel(self)
label3.setGeometry(qt.QRect(151, 133, 101, 16))
label3.setText("Phi step:")
self.lineEdit3 = qt.QLineEdit(self)
self.lineEdit3.setGeometry(qt.QRect(219, 130, 113, 25))
buttonBox.accepted.connect(self.accept)
buttonBox.rejected.connect(self.reject)
label_3 = qt.QLabel(groupBox)
label_3.setGeometry(qt.QRect(70, 130, 91, 16))
label_3.setText("ByteCode:")
self.comboBox = qt.QComboBox(groupBox)
self.comboBox.setGeometry(qt.QRect(173, 123, 91, 25))
bytecodes = ["int8", "int16", "int32", "int64",
"uint8", "uint16", "uint32", "uint64",
"float32", "float64"]
for bytecode in bytecodes:
self.comboBox.addItem(bytecode)
self.comboBox.setCurrentIndex(2)
label_4 = qt.QLabel(self)
label_4.setGeometry(qt.QRect(98, 170, 61, 16))
label_4.setText("Endian:")
self.comboBox_2 = qt.QComboBox(self)
self.comboBox_2.setGeometry(qt.QRect(182, 166, 91, 25))
self.comboBox_2.addItem("Short")
self.comboBox_2.addItem("Long")
buttonBox.rejected.connect(self.cancel)
buttonBox.accepted.connect(self.binary_block_info)