authentification_page module

Module with the authorization page class, as well as with the registration and login page classes.

class authentification_page.AuthStartPage(master)

Bases: tkinter.Frame

The class of the authorization page where you can choose to register or log in.

Parameters

master (class: tictactoe.App) – An instance of the main class of the game application

__init__(master) None

Make constructor method.

_create_image() None

Draw the image for the authorization page.

_create_widgets() None

Render widgets of the authorization page.

change_language(lang: str) None

Set action for the language change button.

Parameters

lang (class: str) – A string with the localization language of the application, “en” or “ru”

class authentification_page.LoginPage(master)

Bases: tkinter.Frame

The class of the login page.

Parameters

master (class: tictactoe.App) – An instance of the main class of the game application

__init__(master) None

Make constructor method.

_create_widgets() None

Render widgets of the login page.

change_language(lang: str) None

Set action for the language change button.

Parameters

lang (class: str) – A string with the localization language of the application, “en” or “ru”

login(username: str, password: str, remember_me: tkinter.BooleanVar, label: tkinter.Label, frame: tkinter.Frame) None

Set action for the “Log in” button.

Parameters
  • username (class: str) – The name of the user you want to log in under

  • password (class: str) – The password for username

  • remember_me (class: tkinter.BooleanVar) – The meaning of the “Remember me” flag

  • label (class: tkinter.Label) – A label with an information message

  • frame (class: tkinter.Frame) – The frame in which the “Log in” button will be drawn

toggle_password_visibility(passwd_entry: tkinter.Entry, button: tkinter.Button) None

Set action for the button “Show/Hide password”.

Parameters
  • passwd_entry (class: tkinter.Entry) – An object with a password entry field

  • button (class: tkinter.Button) – Object with a button “Show/Hide password”

class authentification_page.RegisterPage(master)

Bases: tkinter.Frame

The class of the registration page.

Parameters

master (class: tictactoe.App) – An instance of the main class of the game application

__init__(master) None

Make constructor method.

_create_widgets() None

Render widgets of the registration page.

change_language(lang: str) None

Set action for the language change button.

Parameters

lang (class: str) – A string with the localization language of the application, “en” or “ru”

register(username: str, password: str, label: tkinter.Label, frame: tkinter.Frame) None

Set action for the “Register” button.

Parameters
  • username (class: str) – The name of the user you want to register under

  • password (class: str) – The password you want to set for username

  • label (class: tkinter.Label) – A label with an information message

  • frame (class: tkinter.Frame) – The frame in which the “Register” button will be drawn

toggle_password_visibility(passwd_entry: tkinter.Entry, button: tkinter.Button) None

Set action for the button “Show/Hide password”.

Parameters
  • passwd_entry (class: tkinter.Entry) – An object with a password entry field

  • button (class: tkinter.Button) – Object with a button “Show/Hide password”