def setup_widgets(self): """Five control widgets created along bottom""" # clear button clear_button = Button(self, text="Clear") clear_button.grid(row=3, column=1, padx=5, pady=5, sticky=W) clear_button.bind("<ButtonRelease-1>", self.clear_text) # Silent/Verbose select verbose_check = Checkbutton(self, text="Silent", \ variable=self.verbose_flag, onvalue="-s", offvalue="") verbose_check.grid(row=3, column=2, padx=5, pady=5) # Analysis model menu choices2 = ['Select Model', 'model1', 'model2'] om2 = OptionMenu(self, self.model, *choices2) # pylint: disable=W0142 om2.grid(row=3, column=3, padx=10, pady=20) # EMR Server Region menu choices = ['Select Region', 'Oregon', 'California', 'Virginia'] om1 = OptionMenu(self, self.region, *choices) # pylint: disable=W0142 om1.grid(row=3, column=4, padx=10, pady=20) # Run EMR button emrbutton = Button(self, text="Run EMR") emrbutton.grid(row=3, column=5, padx=5, pady=5) emrbutton.bind("<ButtonRelease-1>", self.run_emr)
def initUI(self): self.parent.title("Finger Putty") self.style = Style() self.style.theme_use("default") self.pack(fill=BOTH, expand=1) # Logo text # logoText = Text(self) # OS drop-down button variable = StringVar(self) variable.set("Linux") osDropdownButton = OptionMenu(self, variable, "Choose your OS", "Linux", "Windows", "Playstation", "Revert Defaults") osDropdownButton.pack() osDropdownButton.place(x=50, y=50) # Set (OS) fingerprint button def fcallback(): if variable.get() == "Revert Defaults": setctl.defaults() elif variable.get() != "Choose your OS": setctl.control(variable.get()) changePrintButton = Button(self, text="Set fingerprint", command=fcallback) changePrintButton.place(x=50, y=80) # Launch browser button def bcallback(): useragent.getVersion() useragent.launchBrowser() launchButton = Button(self, text="Launch browser (new user-agent)", command=bcallback) launchButton.place(x=50, y=110)