ui Module¶
This module contains the UI classes for the Audiometer application. The UI is built using the tkinter library.
App ¶
Bases: Window
Source code in app\ui.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
|
__init__ ¶
Creats Main application window. Contains all pages and controls the flow of the program.
Parameters: |
|
---|
Source code in app\ui.py
change_save_path ¶
Asks the user to select a folder to save the files. Changes settings.csv file accordingly.
Source code in app\ui.py
change_theme ¶
Changes to the specified theme.
Parameters: |
|
---|
Source code in app\ui.py
create_menubar ¶
Creates a menubar with options for changing the theme and exiting the program.
Source code in app\ui.py
exit_fullscreen ¶
get_images_in_path ¶
Gets a list of image files in the specified directory.
Args: directory (str): The path to the directory to check. image_extensions (list): List of image file extensions to check for.
Returns: list: List of image file paths if any image files are found, False otherwise.
Source code in app\ui.py
get_theme ¶
Gets currently selected theme from settings.csv file.
Returns: |
|
---|
Source code in app\ui.py
on_closing ¶
run_process ¶
Runs a process and calls a callback function when the process is done.
Parameters: |
|
---|
Source code in app\ui.py
set_icon ¶
show_frame ¶
Shows frame for the given page name.
Parameters: |
|
---|
wait_for_process ¶
Starts a process in a new thread and calls a callback function when the process is done.
Parameters: |
|
---|
Source code in app\ui.py
CalibrationPage ¶
Bases: Frame
Source code in app\ui.py
643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
|
__init__ ¶
Creates Page for calibrating the audiometer.
Parameters: |
|
---|
Source code in app\ui.py
create_widgets ¶
Creates the widgets for the page.
Source code in app\ui.py
next_frequency ¶
Sets previously entered level, then get next frequency and play it.
Source code in app\ui.py
repeat_frequency ¶
start_calibration ¶
Starts the calibration process and change state of buttons.
Source code in app\ui.py
DuringFamiliarizationView ¶
Bases: Frame
Source code in app\ui.py
__init__ ¶
Creates View during familiarization process.
Parameters: |
|
---|
Source code in app\ui.py
create_widgets ¶
Creates the widgets for the view.
Source code in app\ui.py
DuringProcedureView ¶
Bases: Frame
Source code in app\ui.py
__init__ ¶
Creates View during main program.
Parameters: |
|
---|
Source code in app\ui.py
create_widgets ¶
Creates the widgets for the view.
Source code in app\ui.py
FamiliarizationPage ¶
Bases: Frame
Source code in app\ui.py
__init__ ¶
Creates Page for starting the familiarization process.
Parameters: |
|
---|
create_widgets ¶
Creates the widgets for the page.
Source code in app\ui.py
run_familiarization ¶
Runs the familiarization process and goes to the next page.
Source code in app\ui.py
MainMenu ¶
Bases: Frame
Source code in app\ui.py
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
|
__init__ ¶
Creates the Main menu page.
Source code in app\ui.py
create_widgets ¶
Creates the widgets for the page.
Source code in app\ui.py
get_headphone_options ¶
Reads all possible headphone models from retspl.csv file.
Returns: |
|
---|
Source code in app\ui.py
go_to_next_page ¶
Go to next page depending on selected options.
Source code in app\ui.py
on_option_selected ¶
Changes state of buttons and show start button depending on procedure selected.
Source code in app\ui.py
show_start_button ¶
Shows start button if not already visible.
Source code in app\ui.py
ProgramPage ¶
Bases: Frame
Source code in app\ui.py
__init__ ¶
Creates Page for starting the main program.
Parameters: |
|
---|
create_widgets ¶
Creates the widgets for the page.
Source code in app\ui.py
run_program ¶
Runs the main program.
Source code in app\ui.py
show_results ¶
Shows the results page with (all) images.
Source code in app\ui.py
ResultPage ¶
Bases: Frame
Source code in app\ui.py
__init__ ¶
Creates Page for showing the results of the program.
Parameters: |
|
---|
back_to_MainMenu ¶
create_widgets ¶
Creates the widgets for the view.
Source code in app\ui.py
display_images ¶
Display all images in the given folder.
Parameters: |
|
---|
Source code in app\ui.py
setup_ui ¶
Creates tkinter app and return it.
Parameters: |
|
---|