exp_wg.setFixedSize(200, 30)
exp_wg_prev = exp_wg.currentText()

# Exit button
exit_wg = QtGui.QPushButton("Exit")
exit_wg.setFixedSize(200, 30)
exit_wg.setCheckable(True)
exit_wg.clicked.connect(lambda: gui.exit_wg_state(exit_wg, viewer_app))

# File chooser
file_button = QtGui.QPushButton("Open Image/Video")
file_button.setFixedSize(200, 30)
file_button.setCheckable(True)
file_chooser = FileDialog()
file_chooser.setFileMode(QtGui.QFileDialog.ExistingFile)
file_chooser.selectNameFilter("Image files (*.jpg *.jpeg *.png *.tiff)")
file_name = ""
file_name_prev = ""


def select_file():
    """select file."""
    global file_name
    file_name = file_chooser.getOpenFileName()


file_button.clicked.connect(select_file)

# Utitlity Layout
UTIL_layout.addRow(dis_label, dis_wg)
UTIL_layout.addRow(exp_label, exp_wg)
Exemplo n.º 2
0
exp_wg.setFixedSize(200, 30)
exp_wg_prev = exp_wg.currentText()

# Exit button
exit_wg = QtGui.QPushButton("Exit")
exit_wg.setFixedSize(200, 30)
exit_wg.setCheckable(True)
exit_wg.clicked.connect(lambda: gui.exit_wg_state(exit_wg, viewer_app))

# File chooser
file_button = QtGui.QPushButton("Open Image/Video")
file_button.setFixedSize(200, 30)
file_button.setCheckable(True)
file_chooser = FileDialog()
file_chooser.setFileMode(QtGui.QFileDialog.ExistingFile)
file_chooser.selectNameFilter("Image files (*.jpg *.jpeg *.png *.tiff)")
file_name = ""
file_name_prev = ""


def select_file():
    """select file."""
    global file_name
    file_name = file_chooser.getOpenFileName()
file_button.clicked.connect(select_file)

# Utitlity Layout
UTIL_layout.addRow(dis_label, dis_wg)
UTIL_layout.addRow(exp_label, exp_wg)
UTIL_layout.addRow(file_button, exit_wg)