def __init__(self, master: tk.Frame, masterParent: tk.Tk, fileDetails: tuple): super().__init__(master) self.root = master self.fileDetails = fileDetails self.masterParent = masterParent self.queue = Queue() self.aclUpdateResponse = None self.emailEntry = tk.StringVar() self.title(fileDetails[1]) self.resizable(False, False) self.grab_set() self.overrideredirect(True) centerWindow(self, 300, 300) tk.Label(self, text="Download").pack(expand=True) tk.Button(self, text="Download", command=self.downloadFile).pack(expand=True) tk.Label(self, text="Sharing").pack(expand=True) entry = tk.Entry(self, textvariable=self.emailEntry) entry.pack(expand=True) tk.Button(self, text="Cancel", command=self.remove).pack(expand=True, side=tk.LEFT) tk.Button(self, text="Revoke", command=self.revokeAccess).pack(expand=True, side=tk.LEFT) tk.Button(self, text="Grant", command=self.grantAccess).pack(expand=True, side=tk.LEFT)
def __init__(self, master, title="Error title", message="Error message"): super().__init__(master) self.root = master # self.root.config(menu=tk.Menu(self.root)) self.title(title) self.resizable(False, False) self.grab_set() self.overrideredirect(True) centerWindow(self, 300, 100) tk.Label(self, text=message).pack(expand=True) tk.Button(self, text="OK", command=self.remove).pack(expand=True)
def __init__(self, master, message="Error message"): super().__init__(master) self.root = master # self.root.config(menu=tk.Menu(self.root)) self.minsize(300, 100) self.title(None) self.resizable(False, False) self.grab_set() self.overrideredirect(True) centerWindow(self, 300, 100) tk.Label(self, text=message).pack(expand=True)
def __init__(self): super().__init__(None) self.config(menu=tk.Menu(self)) self.title("Error!") self.resizable(False, False) self.grab_set() self.overrideredirect(True) centerWindow(self, 300, 100) self.labelText = "Error occurred while initialising the App.\nExiting automatically in 5 seconds..." tk.Label(self, text=self.labelText).pack(expand=True) self.after(ms=5000, func=self.quit)
def __init__(self, master: tk.Tk): super().__init__(master) self.root = master self.title("About") self.resizable(False, False) self.overrideredirect(True) self.grab_set() centerWindow(self, 300, 300) self.logo = getLogo() tk.Label(self, image=self.logo).pack(expand=True, fill=tk.BOTH) tk.Label(self, text="Please visit\n\ngithub.com/krnblni/UnitedShieldSpace\n\nfor more info about the project.").pack(expand=True) tk.Button(self, text="Done", command=self.remove).pack(expand=True)
def __init__(self, master: tk.Tk): self.root = master self.root.title("Sign Up") centerWindow(self.root, 800, 600) self.root.config(menu=tk.Menu(self.root)) self.username = tk.StringVar() self.email = tk.StringVar() self.password = tk.StringVar() self.confirmPassword = tk.StringVar() self.queue = Queue() self.signUpResponse = None self.waitDialog = None self.initSignUpScreen()
def __init__(self, master: tk.Frame, masterParent: tk.Tk, fileDetails: tuple): super().__init__(master) self.root = master self.fileDetails = fileDetails self.masterParent = masterParent self.dqueue = Queue() self.downloadResponse = None self.title(fileDetails[1]) self.resizable(False, False) self.grab_set() self.overrideredirect(True) centerWindow(self, 300, 100) tk.Label(self, text="Download").pack(expand=True) tk.Button(self, text="Download", command=self.downloadFile).pack(expand=True) tk.Button(self, text="Cancel", command=self.remove).pack(expand=True)
def __init__(self, master: tk.Tk): # TODO check if user is already logged-in here if CheckDbLoginStatus().check(): user = GetUser().get() if user != None: HomeScreen(master=master, user=user) else: self.root = master self.root.title("Login") centerWindow(self.root, 800, 600) self.root.config(menu=tk.Menu(self.root)) self.email = tk.StringVar() self.password = tk.StringVar() self.queue = Queue() self.loginResponse = None self.dbWriteResponse = None self.emailStr = "" self.passwordStr = "" self.waitDialog = None self.initLoginScreen()