|
BonPrinter v1.2.0
Thermal Printer tool
|
The view-controller for main window. More...
Public Member Functions | |
| None | __init__ (self, UncaughtHook qt_exception_hook, LogConfig log_config, bool test_mode=False, bool authenticated=False, *Any args, **Any kwargs) |
| None | block_ui (self) |
| Blocks the main UI elements. | |
| None | btn_article_preview (self) |
| Article Print Preview. | |
| None | btn_calc_clicked (self) |
| Handle calc button clicked. | |
| None | btn_change_item (self, EConfigSelection e_config_selection) |
| Handle change articles configuration. | |
| None | btn_change_user (self, EConfigSelection e_config_selection) |
| Handle change user configuration. | |
| None | btn_clear_clicked (self) |
| Handle clear button clicked. | |
| None | btn_combine_auto (self) |
| Combine Reports manual to create single report from multiple other data. | |
| None | btn_combine_manual (self) |
| Combine Reports manual to create single report from multiple other data. | |
| None | btn_item_clicked (self, int i_item_number) |
| Handle item button/login (1-30) clicked. | |
| None | btn_item_held (self) |
| Item button held. | |
| None | btn_item_pressed (self, int i_item_number) |
| Handle item button/login (1-30) pressed. | |
| None | btn_item_released (self, int i_item_number) |
| Handle item button/login (1-30) released. | |
| None | btn_lock_clicked (self, bool b_auto_logout=False) |
| Handle lock button clicked. | |
| None | btn_multi_clicked (self) |
| Handle multi button clicked. | |
| None | btn_open_folder (self) |
| Handle Open output folder. | |
| None | btn_print_clicked (self, bool b_smartcard=False) |
| Handle print button clicked. | |
| None | btn_print_file (self) |
| Select and print markdown file from directory. | |
| None | btn_report_print (self, bool b_clear_report) |
| Handle report or status button clicked. | |
| None | change_output_path (self) |
| Handle change output path. | |
| None | clear_articles (self) |
| Clear articles. | |
| None | clear_status (self, bool b_override=False) |
| Clear status bar text and set active user as default. | |
| None | closeEvent (self, CLOSE_EVENT|None event) |
| Default close Event Method to handle application close. | |
| bool | confirm_dialog (self, str|list[str] title_value, str s_icon_path=ICON_APP, Optional[list[str]] l_optional_text=None) |
| Show confirm dialog to accept or cancel. | |
| None | edit_items_in_notepad (self, str s_file_name) |
| Open item file in notepad. | |
| None | edit_user_in_notepad (self, str s_file_name) |
| Open user file in notepad. | |
| None | open_report_dialog (self, bool b_clear_report, bool b_auto_print) |
| Open report dialog. | |
| float | print_selected_articles (self, list[Item] l_item_log, datetime actual_datetime) |
| Print selected articles. | |
| None | reset_config (self) |
| Handle reset configuration. | |
| None | resizeEvent (self, RESIZE_EVENT|None _event) |
| Default resize Event Method to handle change of window size. | |
| None | set_status (self, str|list[str] text_value, bool b_warning=False, Optional[int] i_timeout=None, bool b_highlight=False, bool b_thread=False) |
| Logs a status message to status bar (with timer) and logging handler. | |
| None | set_ui (self, bool b_state) |
| Blocks/Unblock the main UI elements. | |
| None | show_help_dialog (self) |
| Show help dialog. | |
| None | show_item_btns (self) |
| Update item buttons. | |
| None | show_login_btns (self) |
| Update login buttons. | |
| None | show_number_btns (self) |
| Update number buttons. | |
| None | show_unauthenticated_dialog (self) |
| Show unauthenticated dialog. | |
| None | show_update_dialog (self, str newer_tool_version) |
| Show Update dialog. | |
| None | show_welcome_dialog (self) |
| Show welcome screen and choose admin password. | |
| None | unblock_ui (self) |
| Unblock the main UI elements. | |
| None | update_menu (self) |
| Update menu. | |
| None | update_screen (self) |
| Update complete screen. | |
| None | update_table (self) |
| Update table and print/clear button. | |
Static Public Attributes | |
| resized = SIGNAL() | |
The view-controller for main window.
Entry point of application. Provides general methods that may be called by any other controller.
| qt_exception_hook | : exception hook |
| log_config | : log configuration of the application |
| test_mode | : status if application run in test mode for pytest |
| authenticated | : status if you are authenticated to use this program |
Definition at line 110 of file main_window.py.
| None __init__ | ( | self, | |
| UncaughtHook | qt_exception_hook, | ||
| LogConfig | log_config, | ||
| bool | test_mode = False, | ||
| bool | authenticated = False, | ||
| *Any | args, | ||
| **Any | kwargs ) |
Definition at line 121 of file main_window.py.
| None block_ui | ( | self | ) |
Blocks the main UI elements.
Definition at line 369 of file main_window.py.
| None btn_article_preview | ( | self | ) |
Article Print Preview.
Definition at line 1344 of file main_window.py.
| None btn_calc_clicked | ( | self | ) |
Handle calc button clicked.
Definition at line 952 of file main_window.py.
| None btn_change_item | ( | self, | |
| EConfigSelection | e_config_selection ) |
Handle change articles configuration.
| e_config_selection | : mode of articles change (edit/import/export/reset) |
Definition at line 1221 of file main_window.py.
| None btn_change_user | ( | self, | |
| EConfigSelection | e_config_selection ) |
Handle change user configuration.
| e_config_selection | : mode of user change (edit/import/export/reset) |
Definition at line 1164 of file main_window.py.
| None btn_clear_clicked | ( | self | ) |
Handle clear button clicked.
Definition at line 1001 of file main_window.py.
| None btn_combine_auto | ( | self | ) |
Combine Reports manual to create single report from multiple other data.
Definition at line 1303 of file main_window.py.
| None btn_combine_manual | ( | self | ) |
Combine Reports manual to create single report from multiple other data.
Definition at line 1287 of file main_window.py.
| None btn_item_clicked | ( | self, | |
| int | i_item_number ) |
Handle item button/login (1-30) clicked.
| i_item_number | : button index that was clicked |
Definition at line 834 of file main_window.py.
| None btn_item_held | ( | self | ) |
Item button held.
Definition at line 924 of file main_window.py.
| None btn_item_pressed | ( | self, | |
| int | i_item_number ) |
Handle item button/login (1-30) pressed.
| i_item_number | : button index that was pressed |
Definition at line 906 of file main_window.py.
| None btn_item_released | ( | self, | |
| int | i_item_number ) |
Handle item button/login (1-30) released.
| i_item_number | : button index that was released |
Definition at line 916 of file main_window.py.
| None btn_lock_clicked | ( | self, | |
| bool | b_auto_logout = False ) |
Handle lock button clicked.
| b_auto_logout | : [True] automatic logout (timeout); [False] manual logout |
Definition at line 1114 of file main_window.py.
| None btn_multi_clicked | ( | self | ) |
Handle multi button clicked.
Definition at line 933 of file main_window.py.
| None btn_open_folder | ( | self | ) |
Handle Open output folder.
Definition at line 1274 of file main_window.py.
| None btn_print_clicked | ( | self, | |
| bool | b_smartcard = False ) |
Handle print button clicked.
| b_smartcard | : status if print triggered by smart card |
Definition at line 1060 of file main_window.py.
| None btn_print_file | ( | self | ) |
Select and print markdown file from directory.
Definition at line 1324 of file main_window.py.
| None btn_report_print | ( | self, | |
| bool | b_clear_report ) |
Handle report or status button clicked.
| b_clear_report | : [True] create report and clear log; [False] show only status |
Definition at line 1129 of file main_window.py.
| None change_output_path | ( | self | ) |
Handle change output path.
Definition at line 1376 of file main_window.py.
| None clear_articles | ( | self | ) |
Clear articles.
Definition at line 978 of file main_window.py.
| None clear_status | ( | self, | |
| bool | b_override = False ) |
Clear status bar text and set active user as default.
| b_override | : status if actual status should override |
Definition at line 508 of file main_window.py.
| None closeEvent | ( | self, | |
| CLOSE_EVENT | None | event ) |
Default close Event Method to handle application close.
| event | : arrived event |
Definition at line 312 of file main_window.py.
| bool confirm_dialog | ( | self, | |
| str | list[str] | title_value, | ||
| str | s_icon_path = ICON_APP, | ||
| Optional[list[str]] | l_optional_text = None ) |
Show confirm dialog to accept or cancel.
| title_value | : dialog title |
| s_icon_path | : icon of dialog |
| l_optional_text | : optional text |
Definition at line 328 of file main_window.py.
| None edit_items_in_notepad | ( | self, | |
| str | s_file_name ) |
Open item file in notepad.
| s_file_name | : file name to open in notepad |
Definition at line 1267 of file main_window.py.
| None edit_user_in_notepad | ( | self, | |
| str | s_file_name ) |
Open user file in notepad.
| s_file_name | : file name to open in notepad |
Definition at line 1214 of file main_window.py.
| None open_report_dialog | ( | self, | |
| bool | b_clear_report, | ||
| bool | b_auto_print ) |
Open report dialog.
| b_clear_report | : [True] create report and clear log; [False] show only status |
| b_auto_print | : status if report was printed automatic |
Definition at line 528 of file main_window.py.
| float print_selected_articles | ( | self, | |
| list[Item] | l_item_log, | ||
| datetime | actual_datetime ) |
Print selected articles.
| l_item_log | : add printed articles to this list |
| actual_datetime | : date for printed items |
Definition at line 1036 of file main_window.py.
| None reset_config | ( | self | ) |
Handle reset configuration.
Definition at line 1386 of file main_window.py.
| None resizeEvent | ( | self, | |
| RESIZE_EVENT | None | _event ) |
Default resize Event Method to handle change of window size.
| _event | : arrived event |
Definition at line 305 of file main_window.py.
| None set_status | ( | self, | |
| str | list[str] | text_value, | ||
| bool | b_warning = False, | ||
| Optional[int] | i_timeout = None, | ||
| bool | b_highlight = False, | ||
| bool | b_thread = False ) |
Logs a status message to status bar (with timer) and logging handler.
| text_value | : text to set |
| b_warning | : [True] Text is a warning; [False] normal info |
| b_highlight | : [True] highlight text; [False] normal text |
| i_timeout | : timeout for statustext in "ms". If None use default time |
| b_thread | : call from thread to prevent timer activations (not allowed from thread) |
Definition at line 466 of file main_window.py.
| None set_ui | ( | self, | |
| bool | b_state ) |
Blocks/Unblock the main UI elements.
| b_state | : state if UI should blocked or unblocked, True: Enable, False: Disable |
Definition at line 350 of file main_window.py.
| None show_help_dialog | ( | self | ) |
Show help dialog.
Definition at line 458 of file main_window.py.
| None show_item_btns | ( | self | ) |
Update item buttons.
Definition at line 536 of file main_window.py.
| None show_login_btns | ( | self | ) |
Update login buttons.
Definition at line 575 of file main_window.py.
| None show_number_btns | ( | self | ) |
Update number buttons.
Definition at line 632 of file main_window.py.
| None show_unauthenticated_dialog | ( | self | ) |
Show unauthenticated dialog.
Definition at line 437 of file main_window.py.
| None show_update_dialog | ( | self, | |
| str | newer_tool_version ) |
Show Update dialog.
| newer_tool_version | : newest tool version |
Definition at line 389 of file main_window.py.
| None show_welcome_dialog | ( | self | ) |
Show welcome screen and choose admin password.
Definition at line 413 of file main_window.py.
| None unblock_ui | ( | self | ) |
Unblock the main UI elements.
Definition at line 378 of file main_window.py.
| None update_menu | ( | self | ) |
Update menu.
Definition at line 776 of file main_window.py.
| None update_screen | ( | self | ) |
Update complete screen.
Definition at line 811 of file main_window.py.
| None update_table | ( | self | ) |
Update table and print/clear button.
Definition at line 666 of file main_window.py.
| action_58mm |
Definition at line 259 of file main_window.py.
| action_80mm |
Definition at line 260 of file main_window.py.
| action_about_app |
Definition at line 282 of file main_window.py.
| action_article_preview |
Definition at line 231 of file main_window.py.
| action_articles_edit |
Definition at line 240 of file main_window.py.
| action_articles_export |
Definition at line 242 of file main_window.py.
| action_articles_import |
Definition at line 241 of file main_window.py.
| action_articles_new |
Definition at line 243 of file main_window.py.
| action_articles_pdf_import |
Definition at line 799 of file main_window.py.
| action_auto |
Definition at line 264 of file main_window.py.
| action_auto_export |
Definition at line 793 of file main_window.py.
| action_auto_import |
Definition at line 806 of file main_window.py.
| action_change_path |
Definition at line 245 of file main_window.py.
| action_combine_auto |
Definition at line 229 of file main_window.py.
| action_combine_manual |
Definition at line 228 of file main_window.py.
| action_create_billing |
Definition at line 233 of file main_window.py.
| action_dark |
Definition at line 266 of file main_window.py.
| action_enable_report |
Definition at line 182 of file main_window.py.
| action_english |
Definition at line 270 of file main_window.py.
| action_german |
Definition at line 271 of file main_window.py.
| action_help |
Definition at line 281 of file main_window.py.
| action_light |
Definition at line 265 of file main_window.py.
| action_log_debug |
Definition at line 278 of file main_window.py.
| action_log_error |
Definition at line 275 of file main_window.py.
| action_log_info |
Definition at line 277 of file main_window.py.
| action_log_warning |
Definition at line 276 of file main_window.py.
| action_none |
Definition at line 247 of file main_window.py.
| action_normal |
Definition at line 267 of file main_window.py.
| action_open_folder |
Definition at line 227 of file main_window.py.
| action_paper_change |
Definition at line 808 of file main_window.py.
| action_port_1 |
Definition at line 248 of file main_window.py.
| action_port_10 |
Definition at line 257 of file main_window.py.
| action_port_2 |
Definition at line 249 of file main_window.py.
| action_port_3 |
Definition at line 250 of file main_window.py.
| action_port_4 |
Definition at line 251 of file main_window.py.
| action_port_5 |
Definition at line 252 of file main_window.py.
| action_port_6 |
Definition at line 253 of file main_window.py.
| action_port_7 |
Definition at line 254 of file main_window.py.
| action_port_8 |
Definition at line 255 of file main_window.py.
| action_port_9 |
Definition at line 256 of file main_window.py.
| action_print_file |
Definition at line 230 of file main_window.py.
| action_reset |
Definition at line 283 of file main_window.py.
| action_show_interim |
Definition at line 226 of file main_window.py.
| action_show_price |
Definition at line 179 of file main_window.py.
| action_sound |
Definition at line 176 of file main_window.py.
| action_system |
Definition at line 268 of file main_window.py.
| action_user_edit |
Definition at line 235 of file main_window.py.
| action_user_export |
Definition at line 237 of file main_window.py.
| action_user_import |
Definition at line 236 of file main_window.py.
| action_user_new |
Definition at line 238 of file main_window.py.
| action_webserver |
Definition at line 801 of file main_window.py.
| ag_language |
Definition at line 191 of file main_window.py.
| ag_paper_width |
Definition at line 170 of file main_window.py.
| ag_port = None |
Definition at line 153 of file main_window.py.
| ag_theme |
Definition at line 185 of file main_window.py.
| ag_verbosity |
Definition at line 164 of file main_window.py.
| bool b_btn_hold = False |
Definition at line 210 of file main_window.py.
| b_warning_active = False |
Definition at line 129 of file main_window.py.
| btn_article_preview |
Definition at line 231 of file main_window.py.
| btn_calc |
Definition at line 220 of file main_window.py.
| btn_calc_clicked |
Definition at line 220 of file main_window.py.
| btn_change_item |
Definition at line 240 of file main_window.py.
| btn_change_user |
Definition at line 235 of file main_window.py.
| btn_clear |
Definition at line 221 of file main_window.py.
| btn_clear_clicked |
Definition at line 221 of file main_window.py.
| btn_combine_auto |
Definition at line 229 of file main_window.py.
| btn_combine_manual |
Definition at line 228 of file main_window.py.
| btn_lock |
Definition at line 223 of file main_window.py.
| btn_lock_clicked |
Definition at line 223 of file main_window.py.
| btn_multi |
Definition at line 219 of file main_window.py.
| btn_multi_clicked |
Definition at line 219 of file main_window.py.
| btn_open_folder |
Definition at line 227 of file main_window.py.
| btn_print |
Definition at line 222 of file main_window.py.
| btn_print_clicked |
Definition at line 222 of file main_window.py.
| btn_print_file |
Definition at line 230 of file main_window.py.
| btn_report_print |
Definition at line 226 of file main_window.py.
| btn_timer = create_timer(parent=self, callback=self.btn_item_held) |
Definition at line 212 of file main_window.py.
| change_output_path |
Definition at line 245 of file main_window.py.
| bool close_window_dialog = True |
Definition at line 127 of file main_window.py.
| dialog_help = create_help_dialog(self) |
Definition at line 132 of file main_window.py.
| bool gui_locked = False |
Definition at line 128 of file main_window.py.
| int i_btn_hold_idx = 0 |
Definition at line 211 of file main_window.py.
| list l_action_com_port |
Definition at line 143 of file main_window.py.
| l_bnt_fnc |
Definition at line 198 of file main_window.py.
| menu_articles |
Definition at line 798 of file main_window.py.
| menu_com_port |
Definition at line 802 of file main_window.py.
| menu_combine_report |
Definition at line 788 of file main_window.py.
| menu_configuration |
Definition at line 365 of file main_window.py.
| menu_display_port |
Definition at line 805 of file main_window.py.
| menu_help |
Definition at line 367 of file main_window.py.
| menu_log_verbosity |
Definition at line 807 of file main_window.py.
| menu_paper_width |
Definition at line 803 of file main_window.py.
| menu_prints |
Definition at line 364 of file main_window.py.
| menu_settings |
Definition at line 366 of file main_window.py.
| menu_smartcard |
Definition at line 804 of file main_window.py.
| menubar |
Definition at line 285 of file main_window.py.
| model = Model(self, log_config) |
Definition at line 155 of file main_window.py.
| qt_exception_hook = qt_exception_hook |
Definition at line 126 of file main_window.py.
| reset_config |
Definition at line 283 of file main_window.py.
|
static |
Definition at line 119 of file main_window.py.
| show_help_dialog |
Definition at line 281 of file main_window.py.
| status_timer = create_timer(parent=self, callback=self.clear_status) |
Definition at line 161 of file main_window.py.
| statusbar_left = LABEL() |
Definition at line 135 of file main_window.py.
| statusbar_right = LABEL() |
Definition at line 136 of file main_window.py.
| table_items |
Definition at line 721 of file main_window.py.
| test_mode = test_mode |
Definition at line 125 of file main_window.py.
| text_total |
Definition at line 686 of file main_window.py.
| unblock_ui |
Definition at line 1144 of file main_window.py.