def group_box_MEMA(self): """create a group box with layout ... for controlling uvars: dsetsA, labelA, betasA """ prog = '3dMEMA' gbox = QLIB.get_checked_group_box('%s options'%prog, ltype='G', cb_check=self.gbox_clicked) mainlayout = gbox.mainlayout label= QLIB.make_label('other options:', 'any other %s options to include in command'%prog) te = QtGui.QTextEdit() mainlayout.addWidget(label, 0, 0) mainlayout.addWidget(te, 0, 1, 3, 3) self.gvars.TE_MEMA = te return gbox
def make_l2_group_box(self): """create a group box with a VBox layout: GridLayout: Label(anat) QPushB(choose) LineEdit() Label(EPI) QPushB(choose) LineEdit() Label(EPI base) LineEdit() for uvars: program """ if show_func_seq: print '=== D ===' gbox = QLIB.get_styled_group_box('') layout = QtGui.QGridLayout(gbox) lposn = 0 # current line index # -------------------------------------------------- # program line label = QLIB.make_label('program', 'group ttest program run by script') blist = ['prog: %s' % prog for prog in LTT.g_prog_list] pb = QLIB.create_menu_button(gbox, "choose", blist, call_back=self.CB_gbox_PushB) line = QLIB.make_line(LTT.g_prog_list[0], self.CB_line_text) layout.addWidget(label, lposn, 0) layout.addWidget(pb, lposn, 1) layout.addWidget(line, lposn, 2) # store what we need in gvars self.gvars.PB_program = pb # for sender in CB_gbox_PushB self.gvars.Line_program = line lposn += 1 # -------------------------------------------------- # output script name label = QLIB.make_label('script name', 'name of resulting program script') line = QLIB.make_line(cb=self.CB_line_text) self.gvars.Line_script = line layout.addWidget(label, lposn, 0) layout.addWidget(line, lposn, 2) lposn += 1 # -------------------------------------------------- # dset prefix label=QLIB.make_label('dset prefix','prefix for dataset output by script') line = QLIB.make_line(cb=self.CB_line_text) self.gvars.Line_prefix = line layout.addWidget(label, lposn, 0) layout.addWidget(line, lposn, 2) lposn += 1 # -------------------------------------------------- # mask label= QLIB.make_label('mask dset','compute results only over mask') pb = QLIB.make_button("browse", tip="browse file system for mask dataset", cb=self.CB_gbox_PushB, hstr=0) line = QLIB.make_line(cb=self.CB_line_text) self.gvars.Line_mask = line self.gvars.Pushb_mask = pb layout.addWidget(label, lposn, 0) layout.addWidget(pb, lposn, 1) layout.addWidget(line, lposn, 2) lposn += 1 # -------------------------------------------------- # paired test toggle button cbox = QtGui.QCheckBox("paired test") self.connect(cbox, QtCore.SIGNAL('clicked()'), self.CB_checkbox) cbox.setStatusTip("perform a paired test") self.gvars.CB_paired = cbox layout.addWidget(cbox, lposn, 0, 1, 2) lposn += 1 # -------------------------------------------------- layout.setSpacing(QLIB.g_layout_spacing) gbox.setLayout(layout) self.gvars.gbox_program = gbox