-
Notifications
You must be signed in to change notification settings - Fork 0
/
batch_dialog.py
52 lines (35 loc) · 1.18 KB
/
batch_dialog.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
#!/usr/bin/env python2.5
#
# Written (W) 2012-2014 Christian Widmer
# Copyright (C) 2012-2014 Max-Planck-Society, MSKCC, TU-Berlin
"""
@author: Christian Widmer
@summary: dialog for batch processing
"""
from PySide import QtCore, QtGui, QtUiTools
class BatchDialog(QtGui.QDialog):
"""
simple dialog to fire up batch processing
"""
def __init__(self,parent=None):
"""
setup gui from ui file (edit with qt designer)
"""
QtGui.QDialog.__init__(self)
loader = QtUiTools.QUiLoader()
uifile = QtCore.QFile('batch_dialog.ui')
uifile.open(QtCore.QFile.ReadOnly)
self.ui = loader.load(uifile, self)
self.ui.show()
def getValues(self):
"""
wraps up return values as dictionary
"""
# naming has to agree with method "fit_stack" in qt_gui.py
method_idx_to_name = ["squared", "eps", "circle"]
values = {}
values["radius_offset"] = self.radius_offset.value()
values["percentile"] = self.percentile.value()
values["std_cut"] = self.std_cut.value()
values["method"] = method_idx_to_name[self.method.currentIndex()]
return values