示例#1
0
 def build_widgets(self):
     d = {'typename': 'FileEditField', 'name': 'MRIScansTxt', 'value': ''}
     self.fmriscanstxt = field.create(d)
     d = {
         'typename':
         'ComboboxField',
         'name':
         'ModalFile',
         'value':
         'T1.nii.gz',
         'values': [
             'T1.nii.gz', 'T2.nii.gz', 'BOLD.nii.gz', 'pBOLD.nii.gz',
             'DWI.nii.gz', 'DWI.bval', 'DWI.bvec'
         ]
     }
     self.fmodal = field.create(d)
     d = {'typename': 'FolderField', 'name': 'OutMainFolder', 'value': '.'}
     self.foutfolder = field.create(d)
     wmriscanstxt = self.fmriscanstxt.build_widget(self.mainframe)
     wmodal = self.fmodal.build_widget(self.mainframe)
     woutfolder = self.foutfolder.build_widget(self.mainframe)
     wrun = tktools.button(self.mainframe, 'Run', self.cb_run)
     wrun_NAS = tktools.button(self.mainframe, 'Copy', self.cb_copy)
     wmriscanstxt.pack()
     wmodal.pack()
     woutfolder.pack()
     wrun.pack()
     wrun_NAS.pack()
示例#2
0
 def build_mriscan_add_open_save(self, mriscan_id, wmodals):
     for modal, wmodal in wmodals:
         curf_open = functools.partial(self.mriscan_open, mriscan_id, modal)
         btn = tktools.button(wmodal, 'Open', curf_open)
         btn.pack(side='right')
         curf_save = functools.partial(self.mriscan_save, mriscan_id, modal)
         btn = tktools.button(wmodal, 'Save', curf_save)
         btn.pack(side='right')
示例#3
0
 def build_widget(self, master):
     """Build the widget.
     
     It is composed by entry, select button and edit button.
     The edit program used is configured by fileop module.
     """
     row = tktools.frame(master)
     label = tktools.label(row, self.name)
     entry, tkvar = tktools.entry(row)
     btn = tktools.button(row, 'Select', self.cb_button_Select)
     btnedit = tktools.button(row, 'Edit', self.cb_button_Edit)        
     ConnectFieldVar(self, tkvar)
     label.pack(side='left')
     btnedit.pack(side='right')
     btn.pack(side='right')
     entry.pack(side='right')
     self._tkvar = tkvar
     return row
示例#4
0
	def build_widgets(self):
		d = {'typename': 'FileEditField', 'name': 'JobConfig', 'value': ''}
		self.fjob = field.create(d)
		d = {'typename': 'FolderField', 'name': 'Folder', 'value': '.'}
		self.ffolder = field.create(d)
		wjob = self.fjob.build_widget(self.mainframe)
		wfolder = self.ffolder.build_widget(self.mainframe)
		wrun = tktools.button(self.mainframe, 'Run', self.cb_runjob)
		wjob.pack()
		wfolder.pack()
		wrun.pack()
示例#5
0
 def build_widgets(self):
     d = {'typename': 'FileEditField', 'name': 'ParaConfig', 'value': ''}
     self.fpara = field.create(d)
     d = {'typename': 'StringField', 'name': 'ProjectPathVar', 'value': '.'}
     self.fpath = field.create(d)
     wpara = self.fpara.build_widget(self.mainframe)
     wpath = self.fpath.build_widget(self.mainframe)
     wrun = tktools.button(self.mainframe, 'Run', self.cb_run)
     wpara.pack()
     wpath.pack()
     wrun.pack()
示例#6
0
 def build_widgets(self):
     d = {'typename': 'FileEditField', 'name': 'MRIScansTxt', 'value': ''}
     self.fmriscanstxt = field.create(d)
     d = {'typename': 'BoolField', 'name': 'ConvertDicom', 'value': True}
     self.fconvertdicom = field.create(d)
     wmriscanstxt = self.fmriscanstxt.build_widget(self.mainframe)
     wconvertdicom = self.fconvertdicom.build_widget(self.mainframe)
     wrun = tktools.button(self.mainframe, 'Run', self.cb_run)
     wmriscanstxt.pack()
     wconvertdicom.pack()
     wrun.pack()
示例#7
0
    def build_widget(self, master):
        """Build the widget.

        It is composed by entry and select button.
        """
        row = tktools.frame(master)
        label = tktools.label(row, self.name)
        entry, tkvar = tktools.entry(row)
        btn = tktools.button(row, 'Select', self.cb_button_Select)
        ConnectFieldVar(self, tkvar)
        label.pack(side='left')
        btn.pack(side='right')
        entry.pack(side='right')
        self._tkvar = tkvar
        return row
示例#8
0
文件: toolman.py 项目: yaojh18/mmdps
 def build_widget(self, master=None):
     """Build the tool button."""
     return tktools.button(master, self.name, self.opentool)