コード例 #1
0
    def setupJawDropDown(self):

        jawFilterTypeFilenameList = jsonHelper.getAllJawFiltersFileNames()
        jawFilterNameList = [objectHelper.getJawFilterNameFromJawFilterFilename(filename) for filename in jawFilterTypeFilenameList]
        dropFtTitle = StringVar()
        dropFtTitle.set('Select Jaw Filter Type')
        ftDropMenu = OptionMenu(self,dropFtTitle,*jawFilterNameList,command=self.jawFilterTypeSelectedFromOptionsMenu)
        ftDropMenu.grid(row=1, column=0, columnspan=4, sticky='ew')
コード例 #2
0
    def setupSelectedGroup(self, groupName):

        groupCheckboxFrame = GroupEditCheckboxFrame(
            self,
            jsonHelper.getAllHeadFiltersFileNames(),
            jsonHelper.getAllJawFiltersFileNames(),
            jsonHelper.getAllModulesFileNames(),
        )
        groupCheckboxFrame.setEnabledHeadFilenames(jsonHelper.getHeadFiltersListForGroup(groupName))
        groupCheckboxFrame.setEnabledJawFilenames(jsonHelper.getJawFiltersListForGroup(groupName))
        groupCheckboxFrame.setEnabledModuleFilenames(jsonHelper.getModuleListForGroup(groupName))

        groupCheckboxFrame.grid(row=2, column=0, columnspan=4, sticky=E + W + N + S)
        Button(
            self,
            text="Apply & Close",
            relief=RAISED,
            command=lambda: self.applyGroupButtonPressed(groupName, groupCheckboxFrame),
        ).grid(row=3, column=1, columnspan=1, sticky=S + E)
コード例 #3
0
    def jawFilterTypeSelectedFromOptionsMenu(self, value):

        if value != self.currentJawFilterTypeValue:
            self.currentFilterFunctionValue = value

            for i in range(2, self.grid_size()[1]):
                for element in self.grid_slaves(i, None):
                    element.grid_forget()

            jawFileNameList = jsonHelper.getAllJawFiltersFileNames()

            selectedJawFileName = None

            for jawFileName in jawFileNameList:
                if objectHelper.getJawFilterNameFromJawFilterFilename(jawFileName) == value:
                    selectedJawFileName = jawFileName
                    break

            if selectedJawFileName:
                self.setupSelectedFilterType(selectedJawFileName, "Jaw")
コード例 #4
0
 def setupAddGroup(self):
     
     groupNameEntry = Entry(self,justify=CENTER);
     groupNameEntry.insert(0, GROUP_DEFAULT_STRING)
     groupNameEntry.bind('<FocusIn>', lambda event:self.on_entry_click(event,groupNameEntry))
     groupNameEntry.bind('<FocusOut>', lambda event:self.on_focusout(event,groupNameEntry))
     groupNameEntry.config(fg = 'grey')
     groupNameEntry.grid(row=1,column=1,columnspan=2,sticky=E+W)
     groupCheckboxFrame = GroupEditCheckboxFrame(self,jsonHelper.getAllHeadFiltersFileNames(),jsonHelper.getAllJawFiltersFileNames(),jsonHelper.getAllModulesFileNames())
     groupCheckboxFrame.grid(row=2, column=0, columnspan=4, sticky=E+W+N+S)
     Button(self,text='Apply & Close',relief=RAISED,command=lambda:self.applyGroupButtonPressed(groupNameEntry.get(),groupCheckboxFrame)).grid(row=3,column=1,columnspan=1,sticky=S+E)