pycrossword
0.4
Pure-Python implementation of a crossword puzzle generator and editor
|
The application's main GUI window. More...
Public Member Functions | |
def | __init__ (self, **kwargs) |
Initializes class members. More... | |
def | options (self) |
Util method to get the global settings dictionary. More... | |
def | create_plugin_manager (self, collect_plugins=True) |
Сreates and returns an instance of the Plugin Manager. More... | |
def | initUI (self, autoloadcw=True) |
Creates all window elements: layouts, panels, toolbars, widgets. More... | |
def | create_actions (self) |
Creates the application actions (QAction instances) which are then added to the main toolbar, main menu and context menus. More... | |
def | UI_create_toolbar (self) |
Creates the app's main toolbar (which can also be hidden in settings). More... | |
def | toolbar_from_settings (self) |
Fills main toolbar from app settings (CWSettings::settings). More... | |
def | UI_create_lang_combo (self) |
Creates the langugage combo box and fills it with supported languages. More... | |
def | UI_create_menu (self) |
Creates the application's main menu. More... | |
def | UI_create_central_widget (self) |
Creates the main UI elements: the crossword grid and clues table. More... | |
def | UI_create_statusbar (self) |
Creates the main window's status bar. More... | |
def | UI_create_context_menus (self) |
Creates all context menus for main window. More... | |
def | execute_cli_args (self, **kwargs) |
Looks for valid command-line commands (to open a file, etc.) and executes them. More... | |
def | delete_temp_files (self, delete_update_log=True) |
Clears any temps left by the app's previous launches. More... | |
def | apply_config (self, save_settings=True, autoloadcw=True) |
Applies settings found in CWSettings::settings and updates the settings file. More... | |
def | scale_cw (self, scale_factor=100, update_label=True, save_history=False) |
Changes the scale of the crossword grid. More... | |
def | cw_resized (self, old_width, old_height, new_width, new_height) |
On resize event handler for the crossword grid: fits the grid size into the available space extending all cells. More... | |
def | update_actions (self) |
Updates the enabled property of each action depending on which actions are currently available. More... | |
def | update_wordsrc (self) |
Updates MainWindow::wordsrc from the global settings in CWSettings::settings. More... | |
def | update_cw (self, rescale=True) |
Updates cw data and view. More... | |
def | grid_from_file (self, gridfile) |
Reads the crossword grid from a text file and returns the grid as a list of rows. More... | |
def | autosave_cw (self) |
Saves the currently open crossword (MainWindow::cw) to the default autosave file (utils::globalvars::SAVEDCW_FILE). More... | |
def | autoload_cw (self) |
Loads self.cw from the default autosave file (utils::globalvars::SAVEDCW_FILE) if present. More... | |
def | open_cw (self, selected_path, save_history=True) |
Loads the crossword (MainWindow::cw) from a given file. More... | |
def | close_cw (self, save_history=True) |
Closes the currently open crossword (freeing MainWindow::cw). More... | |
def | update_current_word (self, on_intersect='current') |
Updates the currently selected word in the grid and clues table. More... | |
def | update_clue_column_settings (self) |
Updates the settings (CWSettings::settings) with current clue table's column parameters. More... | |
def | update_clue_replies (self, coord) |
Updates the reply values in clues table for given grid coordinate. More... | |
def | select_clue (self) |
Selects (and if necessary scrolls to) the clue item corresponding to the currently selected word. More... | |
def | set_cell_formatting (self, QtWidgets.QTableWidgetItem cell_item) |
Updates the internal formatting (colors, fonts) in the crossword grid for a given cell. More... | |
def | reformat_cells (self) |
Updates the internal formatting (colors, fonts) of the crossword grid. More... | |
def | update_cw_grid (self) |
Updates (fills) the crossword grid from the internal crossword::Crossword object (self.cw). More... | |
def | make_cell_item (self, text, icon_text='') |
Creates a crossword cell item (QtWidgets.QTableWidgetItem ) with given text and number. More... | |
def | update_cw_params (self) |
Updates the core settings of MainWindow::cw (internal crossword::Crossword instance) from CWSettings::settings. More... | |
def | update_clues_model (self) |
Updates (regenerates) the clues table from the clues contained in the current crossword. More... | |
def | clues_show_hide_cols (self) |
Shows or hides columns in the clues table based on current settings. More... | |
def | reformat_clues (self) |
Sets formatting in clues table according to word status (filled / empty). More... | |
def | on_filter_word (self, str word) |
Default word source filter for Crossword constructor. More... | |
def | on_share_start (self) |
Slot fires when the share thread (MainWindow::share_thread) starts up. More... | |
def | on_share_progress (self, percent, status) |
Slot fires during the sharing thread's progress. More... | |
def | on_share_upload (self, filepth, url) |
Slot fires when MainWindow::share_thread has uploaded the file (crossword) to the cloud storage. More... | |
def | on_share_clipboard_write (self, url) |
Slot fires when the sharer has copied the destination URL of the shared file to the clipboard. More... | |
def | on_share_error (self, thread, err) |
Slot fires when the sharer (MainWindow::share_thread) has encountered an error. More... | |
def | on_share_finish (self) |
Slot fires when the sharer (MainWindow::share_thread) has completed its operation. More... | |
def | on_share_apikey_required (self, res) |
Slot fires when the sharer (MainWindow::share_thread) must ask user for an API key. More... | |
def | on_share_bearer_required (self, res) |
Slot fires when the sharer (MainWindow::share_thread) must ask user for a Bearer Token. More... | |
def | on_share_prepare_url (self, url) |
Slot fires when the sharer has prepared the URL for sharing on a social network. More... | |
def | on_share_no_user (self, cloud, username) |
Slot fires when the sharer detects that there is no current username assigned. More... | |
def | on_share_run (self) |
Main worker slot (function) for the sharer thread (MainWindow::share_thread). More... | |
def | create_cloud (self, thread) |
Initializes the sharer object (MainWindow::sharer). More... | |
def | share_url (self, url, headers={ 'Content-Type':'application/json'}, error_keymap=Share.ERRMAP) |
Opens a share link in inbuilt or external browser (for sharing) More... | |
def | create_syneditor (self, source=None, show=True, modal=False) |
Creates and optionally shows the inbuilt python code editor. More... | |
def | on_generate_start (self) |
Slot fires when the cw generation thread (MainWindow::gen_thread) starts up. More... | |
def | on_generate_finish (self) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has completed. More... | |
def | on_gen_timeout (self, timeout_) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has timed out. More... | |
def | on_gen_stop (self) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has been stopped. More... | |
def | on_gen_error (self, thread, err) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has encountered an error. More... | |
def | on_gen_validate (self, bad_) |
Slot fires when the cw generator has completed and needs to validate the words in the grid. More... | |
def | on_gen_progress (self, cw_, complete_, total_) |
Slot fires to show progress of cw generation thread (MainWindow::gen_thread). More... | |
def | generate_cw_worker (self) |
Main worker function for the cw generation thread (MainWindow::gen_thread). More... | |
def | save_cw (self, filepath=None, file_type=None) |
Saves / exports the current crossword (MainWindow::cw) to a given file and file type. More... | |
def | export_cw (self, filepath, scale=1.0) |
Exports crossword grid to image file. More... | |
def | print_cw (self, pdf_file=None, show_preview=True) |
Prints current crossword (and optionally clues) to file or printer. More... | |
def | on_preview_paint (self, printer) |
Prints current crossword (and optionally clues) to print preview form. More... | |
def | update_settings_before_quit (self) |
Updates the required GUI settings in the settings file before the application quits (to restore them upon next startup). More... | |
def | get_word_suggestion (self, wordstr) |
Shows the Suggest Word dialog (forms::WordSuggestDialog) to suggest variants for a given word. More... | |
def | adjust_clues_header_columns (self) |
Applies clues header column widths from CWSettings::settings. More... | |
def | on_get_recent (self, new_version) |
Callback for MainWindow::updater, fires when a new release is found. More... | |
def | stop_all_threads (self) |
Stops all running threads. More... | |
def | check_save_required (self, cancellable=True) |
Checks if the current crossword has been modified and asks user to save it. More... | |
def | showEvent (self, event) |
Fires when the window is about to show. More... | |
def | closeEvent (self, event) |
Fires when the window is about to close. More... | |
def | dragEnterEvent (self, QtGui.QDragEnterEvent event) |
Fires when something is being dragged into the window. More... | |
def | dragMoveEvent (self, QtGui.QDragMoveEvent event) |
Fires when something is being dragged and moved within the window. More... | |
def | dragLeaveEvent (self, QtGui.QDragLeaveEvent event) |
Fires when a dragged object leaves the window. More... | |
def | dropEvent (self, QtGui.QDropEvent event) |
Fires when a dragged object is dropped into the window. More... | |
def | event (self, QtCore.QEvent event) |
Generic event handler. More... | |
def | contextMenuEvent (self, QtGui.QContextMenuEvent event) |
Context menu event handler. More... | |
def | actionEvent (self, QtGui.QActionEvent event) |
Action event handler: fires on a QAction event. More... | |
def | changeEvent (self, QtCore.QEvent event) |
Fires when the main window GUI (style, font, title etc) changes. More... | |
def | enterEvent (self, QtCore.QEvent event) |
Fires when the mouse enters the main window. More... | |
def | leaveEvent (self, QtCore.QEvent event) |
Fires when the mouse leaves the main window. More... | |
def | focusInEvent (self, QtGui.QFocusEvent event) |
Fires when the window gets focus. More... | |
def | focusOutEvent (self, QtGui.QFocusEvent event) |
Fires when the window loses focus. More... | |
def | hideEvent (self, QtGui.QHideEvent event) |
Fires when the window is hidden (not closed). More... | |
def | inputMethodEvent (self, QtGui.QInputMethodEvent event) |
Fires when the input method for the window changes. More... | |
def | keyPressEvent (self, QtGui.QKeyEvent event) |
Fires when a key is pressed on the focused window. More... | |
def | keyReleaseEvent (self, QtGui.QKeyEvent event) |
Fires when a key is released on the focused window. More... | |
def | mouseDoubleClickEvent (self, QtGui.QMouseEvent event) |
Fires when the window receives a mouse double click. More... | |
def | mouseMoveEvent (self, QtGui.QMouseEvent event) |
Fires when the mouse is moved within the window. More... | |
def | mousePressEvent (self, QtGui.QMouseEvent event) |
Fires when a mouse button is pressed on the window. More... | |
def | mouseReleaseEvent (self, QtGui.QMouseEvent event) |
Fires when a mouse button is released on the window. More... | |
def | moveEvent (self, QtGui.QMoveEvent event) |
Fires when the window has been moved (changes position). More... | |
def | nativeEvent (self, eventType, message) |
Generic NATIVE event handler. More... | |
def | paintEvent (self, QtGui.QPaintEvent event) |
Fires on window repaint request. More... | |
def | resizeEvent (self, QtGui.QResizeEvent event) |
Fires when the window has been resized. More... | |
def | tabletEvent (self, QtGui.QTabletEvent event) |
Tablet PC / smartphone event handler (such as XY-axis position, pressure, rotation etc). More... | |
def | wheelEvent (self, QtGui.QWheelEvent event) |
Fires when the mouse wheel is scrolled on the focused window. More... | |
def | edit_cw_cell (self, cell_item, key, text, modifiers, multiselect, fix_changes=True) |
Changes the cw grid using a key and modifiers as pressed on the keyboard. More... | |
def | on_cw_key (self, QtGui.QKeyEvent event) |
Fires when a key is pressed in the crossword grid. More... | |
def | on_cw_deselect (self) |
def | on_before_update (self, old_version, new_version) |
Fires when the application is about to update. More... | |
def | on_norecent (self) |
Fires when the updater has found no newer versions on the server. More... | |
def | on_act_new (self, checked) |
Slot for MainWindow::act_new: creates a new crossword from file, structure or parameters. More... | |
def | on_act_open (self, checked) |
Slot for MainWindow::act_open: loads crossword from a file (showing an Open File dialog). More... | |
def | on_act_save (self, checked) |
Slot for MainWindow::act_save: saves current crossword to the same file it was opened from and resets its modified status to False . More... | |
def | on_act_saveas (self, checked) |
Slot for MainWindow::act_saveas: shows a Save As dialog and saves current crossword to the selected file and resets its modified status to False . More... | |
def | on_act_reload (self, checked) |
Slot for MainWindow::act_reload: reloads current crossword from the original file (user will be asked to save the changes first, if the cw has been modified). More... | |
def | on_act_close (self, checked) |
Slot for MainWindow::act_close: closes current crossword calling close_cw(). More... | |
def | on_act_share (self, checked) |
Slot for MainWindow::act_share: shares current crossword in social networks. More... | |
def | on_act_exit (self, checked) |
Slot for MainWindow::act_exit: quits the application calling close() on the main window. More... | |
def | on_act_undo_hovered (self) |
Slot for MainWindow::act_undo::hovered: updates the tooltip for the Undo action when hovered. More... | |
def | on_act_undo (self, checked) |
Slot for MainWindow::act_undo: undoes last operation. More... | |
def | on_act_redo_hovered (self) |
Slot for MainWindow::act_redo::hovered: updates the tooltip for the Redo action when hovered. More... | |
def | on_act_redo (self, checked) |
Slot for MainWindow::act_redo: redoes last operation. More... | |
def | on_act_addrow (self, checked) |
Slot for MainWindow::act_addrow: adds a new row after the selected one. More... | |
def | on_act_addcol (self, checked) |
Slot for MainWindow::act_addcol: adds a new column after the selected one. More... | |
def | on_act_delrow (self, checked) |
Slot for MainWindow::act_delrow: deletes the selected row. More... | |
def | on_act_delcol (self, checked) |
Slot for MainWindow::act_delcol: deletes the selected column. More... | |
def | on_act_reflect (self, checked) |
Slot for MainWindow::act_reflect: reflects (duplicates) the current cw grid (all cells) to any position (left, right, up, down). More... | |
def | on_act_clear_wd (self, checked) |
Slot for MainWindow::act_clear_wd: clears currently selected word without affecting any crossing words. More... | |
def | on_act_erase_wd (self, checked) |
Slot for MainWindow::act_erase_wd: clears currently selected word (all letters). More... | |
def | on_act_gen (self, checked) |
Slot for MainWindow::act_gen: generates (fills) the current crossword taking word suggestions from the active word sources. More... | |
def | on_act_stop (self, checked) |
Slot for MainWindow::act_stop: stops the currently running operation(s). More... | |
def | on_act_stop_changed (self) |
On Changed slot for MainWindow::act_stop. More... | |
def | on_act_edit (self, checked) |
Slot for MainWindow::act_edit: updates cell formatting in crossword and actions. More... | |
def | on_act_view_showtoolbar (self, checked) |
Slot for MainWindow::act_view_showtoolbar: shows or hides the main toolbar. More... | |
def | on_act_grid_multiselect (self, checked) |
Slot for MainWindow::act_grid_multiselect: toggle multi cell selection. More... | |
def | on_act_fitgrid (self, checked) |
Slot for MainWindow::act_fitgrid: fits the crossword grid in the window size. More... | |
def | on_act_grid_blank (self, checked) |
Slot for MainWindow::act_grid_blank: makes selected cells blank (clears them). More... | |
def | on_act_grid_filler (self, checked) |
Slot for MainWindow::act_grid_filler: makes selected cells filled with FILLER. More... | |
def | on_act_grid_filler2 (self, checked) |
Slot for MainWindow::act_grid_filler2: makes selected cells filled with FILLER2. More... | |
def | on_act_editclue (self, checked) |
Slot for MainWindow::act_editclue: activates the editing mode for the current word's clue. More... | |
def | on_act_clearclues (self, checked) |
Slot for MainWindow::act_clearclues: clears all clues from crossword. More... | |
def | on_act_clear (self, checked) |
Slot for MainWindow::act_clear: clears the current crossword. More... | |
def | on_act_suggest (self, checked) |
Slot for MainWindow::act_suggest: brings up a list of words for the selected one in the grid and lets the user place it into the grid. More... | |
def | on_act_lookup (self, checked) |
Slot for MainWindow::act_lookup: looks up the current word's definition / meaning in a dictionary and/or Google. More... | |
def | on_act_wsrc (self, checked) |
Slot for MainWindow::act_wsrc: opens the word source settings to let the use choose / add word sources for crossword generation. More... | |
def | on_act_info (self, checked) |
Slot for MainWindow::act_info: shows the crossword information window where the user can change cw attributes like title , author , etc. More... | |
def | on_act_print (self, checked) |
Slot for MainWindow::act_print: prints current CW and/or clues to printer or PDF. More... | |
def | on_act_config (self, checked) |
Slot for MainWindow::act_config: shows the application Settings dialog. More... | |
def | on_act_update (self, checked) |
Slot for MainWindow::act_update: checks for app updates on the server (github). More... | |
def | on_act_help (self, checked) |
Slot for MainWindow::act_help: opens up the Help documentation. More... | |
def | on_act_apiref (self, checked) |
Slot for MainWindow::act_apiref: shows API reference in browser. More... | |
def | on_act_contact (self, checked) |
Slot for MainWindow::act_contact: shows form to contact author, i.e. More... | |
def | on_act_about (self, checked) |
Slot for MainWindow::act_about: shows the About dialog. More... | |
def | on_act_stats (self, checked) |
Slot for MainWindow::act_stats: shows the current crossword's statistics. More... | |
def | on_statusbar_l2_dblclicked (self, event) |
Fires when MainWindow::statusbar_l2 is double-clicked. More... | |
def | on_slider_cw_scale (self, value) |
Fires when MainWindow::slider_cw_scale is moved: rescales the crossword grid. More... | |
def | on_cw_current_item_changed (self, current, previous) |
Fires when a new cw grid cell is focused. More... | |
def | on_cw_item_clicked (self, item) |
Fires when a cw grid cell is clicked (pressed). More... | |
def | on_twCw_contextmenu (self, point) |
Fires when the custom context meny is requested on the crossword grid. More... | |
def | on_tvClues_contextmenu (self, point) |
Fires when the custom context meny is requested on the Clues panel. More... | |
def | on_tvClues_header_contextmenu (self, point) |
Fires when the custom context meny is requested on the Clues panel header. More... | |
def | on_toolbar_contextmenu (self, point) |
Fires when the custom context meny is requested on the main toolbar. More... | |
def | on_tvClues_selected (self, selected, deselected) |
Fires when one or severals clue rows are selected in MainWindow::tvClues. More... | |
def | on_tvClues_current_changed (self, current, previous) |
Fires when the currenly selected clue item in MainWindow::tvClues has changed. More... | |
def | on_tvClues_column_moved (self, logicalIndex, oldVisualIndex, newVisualIndex) |
Fires when the clues table columns have been moved by dragging. More... | |
def | on_clues_editor_commit (self, editor) |
Fires every time a cell in clues table has been edited (manually) and is about to write data back to the underlying model. More... | |
def | set_selected_lang (self) |
Writes the current interface language into the global settings. More... | |
def | on_combo_lang (self, index) |
Fires when a new language in the language combo is picked. More... | |
def | on_pop_undo (self, histmgr, cmd) |
Undo pop event handler for MainWindow::undomgr. More... | |
def | on_push_undo (self, histmgr, cmd) |
Undo push event handler for MainWindow::undomgr. More... | |
def | on_pop_redo (self, histmgr, cmd) |
Redo pop event handler for MainWindow::undomgr. More... | |
def | on_push_redo (self, histmgr, cmd) |
Redo push event handler for MainWindow::undomgr. More... | |
def | on_menu_undo_triggered (self, action) |
On triggered event handler for the Undo action menu. More... | |
def | on_menu_redo_triggered (self, action) |
On triggered event handler for the Redo action menu. More... | |
Public Attributes | |
cw | |
crossword::Crossword internal crossword generator object More... | |
cw_file | |
str currently opened cw file More... | |
cw_modified | |
bool flag showing that current cw has been changed since last save More... | |
current_word | |
Word currently selected word in grid More... | |
last_pressed_item | |
QtWidgets.QTableWidgetItem last pressed cell in cw grid More... | |
sharer | |
utils::onlineservices::Share object More... | |
wordsrc | |
wordsrc::MultiWordsource word source instance More... | |
garbage | |
list files to delete on startup / close More... | |
undomgr | |
utils::undo::CommandManager undo / redo history manager More... | |
saved_cw | |
list temporary saved crossword words (crossword::Word objects) More... | |
gen_thread | |
GenThread cw generation worker thread More... | |
share_thread | |
ShareThread sharer worker thread More... | |
threads | |
list thread list to keep track of all spawned threads More... | |
dia_settings | |
forms::SettingsDialog instance (settings window) More... | |
plugin_mgr | |
utils::pluginmanager::PxPluginManager plugin manager instance to operate user plugins More... | |
act_new | |
QtWidgets.QAction new crossword action More... | |
act_open | |
QtWidgets.QAction open crossword (file) action More... | |
act_save | |
QtWidgets.QAction crossword save action More... | |
act_saveas | |
QtWidgets.QAction crossword save as (export) action More... | |
act_close | |
QtWidgets.QAction crossword close action More... | |
act_reload | |
QtWidgets.QAction crossword reload (from file) action More... | |
act_share | |
QtWidgets.QAction crossword share action More... | |
act_edit | |
QtWidgets.QAction crossword edit action (toggle editing mode) More... | |
act_undo | |
QtWidgets.QAction undo action – see utils::undo More... | |
act_redo | |
QtWidgets.QAction redo action – see utils::undo More... | |
act_addrow | |
QtWidgets.QAction add row action More... | |
act_delrow | |
QtWidgets.QAction delete row action More... | |
act_addcol | |
QtWidgets.QAction add column action More... | |
act_delcol | |
QtWidgets.QAction delete column action More... | |
act_reflect | |
QtWidgets.QAction reflect (duplicate) grid action More... | |
act_gen | |
QtWidgets.QAction crossword generate (fill) action More... | |
act_stop | |
QtWidgets.QAction stop (current operation) action More... | |
act_clear | |
QtWidgets.QAction grid clear action More... | |
act_clear_wd | |
QtWidgets.QAction clear word action More... | |
act_erase_wd | |
QtWidgets.QAction erase word action More... | |
act_suggest | |
QtWidgets.QAction suggest word action More... | |
act_lookup | |
QtWidgets.QAction lookup word action More... | |
act_editclue | |
QtWidgets.QAction go to clue action More... | |
act_clearclues | |
QtWidgets.QAction clear clues action More... | |
act_wsrc | |
QtWidgets.QAction edit word sources action More... | |
act_info | |
QtWidgets.QAction show / edit crossword info action More... | |
act_print | |
QtWidgets.QAction print (cw / clues) action More... | |
act_config | |
QtWidgets.QAction configure settings action More... | |
act_update | |
QtWidgets.QAction check for update action More... | |
act_help | |
QtWidgets.QAction show help docs action More... | |
act_apiref | |
QtWidgets.QAction show API reference action More... | |
act_contact | |
QtWidgets.QAction contact action More... | |
act_about | |
QtWidgets.QAction show About action More... | |
act_stats | |
QtWidgets.QAction show crossword stats action More... | |
act_exit | |
QtWidgets.QAction quit application action More... | |
act_view_showtoolbar | |
QtWidgets.QAction show toolbar action More... | |
act_fitgrid | |
QtWidgets.QAction fit grid in window action More... | |
act_grid_multiselect | |
QtWidgets.QAction toggle grid Multiselect mode action More... | |
act_grid_blank | |
QtWidgets.QAction clear selected cells action (put crossword::BLANK) More... | |
act_grid_filler | |
QtWidgets.QAction block selected cells action (put crossword::FILLER) More... | |
act_grid_filler2 | |
QtWidgets.QAction grey out selected cells action (put crossword::FILLER2) More... | |
toolbar_main | |
QtWidgets.QToolBar main toolbar More... | |
btn_act_undo | |
menu_undo | |
QtWidgets.QMenu dropdown menu for Undo button More... | |
btn_act_redo | |
menu_redo | |
QtWidgets.QMenu dropdown menu for Redo button More... | |
combo_lang | |
QtWidgets.QComboBox UI language combo More... | |
menu_main | |
QtWidgets.QMenu UI main menu More... | |
menu_main_file | |
QtWidgets.QMenu 'File' menu More... | |
menu_main_edit | |
QtWidgets.QMenu 'Edit' menu More... | |
menu_main_view | |
QtWidgets.QMenu 'View' menu More... | |
menu_main_gen | |
QtWidgets.QMenu 'Generate' menu More... | |
menu_main_help | |
QtWidgets.QMenu 'Help' menu More... | |
splitter1 | |
QtWidgets.QSplitter central widget More... | |
cw_widget | |
QtWidgets.QWidget cw layout container More... | |
layout_vcw | |
QtWidgets.QVBoxLayout cw layout More... | |
toolbar_grid | |
QtWidgets.QToolBar grid edit toolbar More... | |
twCw | |
forms::CwTable cw grid More... | |
slider_cw_scale | |
QtWidgets.QSlider cw scale slider More... | |
l_cw_scale | |
QtWidgets.QLabel cw table scale indicator More... | |
btn_fitgrid | |
QtWidgets.QToolButton fit grid in window button More... | |
layout_cw_scale | |
QtWidgets.QHBoxLayout cw table scale layout More... | |
tvClues | |
QtWidgets.QTreeView clues table More... | |
statusbar | |
QtWidgets.QStatusBar main status bar More... | |
statusbar_pbar | |
QtWidgets.QProgressBar progress bar inside status bar (hidden by default) More... | |
statusbar_btnstop | |
QtWidgets.QToolButton stop current operation button More... | |
statusbar_l1 | |
QtWidgets.QLabel status bar text 1 (app version) More... | |
statusbar_l2 | |
forms::ClickableLabel status bar text 2 (other messages) More... | |
menu_crossword | |
forms::CrosswordMenu context menu for MainWindow::twCw More... | |
updater | |
utils::update::Updater instance (used to run app update checks and updates) More... | |
cluesmodel | |
QtGui.QStandardItemModel underlying data model for MainWindow::tvClues More... | |
syneditor | |
utils::synteditor::SynEditorWidget inbuilt python code editor More... | |
dia_load | |
forms::LoadCwDialog CW load dialog More... | |
dia_share | |
share settings dialog More... | |
dia_reflect | |
forms::ReflectGridDialog reflect / duplicate dialog More... | |
dia_lookup | |
word meaning lookup dialog More... | |
dia_info | |
crossword information edit dialog More... | |
dia_about | |
About dialog. More... | |
Private Member Functions | |
def | _log (self, what, end='\n') |
Simple util method to print stuff to console. More... | |
def | _item_in_word (self, QtWidgets.QTableWidgetItem cell_item, Word word) |
Checks if a given cw grid cell is found in a given Word instance. More... | |
def | _logical_col_by_name (self, colname) |
Gets the logical column number of clues table by the column header (title). More... | |
def | _col_setting_by_logical_index (self, index) |
Gets the clue table column settings from CWSettings::settings given its logical index. More... | |
def | _word_from_clue_item (self, QtGui.QStandardItem item) |
Returns Word object from self.cw corresponding to the given clue item. More... | |
def | _clue_items_from_word (self, Word word) |
Returns items from a single row in the clues table corresponding to the given Word object. More... | |
def | _localize_colname (self, name) |
Helper method that returns the localized column names for the Clues panel. More... | |
def | _save_cw (self, filepath=None, file_type=None) |
Util function to save or export current crossword to a given file and file type. More... | |
def | _apply_macros (self, txt, grid) |
Util function: replaces string macros like '<t>' by crossword metadata, like crossword::CWInfo::title. More... | |
def | _paint_cwgrid (self, painter, cliprect=None, clear_cw=True) |
Paints cw grid by QtGui.QPainter object, constrained by cliprect (QRectF). More... | |
def | _put_grid_char (self, character) |
Puts a given charactr into the currently selected crossword cells. More... | |
The application's main GUI window.
def pycross.gui.MainWindow.__init__ | ( | self, | |
** | kwargs | ||
) |
Initializes class members.
|
private |
Util function: replaces string macros like '<t>' by crossword metadata, like crossword::CWInfo::title.
The following macros are supported:
* '<t>' = cw title * '<a>' = cw author * '<p>' = cw publisher * '<c>' = cw copyright * '<d>' = cw date * '<rows>' = number of rows * '<cols>' = number of columns
txt | str the text containing macros |
grid | crossword::Wordgrid the crossword::Wordgrid object (crosword grid) |
str
text after macro replacements
|
private |
Returns items from a single row in the clues table corresponding to the given Word object.
word | Word a Word instance (representing a single word in the crossword) |
dict
clue items as a dict:
|
private |
Gets the clue table column settings from CWSettings::settings given its logical index.
index | int the logical column index (independent of manual column reordering in the view) |
dict
the corresponding column's settings found in ‘CWSettings::settings['clues’]['columns']`
|
private |
Checks if a given cw grid cell is found in a given Word instance.
|
private |
Helper method that returns the localized column names for the Clues panel.
|
private |
Simple util method to print stuff to console.
what | str message body |
end | str line ending |
|
private |
Gets the logical column number of clues table by the column header (title).
colname | str the column title (must be the original English name!) |
int
the logical column index (independent of manual column reordering in the view)
|
private |
Paints cw grid by QtGui.QPainter
object, constrained by cliprect (QRectF).
painter | QtGui.QPainter the painter object |
cliprect | QtCore.Qt.QRectF clip rectangle inside which the painting will be made |
clear_cw | bool whether to clear all words from the crossword before painting (words will be restored after the painting has finished) |
|
private |
Puts a given charactr into the currently selected crossword cells.
character | str the character (letter) to place |
|
private |
Util function to save or export current crossword to a given file and file type.
filepath | str the full path to the file where the cw must be saved. If not set (None ), MainWindow::cw_file will be used (the currently open cw file) |
file_type | str | int the file type used to save / export the crossword. If not set (None ), the app will attempt to infer it from the filepath extension. Otherwise, it can be a string representing the file filter - see _get_filetype() - CWSAVE_FILTERS, or an integer representing the index of the filter in _get_filetype() - CWSAVE_FILTERS |
|
private |
Returns Word object from self.cw corresponding to the given clue item.
item | QtGui.QStandardItem the item in the clues table |
def pycross.gui.MainWindow.actionEvent | ( | self, | |
QtGui.QActionEvent | event | ||
) |
Action event handler: fires on a QAction event.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QActionEvent the handled event |
def pycross.gui.MainWindow.adjust_clues_header_columns | ( | self | ) |
Applies clues header column widths from CWSettings::settings.
def pycross.gui.MainWindow.apply_config | ( | self, | |
save_settings = True , |
|||
autoloadcw = True |
|||
) |
Applies settings found in CWSettings::settings and updates the settings file.
def pycross.gui.MainWindow.autoload_cw | ( | self | ) |
Loads self.cw from the default autosave file (utils::globalvars::SAVEDCW_FILE) if present.
def pycross.gui.MainWindow.autosave_cw | ( | self | ) |
Saves the currently open crossword (MainWindow::cw) to the default autosave file (utils::globalvars::SAVEDCW_FILE).
def pycross.gui.MainWindow.changeEvent | ( | self, | |
QtCore.QEvent | event | ||
) |
Fires when the main window GUI (style, font, title etc) changes.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtCore.QEvent the handled event |
def pycross.gui.MainWindow.check_save_required | ( | self, | |
cancellable = True |
|||
) |
Checks if the current crossword has been modified and asks user to save it.
cancellable | bool whether the save dialog can be cancelled by user |
str
user's reply from the request dialog, e.g. 'yes' or 'no' def pycross.gui.MainWindow.close_cw | ( | self, | |
save_history = True |
|||
) |
Closes the currently open crossword (freeing MainWindow::cw).
save_history | bool True (default) to make this action undoable by saving it to the Undo history; if set to False , the action will not be undoable |
def pycross.gui.MainWindow.closeEvent | ( | self, | |
event | |||
) |
Fires when the window is about to close.
event | QtGui.QCloseEvent the handled event |
def pycross.gui.MainWindow.clues_show_hide_cols | ( | self | ) |
Shows or hides columns in the clues table based on current settings.
def pycross.gui.MainWindow.contextMenuEvent | ( | self, | |
QtGui.QContextMenuEvent | event | ||
) |
Context menu event handler.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QContextMenuEvent the handled event |
def pycross.gui.MainWindow.create_actions | ( | self | ) |
Creates the application actions (QAction
instances) which are then added to the main toolbar, main menu and context menus.
def pycross.gui.MainWindow.create_cloud | ( | self, | |
thread | |||
) |
Initializes the sharer object (MainWindow::sharer).
Uploads exported crosswords (as images, PDF etc) to the Kloudless cloud storage and shares the resulting URL in social networks (via the Shareaholic service).
thread | QtCore.QThread the sharer thread (ShareThread) |
def pycross.gui.MainWindow.create_plugin_manager | ( | self, | |
collect_plugins = True |
|||
) |
Сreates and returns an instance of the Plugin Manager.
mainwindow | MainWindow pointer to the app main window |
collect_plugins | bool whether to collect all plugins on creation (default) |
utils::pluginmanager::PxPluginManager
instance of created Plugin Manager def pycross.gui.MainWindow.create_syneditor | ( | self, | |
source = None , |
|||
show = True , |
|||
modal = False |
|||
) |
Creates and optionally shows the inbuilt python code editor.
source | str | None source code to set in editor (None clears the existing code) |
show | bool whether to show the editor window |
def pycross.gui.MainWindow.cw_resized | ( | self, | |
old_width, | |||
old_height, | |||
new_width, | |||
new_height | |||
) |
On resize event handler for the crossword grid: fits the grid size into the available space extending all cells.
def pycross.gui.MainWindow.delete_temp_files | ( | self, | |
delete_update_log = True |
|||
) |
Clears any temps left by the app's previous launches.
delete_update_log | bool whether to delete the 'update.log' file left from previous update |
def pycross.gui.MainWindow.dragEnterEvent | ( | self, | |
QtGui.QDragEnterEvent | event | ||
) |
Fires when something is being dragged into the window.
Here we accept drags only for file-like objects, showing the file path in the status bar.
event | QtGui.QDragEnterEvent the handled event |
def pycross.gui.MainWindow.dragLeaveEvent | ( | self, | |
QtGui.QDragLeaveEvent | event | ||
) |
Fires when a dragged object leaves the window.
Clears the status bar and accepts the event.
event | QtGui.QDragLeaveEvent the handled event |
def pycross.gui.MainWindow.dragMoveEvent | ( | self, | |
QtGui.QDragMoveEvent | event | ||
) |
Fires when something is being dragged and moved within the window.
For this implementation, only dragged files are accepted.
event | QtGui.QDragMoveEvent the handled event |
def pycross.gui.MainWindow.dropEvent | ( | self, | |
QtGui.QDropEvent | event | ||
) |
Fires when a dragged object is dropped into the window.
This event handler is implemented to load crossword and configuration files.
event | QtGui.QDropEvent the handled event |
def pycross.gui.MainWindow.edit_cw_cell | ( | self, | |
cell_item, | |||
key, | |||
text, | |||
modifiers, | |||
multiselect, | |||
fix_changes = True |
|||
) |
Changes the cw grid using a key and modifiers as pressed on the keyboard.
This helper method is internally called by MainWindow::on_cw_key().
cell_item | QtWidgets.QTableWidgetItem the currently selected grid cell |
key | int the pressed key |
text | str translated character string (single character) |
modifiers | flags set of keyboard modifiers (Ctrl, Shift, Alt) |
multiselect | bool whether the Multiselect mode is on (see MainWindow::act_grid_multiselect) |
fix_changes | bool whether to reformat the grid according to the changes made |
def pycross.gui.MainWindow.enterEvent | ( | self, | |
QtCore.QEvent | event | ||
) |
Fires when the mouse enters the main window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtCore.QEvent the handled event |
def pycross.gui.MainWindow.event | ( | self, | |
QtCore.QEvent | event | ||
) |
Generic event handler.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtCore.QEvent the handled event |
def pycross.gui.MainWindow.execute_cli_args | ( | self, | |
** | kwargs | ||
) |
Looks for valid command-line commands (to open a file, etc.) and executes them.
kwargs | keyword arguments commands to execute |
def pycross.gui.MainWindow.export_cw | ( | self, | |
filepath, | |||
scale = 1.0 |
|||
) |
Exports crossword grid to image file.
The following formats are supported: JPG, PNG, TIFF, BMP (raster), SVG (vector)
filepath | str the destination file path |
scale | float output image scale factor |
def pycross.gui.MainWindow.focusInEvent | ( | self, | |
QtGui.QFocusEvent | event | ||
) |
Fires when the window gets focus.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QFocusEvent the handled event |
def pycross.gui.MainWindow.focusOutEvent | ( | self, | |
QtGui.QFocusEvent | event | ||
) |
Fires when the window loses focus.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QFocusEvent the handled event |
def pycross.gui.MainWindow.generate_cw_worker | ( | self | ) |
Main worker function for the cw generation thread (MainWindow::gen_thread).
Generates (fills) the current crossword (MainWindow::cw)
def pycross.gui.MainWindow.get_word_suggestion | ( | self, | |
wordstr | |||
) |
Shows the Suggest Word dialog (forms::WordSuggestDialog) to suggest variants for a given word.
wordstr | str the string representation (mask) of the target word (crossword::FILLER, crossword::FILLER2 and crossword::BLANK symbols are used) |
str
| None
selected word in suggest dialog or None
if nothing was selected (cancelled) def pycross.gui.MainWindow.grid_from_file | ( | self, | |
gridfile | |||
) |
Reads the crossword grid from a text file and returns the grid as a list of rows.
gridfile | str the full path to the text file containing the cw grid structure |
list
list of rows (strings) representing a crossword grid def pycross.gui.MainWindow.hideEvent | ( | self, | |
QtGui.QHideEvent | event | ||
) |
Fires when the window is hidden (not closed).
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QHideEvent the handled event |
def pycross.gui.MainWindow.initUI | ( | self, | |
autoloadcw = True |
|||
) |
Creates all window elements: layouts, panels, toolbars, widgets.
autoloadcw | bool whether to load crossword automatically from autosave file (utils::globalvars::SAVEDCW_FILE) |
def pycross.gui.MainWindow.inputMethodEvent | ( | self, | |
QtGui.QInputMethodEvent | event | ||
) |
Fires when the input method for the window changes.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QInputMethodEvent the handled event |
def pycross.gui.MainWindow.keyPressEvent | ( | self, | |
QtGui.QKeyEvent | event | ||
) |
Fires when a key is pressed on the focused window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QKeyEvent the handled event |
def pycross.gui.MainWindow.keyReleaseEvent | ( | self, | |
QtGui.QKeyEvent | event | ||
) |
Fires when a key is released on the focused window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QKeyEvent the handled event |
def pycross.gui.MainWindow.leaveEvent | ( | self, | |
QtCore.QEvent | event | ||
) |
Fires when the mouse leaves the main window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtCore.QEvent the handled event |
def pycross.gui.MainWindow.make_cell_item | ( | self, | |
text, | |||
icon_text = '' |
|||
) |
Creates a crossword cell item (QtWidgets.QTableWidgetItem
) with given text and number.
text | str the cell text (1 character) |
icon_text | str the text of the number caption (default = empty) |
QtWidgets.QTableWidgetItem
cell object that can be inserted into MainWindow::twCw def pycross.gui.MainWindow.mouseDoubleClickEvent | ( | self, | |
QtGui.QMouseEvent | event | ||
) |
Fires when the window receives a mouse double click.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QMouseEvent the handled event |
def pycross.gui.MainWindow.mouseMoveEvent | ( | self, | |
QtGui.QMouseEvent | event | ||
) |
Fires when the mouse is moved within the window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QMouseEvent the handled event |
def pycross.gui.MainWindow.mousePressEvent | ( | self, | |
QtGui.QMouseEvent | event | ||
) |
Fires when a mouse button is pressed on the window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QMouseEvent the handled event |
def pycross.gui.MainWindow.mouseReleaseEvent | ( | self, | |
QtGui.QMouseEvent | event | ||
) |
Fires when a mouse button is released on the window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QMouseEvent the handled event |
def pycross.gui.MainWindow.moveEvent | ( | self, | |
QtGui.QMoveEvent | event | ||
) |
Fires when the window has been moved (changes position).
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QMoveEvent the handled event |
def pycross.gui.MainWindow.nativeEvent | ( | self, | |
eventType, | |||
message | |||
) |
Generic NATIVE event handler.
Default implementation here as a placeholder for possible overrides in custom plugins.
eventType | QtCore.QByteArray | bytes type of handled event:
|
message | voidptr message received |
tuple
2-tuple (bool
, int
), where the first element indicates if message handling must be stopped (True
) or passed on to Qt (False
), and the second element is the result returned by the handler (only for Windows OS) def pycross.gui.MainWindow.on_act_about | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_about: shows the About dialog.
def pycross.gui.MainWindow.on_act_addcol | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_addcol: adds a new column after the selected one.
The action is available only in the Editing mode (when MainWindow::act_edit is checked).
def pycross.gui.MainWindow.on_act_addrow | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_addrow: adds a new row after the selected one.
The action is available only in the Editing mode (when MainWindow::act_edit is checked).
def pycross.gui.MainWindow.on_act_apiref | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_apiref: shows API reference in browser.
def pycross.gui.MainWindow.on_act_clear | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_clear: clears the current crossword.
def pycross.gui.MainWindow.on_act_clear_wd | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_clear_wd: clears currently selected word without affecting any crossing words.
This action effectively clears only the 'free' letters in the selected word.
def pycross.gui.MainWindow.on_act_clearclues | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_clearclues: clears all clues from crossword.
def pycross.gui.MainWindow.on_act_close | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_close: closes current crossword calling close_cw().
def pycross.gui.MainWindow.on_act_config | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_config: shows the application Settings dialog.
If the dialog is closed by pressing OK, the new settings are applied with apply_config()
def pycross.gui.MainWindow.on_act_contact | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_contact: shows form to contact author, i.e.
me :)).
def pycross.gui.MainWindow.on_act_delcol | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_delcol: deletes the selected column.
The action is available only in the Editing mode (when MainWindow::act_edit is checked).
def pycross.gui.MainWindow.on_act_delrow | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_delrow: deletes the selected row.
The action is available only in the Editing mode (when MainWindow::act_edit is checked).
def pycross.gui.MainWindow.on_act_edit | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_edit: updates cell formatting in crossword and actions.
def pycross.gui.MainWindow.on_act_editclue | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_editclue: activates the editing mode for the current word's clue.
def pycross.gui.MainWindow.on_act_erase_wd | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_erase_wd: clears currently selected word (all letters).
Compared to on_act_clear_wd(), this action affects crossing words, if any, since it clears ALL the letters in the word, clearing them from the crossing words as well.
def pycross.gui.MainWindow.on_act_exit | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_exit: quits the application calling close()
on the main window.
def pycross.gui.MainWindow.on_act_fitgrid | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_fitgrid: fits the crossword grid in the window size.
def pycross.gui.MainWindow.on_act_gen | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_gen: generates (fills) the current crossword taking word suggestions from the active word sources.
def pycross.gui.MainWindow.on_act_grid_blank | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_grid_blank: makes selected cells blank (clears them).
def pycross.gui.MainWindow.on_act_grid_filler | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_grid_filler: makes selected cells filled with FILLER.
def pycross.gui.MainWindow.on_act_grid_filler2 | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_grid_filler2: makes selected cells filled with FILLER2.
def pycross.gui.MainWindow.on_act_grid_multiselect | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_grid_multiselect: toggle multi cell selection.
def pycross.gui.MainWindow.on_act_help | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_help: opens up the Help documentation.
def pycross.gui.MainWindow.on_act_info | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_info: shows the crossword information window where the user can change cw attributes like title
, author
, etc.
def pycross.gui.MainWindow.on_act_lookup | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_lookup: looks up the current word's definition / meaning in a dictionary and/or Google.
The looked-up definition may then be used to fill the corresponding clue.
def pycross.gui.MainWindow.on_act_new | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_new: creates a new crossword from file, structure or parameters.
def pycross.gui.MainWindow.on_act_open | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_open: loads crossword from a file (showing an Open File dialog).
def pycross.gui.MainWindow.on_act_print | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_print: prints current CW and/or clues to printer or PDF.
def pycross.gui.MainWindow.on_act_redo | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_redo: redoes last operation.
def pycross.gui.MainWindow.on_act_redo_hovered | ( | self | ) |
Slot for MainWindow::act_redo::hovered: updates the tooltip for the Redo action when hovered.
def pycross.gui.MainWindow.on_act_reflect | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_reflect: reflects (duplicates) the current cw grid (all cells) to any position (left, right, up, down).
The action is available only in the Editing mode (when MainWindow::act_edit is checked).
def pycross.gui.MainWindow.on_act_reload | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_reload: reloads current crossword from the original file (user will be asked to save the changes first, if the cw has been modified).
def pycross.gui.MainWindow.on_act_save | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_save: saves current crossword to the same file it was opened from and resets its modified status to False
.
def pycross.gui.MainWindow.on_act_saveas | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_saveas: shows a Save As dialog and saves current crossword to the selected file and resets its modified status to False
.
def pycross.gui.MainWindow.on_act_share | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_share: shares current crossword in social networks.
The share dialog MainWindow::dia_share is shown for user to configure the sharing settings.
def pycross.gui.MainWindow.on_act_stats | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_stats: shows the current crossword's statistics.
The stats is accumulated with Wordgrid::update_stats() and includes the following data:
* word count * completed word count * blank word count * Down word count * Across word count * words with completed clues count
The data is visualized as an HTML chart in the inbuilt or system web browser.
def pycross.gui.MainWindow.on_act_stop | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_stop: stops the currently running operation(s).
These operations can be either cw generation or cw sharing, which run in a separate thread, to avoid blocking the UI.
def pycross.gui.MainWindow.on_act_stop_changed | ( | self | ) |
On Changed slot for MainWindow::act_stop.
Hides or shows the Stop button in the status bar based on the action's visibility.
def pycross.gui.MainWindow.on_act_suggest | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_suggest: brings up a list of words for the selected one in the grid and lets the user place it into the grid.
def pycross.gui.MainWindow.on_act_undo | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_undo: undoes last operation.
def pycross.gui.MainWindow.on_act_undo_hovered | ( | self | ) |
Slot for MainWindow::act_undo::hovered: updates the tooltip for the Undo action when hovered.
def pycross.gui.MainWindow.on_act_update | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_update: checks for app updates on the server (github).
If a new version is available and the user accepts it, the app will close down and update itself, then start up again.
def pycross.gui.MainWindow.on_act_view_showtoolbar | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_view_showtoolbar: shows or hides the main toolbar.
def pycross.gui.MainWindow.on_act_wsrc | ( | self, | |
checked | |||
) |
Slot for MainWindow::act_wsrc: opens the word source settings to let the use choose / add word sources for crossword generation.
def pycross.gui.MainWindow.on_before_update | ( | self, | |
old_version, | |||
new_version | |||
) |
Fires when the application is about to update.
old_version | str the current app version |
new_version | str the new app version found on the server |
bool
True
if user accepts the update or False
otherwise def pycross.gui.MainWindow.on_clues_editor_commit | ( | self, | |
editor | |||
) |
Fires every time a cell in clues table has been edited (manually) and is about to write data back to the underlying model.
We implement this slot to validate the entered text, update the CW grid and the clues table.
editor | QtWidgets.QWidget the internal widget used for editing the clue item (here = QLineEdit) |
def pycross.gui.MainWindow.on_combo_lang | ( | self, | |
index | |||
) |
Fires when a new language in the language combo is picked.
index | int the selected index in the language combo |
def pycross.gui.MainWindow.on_cw_current_item_changed | ( | self, | |
current, | |||
previous | |||
) |
Fires when a new cw grid cell is focused.
current | QtWidgets.QTableWidgetItem the currently focused cell |
previous | QtWidgets.QTableWidgetItem the previously focused cell |
def pycross.gui.MainWindow.on_cw_deselect | ( | self | ) |
def pycross.gui.MainWindow.on_cw_item_clicked | ( | self, | |
item | |||
) |
Fires when a cw grid cell is clicked (pressed).
item | QtWidgets.QTableWidgetItem the pressed cell |
def pycross.gui.MainWindow.on_cw_key | ( | self, | |
QtGui.QKeyEvent | event | ||
) |
Fires when a key is pressed in the crossword grid.
event | QtGui.QKeyEvent the handled event |
def pycross.gui.MainWindow.on_filter_word | ( | self, | |
str | word | ||
) |
Default word source filter for Crossword constructor.
bool
set to True
(don't use any extra filters) def pycross.gui.MainWindow.on_gen_error | ( | self, | |
thread, | |||
err | |||
) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has encountered an error.
thread | QtCore.QThread the generation thread object (GenThread) |
err | str the error message |
def pycross.gui.MainWindow.on_gen_progress | ( | self, | |
cw_, | |||
complete_, | |||
total_ | |||
) |
Slot fires to show progress of cw generation thread (MainWindow::gen_thread).
cw_ | crossword::Crossword pointer to the crossword::Crossword object that runs the generation |
complete_ | int number of completed (filled) words |
total_ | int total number of words in cw grid |
def pycross.gui.MainWindow.on_gen_stop | ( | self | ) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has been stopped.
def pycross.gui.MainWindow.on_gen_timeout | ( | self, | |
timeout_ | |||
) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has timed out.
timeout_ | float timeout in (fractions of) seconds |
def pycross.gui.MainWindow.on_gen_validate | ( | self, | |
bad_ | |||
) |
Slot fires when the cw generator has completed and needs to validate the words in the grid.
bad_ | list list of words str that haven't passed validation (not found in active word sources) |
def pycross.gui.MainWindow.on_generate_finish | ( | self | ) |
Slot fires when the cw generation thread (MainWindow::gen_thread) has completed.
def pycross.gui.MainWindow.on_generate_start | ( | self | ) |
Slot fires when the cw generation thread (MainWindow::gen_thread) starts up.
Performs preliminary UI element setups.
def pycross.gui.MainWindow.on_get_recent | ( | self, | |
new_version | |||
) |
Callback for MainWindow::updater, fires when a new release is found.
new_version | str new version found on the server, e.g. '1.1' |
def pycross.gui.MainWindow.on_menu_redo_triggered | ( | self, | |
action | |||
) |
On triggered event handler for the Redo action menu.
Fires when the user clicks on an operation on the Redo history dropdown menu, ultimately redoing all previous operations and moving them from the Redo back to the Undo history.
action | QtWudgets.QAction the triggered action (operation) |
def pycross.gui.MainWindow.on_menu_undo_triggered | ( | self, | |
action | |||
) |
On triggered event handler for the Undo action menu.
Fires when the user clicks on an operation on the Undo history dropdown menu, ultimately undoing all previous operations and moving them from the Undo to the Redo history.
action | QtWudgets.QAction the triggered action (operation) |
def pycross.gui.MainWindow.on_norecent | ( | self | ) |
Fires when the updater has found no newer versions on the server.
def pycross.gui.MainWindow.on_pop_redo | ( | self, | |
histmgr, | |||
cmd | |||
) |
Redo pop event handler for MainWindow::undomgr.
Fires when the last operation is removed from the Redo history.
histmgr | utils::undo::CommandManager pointer to the history manager |
cmd | utils::undo::Operation pointer to the operation being removed |
def pycross.gui.MainWindow.on_pop_undo | ( | self, | |
histmgr, | |||
cmd | |||
) |
Undo pop event handler for MainWindow::undomgr.
Fires when the last operation is removed from the Undo history.
histmgr | utils::undo::CommandManager pointer to the history manager |
cmd | utils::undo::Operation pointer to the operation being removed |
def pycross.gui.MainWindow.on_preview_paint | ( | self, | |
printer | |||
) |
Prints current crossword (and optionally clues) to print preview form.
This slot is connected to print preview dialog's paintRequested() signal.
printer | QtPrintSupport.QPrinter the printer object |
def pycross.gui.MainWindow.on_push_redo | ( | self, | |
histmgr, | |||
cmd | |||
) |
Redo push event handler for MainWindow::undomgr.
Fires when a new operation is added to the Redo history.
histmgr | utils::undo::CommandManager pointer to the history manager |
cmd | utils::undo::Operation pointer to the operation being added |
def pycross.gui.MainWindow.on_push_undo | ( | self, | |
histmgr, | |||
cmd | |||
) |
Undo push event handler for MainWindow::undomgr.
Fires when a new operation is added to the Undo history.
histmgr | utils::undo::CommandManager pointer to the history manager |
cmd | utils::undo::Operation pointer to the operation being added |
def pycross.gui.MainWindow.on_share_apikey_required | ( | self, | |
res | |||
) |
Slot fires when the sharer (MainWindow::share_thread) must ask user for an API key.
res | list input data for the request handler: res[0] = API key entered by user str res[1] = user dialog result bool : True = OK, False = Cancel |
def pycross.gui.MainWindow.on_share_bearer_required | ( | self, | |
res | |||
) |
Slot fires when the sharer (MainWindow::share_thread) must ask user for a Bearer Token.
res | list input data for the request handler: res[0] = Bearer Token entered by user str res[1] = user dialog result bool : True = OK, False = Cancel |
def pycross.gui.MainWindow.on_share_clipboard_write | ( | self, | |
url | |||
) |
Slot fires when the sharer has copied the destination URL of the shared file to the clipboard.
url | str the destination URL where the file is uploaded |
def pycross.gui.MainWindow.on_share_error | ( | self, | |
thread, | |||
err | |||
) |
Slot fires when the sharer (MainWindow::share_thread) has encountered an error.
thread | QtCore.QThread the sharer thread (ShareThread) |
err | str the error message |
def pycross.gui.MainWindow.on_share_finish | ( | self | ) |
Slot fires when the sharer (MainWindow::share_thread) has completed its operation.
def pycross.gui.MainWindow.on_share_no_user | ( | self, | |
cloud, | |||
username | |||
) |
Slot fires when the sharer detects that there is no current username assigned.
cloud | utils::onlineservices::Cloudstorage pointer to the cloud object |
username | list created / found username [OUT] - empty list must be passed! |
def pycross.gui.MainWindow.on_share_prepare_url | ( | self, | |
url | |||
) |
Slot fires when the sharer has prepared the URL for sharing on a social network.
url | str the sharing URL generated by sharer (specific to the selected social network) |
def pycross.gui.MainWindow.on_share_progress | ( | self, | |
percent, | |||
status | |||
) |
Slot fires during the sharing thread's progress.
percent | int percent complete |
status | str status message to show in status bar |
def pycross.gui.MainWindow.on_share_run | ( | self | ) |
Main worker slot (function) for the sharer thread (MainWindow::share_thread).
def pycross.gui.MainWindow.on_share_start | ( | self | ) |
Slot fires when the share thread (MainWindow::share_thread) starts up.
Clears status bar messages and updates actions.
def pycross.gui.MainWindow.on_share_upload | ( | self, | |
filepth, | |||
url | |||
) |
Slot fires when MainWindow::share_thread has uploaded the file (crossword) to the cloud storage.
filepth | str the source file full path |
url | str the destination URL where the file is uploaded |
def pycross.gui.MainWindow.on_slider_cw_scale | ( | self, | |
value | |||
) |
Fires when MainWindow::slider_cw_scale is moved: rescales the crossword grid.
value | int the MainWindow::slider_cw_scale value (scale %) |
def pycross.gui.MainWindow.on_statusbar_l2_dblclicked | ( | self, | |
event | |||
) |
Fires when MainWindow::statusbar_l2 is double-clicked.
When double-clicked on the app version (if a new version is available), the updater is launched.
def pycross.gui.MainWindow.on_toolbar_contextmenu | ( | self, | |
point | |||
) |
Fires when the custom context meny is requested on the main toolbar.
point | QtCore.QPoint the current cursor position (relative to toolbar coordinates) |
def pycross.gui.MainWindow.on_tvClues_column_moved | ( | self, | |
logicalIndex, | |||
oldVisualIndex, | |||
newVisualIndex | |||
) |
Fires when the clues table columns have been moved by dragging.
logicalIndex | int the column's logical (independent) index |
oldVisualIndex | int the column's previous position (as seen in the table) |
newVisualIndex | int the column's new position (as seen in the table) |
def pycross.gui.MainWindow.on_tvClues_contextmenu | ( | self, | |
point | |||
) |
Fires when the custom context meny is requested on the Clues panel.
point | QtCore.QPoint the current cursor position (relative to grid coordinates) |
def pycross.gui.MainWindow.on_tvClues_current_changed | ( | self, | |
current, | |||
previous | |||
) |
Fires when the currenly selected clue item in MainWindow::tvClues has changed.
current | QtCore.QModelIndex the currently selected items |
previous | QtCore.QModelIndex the previously selected items |
def pycross.gui.MainWindow.on_tvClues_header_contextmenu | ( | self, | |
point | |||
) |
Fires when the custom context meny is requested on the Clues panel header.
point | QtCore.QPoint the current cursor position (relative to grid coordinates) |
def pycross.gui.MainWindow.on_tvClues_selected | ( | self, | |
selected, | |||
deselected | |||
) |
Fires when one or severals clue rows are selected in MainWindow::tvClues.
selected | QtCore.QItemSelection the selected items |
deselected | QtCore.QItemSelection the deselected items |
def pycross.gui.MainWindow.on_twCw_contextmenu | ( | self, | |
point | |||
) |
Fires when the custom context meny is requested on the crossword grid.
point | QtCore.QPoint the current cursor position (relative to grid coordinates) |
def pycross.gui.MainWindow.open_cw | ( | self, | |
selected_path, | |||
save_history = True |
|||
) |
Loads the crossword (MainWindow::cw) from a given file.
selected_path | str the full file path to the file from which the crossword is loaded |
save_history | bool True (default) to make this action undoable by saving it to the Undo history; if set to False , the action will not be undoable |
def pycross.gui.MainWindow.options | ( | self | ) |
Util method to get the global settings dictionary.
guisettings.CWSettings
global settings dictionary def pycross.gui.MainWindow.paintEvent | ( | self, | |
QtGui.QPaintEvent | event | ||
) |
Fires on window repaint request.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QPaintEvent the handled event |
def pycross.gui.MainWindow.print_cw | ( | self, | |
pdf_file = None , |
|||
show_preview = True |
|||
) |
Prints current crossword (and optionally clues) to file or printer.
pdf_file | str | None path to PDF file or None to print to a physical printer |
show_preview | bool True to show print preview dialog - see forms::PrintPreviewDialog |
def pycross.gui.MainWindow.reformat_cells | ( | self | ) |
Updates the internal formatting (colors, fonts) of the crossword grid.
def pycross.gui.MainWindow.reformat_clues | ( | self | ) |
Sets formatting in clues table according to word status (filled / empty).
def pycross.gui.MainWindow.resizeEvent | ( | self, | |
QtGui.QResizeEvent | event | ||
) |
Fires when the window has been resized.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QResizeEvent the handled event |
def pycross.gui.MainWindow.save_cw | ( | self, | |
filepath = None , |
|||
file_type = None |
|||
) |
Saves / exports the current crossword (MainWindow::cw) to a given file and file type.
def pycross.gui.MainWindow.scale_cw | ( | self, | |
scale_factor = 100 , |
|||
update_label = True , |
|||
save_history = False |
|||
) |
Changes the scale of the crossword grid.
scale_factor | int the scale factor in percent values |
update_label | bool whether to update the caption below the scale slider |
save_history | bool True (default) to make this action undoable by saving it to the Undo history; if set to False , the action will not be undoable |
def pycross.gui.MainWindow.select_clue | ( | self | ) |
Selects (and if necessary scrolls to) the clue item corresponding to the currently selected word.
def pycross.gui.MainWindow.set_cell_formatting | ( | self, | |
QtWidgets.QTableWidgetItem | cell_item | ||
) |
Updates the internal formatting (colors, fonts) in the crossword grid for a given cell.
cell_item | QtWidgets.QTableWidgetItem the cell that must be formatted |
def pycross.gui.MainWindow.set_selected_lang | ( | self | ) |
Writes the current interface language into the global settings.
def pycross.gui.MainWindow.share_url | ( | self, | |
url, | |||
headers = {'Content-Type': 'application/json'} , |
|||
error_keymap = Share.ERRMAP |
|||
) |
Opens a share link in inbuilt or external browser (for sharing)
url | str the share URL generated by MainWindow::sharer |
headers | dict HTTP headers passed to the request |
error_keymap | dict error code-to-message mapping |
def pycross.gui.MainWindow.showEvent | ( | self, | |
event | |||
) |
Fires when the window is about to show.
event | QtGui.QShowEvent the handled event |
def pycross.gui.MainWindow.stop_all_threads | ( | self | ) |
Stops all running threads.
def pycross.gui.MainWindow.tabletEvent | ( | self, | |
QtGui.QTabletEvent | event | ||
) |
Tablet PC / smartphone event handler (such as XY-axis position, pressure, rotation etc).
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QTabletEvent the handled event |
def pycross.gui.MainWindow.toolbar_from_settings | ( | self | ) |
Fills main toolbar from app settings (CWSettings::settings).
def pycross.gui.MainWindow.UI_create_central_widget | ( | self | ) |
Creates the main UI elements: the crossword grid and clues table.
def pycross.gui.MainWindow.UI_create_context_menus | ( | self | ) |
Creates all context menus for main window.
def pycross.gui.MainWindow.UI_create_lang_combo | ( | self | ) |
Creates the langugage combo box and fills it with supported languages.
def pycross.gui.MainWindow.UI_create_menu | ( | self | ) |
Creates the application's main menu.
def pycross.gui.MainWindow.UI_create_statusbar | ( | self | ) |
Creates the main window's status bar.
def pycross.gui.MainWindow.UI_create_toolbar | ( | self | ) |
Creates the app's main toolbar (which can also be hidden in settings).
def pycross.gui.MainWindow.update_actions | ( | self | ) |
Updates the enabled
property of each action depending on which actions are currently available.
def pycross.gui.MainWindow.update_clue_column_settings | ( | self | ) |
Updates the settings (CWSettings::settings) with current clue table's column parameters.
def pycross.gui.MainWindow.update_clue_replies | ( | self, | |
coord | |||
) |
Updates the reply values in clues table for given grid coordinate.
coord | 2-tuple the grid coordinate (see crossword::Coords) |
def pycross.gui.MainWindow.update_clues_model | ( | self | ) |
Updates (regenerates) the clues table from the clues contained in the current crossword.
def pycross.gui.MainWindow.update_current_word | ( | self, | |
on_intersect = 'current' |
|||
) |
Updates the currently selected word in the grid and clues table.
on_intersect | str one of:
|
def pycross.gui.MainWindow.update_cw | ( | self, | |
rescale = True |
|||
) |
Updates cw data and view.
rescale | bool whether rescaling the grid is required |
def pycross.gui.MainWindow.update_cw_grid | ( | self | ) |
Updates (fills) the crossword grid from the internal crossword::Crossword object (self.cw).
This function resizes, fills the grid, updates the cell formatting and updates (fills) the clues table.
def pycross.gui.MainWindow.update_cw_params | ( | self | ) |
Updates the core settings of MainWindow::cw (internal crossword::Crossword instance) from CWSettings::settings.
def pycross.gui.MainWindow.update_settings_before_quit | ( | self | ) |
Updates the required GUI settings in the settings file before the application quits (to restore them upon next startup).
def pycross.gui.MainWindow.update_wordsrc | ( | self | ) |
Updates MainWindow::wordsrc from the global settings in CWSettings::settings.
def pycross.gui.MainWindow.wheelEvent | ( | self, | |
QtGui.QWheelEvent | event | ||
) |
Fires when the mouse wheel is scrolled on the focused window.
Default implementation here as a placeholder for possible overrides in custom plugins.
event | QtGui.QWheelEvent the handled event |
pycross.gui.MainWindow.act_about |
QtWidgets.QAction
show About action
pycross.gui.MainWindow.act_addcol |
QtWidgets.QAction
add column action
pycross.gui.MainWindow.act_addrow |
QtWidgets.QAction
add row action
pycross.gui.MainWindow.act_apiref |
QtWidgets.QAction
show API reference action
pycross.gui.MainWindow.act_clear |
QtWidgets.QAction
grid clear action
pycross.gui.MainWindow.act_clear_wd |
QtWidgets.QAction
clear word action
pycross.gui.MainWindow.act_clearclues |
QtWidgets.QAction
clear clues action
pycross.gui.MainWindow.act_close |
QtWidgets.QAction
crossword close action
pycross.gui.MainWindow.act_config |
QtWidgets.QAction
configure settings action
pycross.gui.MainWindow.act_contact |
QtWidgets.QAction
contact action
pycross.gui.MainWindow.act_delcol |
QtWidgets.QAction
delete column action
pycross.gui.MainWindow.act_delrow |
QtWidgets.QAction
delete row action
pycross.gui.MainWindow.act_edit |
QtWidgets.QAction
crossword edit action (toggle editing mode)
pycross.gui.MainWindow.act_editclue |
QtWidgets.QAction
go to clue action
pycross.gui.MainWindow.act_erase_wd |
QtWidgets.QAction
erase word action
pycross.gui.MainWindow.act_exit |
QtWidgets.QAction
quit application action
pycross.gui.MainWindow.act_fitgrid |
QtWidgets.QAction
fit grid in window action
pycross.gui.MainWindow.act_gen |
QtWidgets.QAction
crossword generate (fill) action
pycross.gui.MainWindow.act_grid_blank |
QtWidgets.QAction
clear selected cells action (put crossword::BLANK)
pycross.gui.MainWindow.act_grid_filler |
QtWidgets.QAction
block selected cells action (put crossword::FILLER)
pycross.gui.MainWindow.act_grid_filler2 |
QtWidgets.QAction
grey out selected cells action (put crossword::FILLER2)
pycross.gui.MainWindow.act_grid_multiselect |
QtWidgets.QAction
toggle grid Multiselect mode action
pycross.gui.MainWindow.act_help |
QtWidgets.QAction
show help docs action
pycross.gui.MainWindow.act_info |
QtWidgets.QAction
show / edit crossword info action
pycross.gui.MainWindow.act_lookup |
QtWidgets.QAction
lookup word action
pycross.gui.MainWindow.act_new |
QtWidgets.QAction
new crossword action
pycross.gui.MainWindow.act_open |
QtWidgets.QAction
open crossword (file) action
pycross.gui.MainWindow.act_print |
QtWidgets.QAction
print (cw / clues) action
pycross.gui.MainWindow.act_redo |
QtWidgets.QAction
redo action – see utils::undo
pycross.gui.MainWindow.act_reflect |
QtWidgets.QAction
reflect (duplicate) grid action
pycross.gui.MainWindow.act_reload |
QtWidgets.QAction
crossword reload (from file) action
pycross.gui.MainWindow.act_save |
QtWidgets.QAction
crossword save action
pycross.gui.MainWindow.act_saveas |
QtWidgets.QAction
crossword save as (export) action
pycross.gui.MainWindow.act_share |
QtWidgets.QAction
crossword share action
pycross.gui.MainWindow.act_stats |
QtWidgets.QAction
show crossword stats action
pycross.gui.MainWindow.act_stop |
QtWidgets.QAction
stop (current operation) action
pycross.gui.MainWindow.act_suggest |
QtWidgets.QAction
suggest word action
pycross.gui.MainWindow.act_undo |
QtWidgets.QAction
undo action – see utils::undo
pycross.gui.MainWindow.act_update |
QtWidgets.QAction
check for update action
pycross.gui.MainWindow.act_view_showtoolbar |
QtWidgets.QAction
show toolbar action
pycross.gui.MainWindow.act_wsrc |
QtWidgets.QAction
edit word sources action
pycross.gui.MainWindow.btn_act_redo |
pycross.gui.MainWindow.btn_act_undo |
pycross.gui.MainWindow.btn_fitgrid |
QtWidgets.QToolButton
fit grid in window button
pycross.gui.MainWindow.cluesmodel |
QtGui.QStandardItemModel
underlying data model for MainWindow::tvClues
pycross.gui.MainWindow.combo_lang |
QtWidgets.QComboBox
UI language combo
pycross.gui.MainWindow.current_word |
Word
currently selected word in grid
pycross.gui.MainWindow.cw |
crossword::Crossword
internal crossword generator object
pycross.gui.MainWindow.cw_file |
str
currently opened cw file
pycross.gui.MainWindow.cw_modified |
bool
flag showing that current cw has been changed since last save
pycross.gui.MainWindow.cw_widget |
QtWidgets.QWidget
cw layout container
pycross.gui.MainWindow.dia_about |
About dialog.
pycross.gui.MainWindow.dia_info |
crossword information edit dialog
pycross.gui.MainWindow.dia_load |
forms::LoadCwDialog
CW load dialog
pycross.gui.MainWindow.dia_lookup |
word meaning lookup dialog
pycross.gui.MainWindow.dia_reflect |
forms::ReflectGridDialog
reflect / duplicate dialog
pycross.gui.MainWindow.dia_settings |
forms::SettingsDialog
instance (settings window)
pycross.gui.MainWindow.dia_share |
share settings dialog
pycross.gui.MainWindow.garbage |
list
files to delete on startup / close
pycross.gui.MainWindow.gen_thread |
GenThread
cw generation worker thread
pycross.gui.MainWindow.l_cw_scale |
QtWidgets.QLabel
cw table scale indicator
pycross.gui.MainWindow.last_pressed_item |
QtWidgets.QTableWidgetItem
last pressed cell in cw grid
pycross.gui.MainWindow.layout_cw_scale |
QtWidgets.QHBoxLayout
cw table scale layout
pycross.gui.MainWindow.layout_vcw |
QtWidgets.QVBoxLayout
cw layout
pycross.gui.MainWindow.menu_crossword |
forms::CrosswordMenu
context menu for MainWindow::twCw
pycross.gui.MainWindow.menu_main |
QtWidgets.QMenu
UI main menu
pycross.gui.MainWindow.menu_main_edit |
QtWidgets.QMenu
'Edit' menu
pycross.gui.MainWindow.menu_main_file |
QtWidgets.QMenu
'File' menu
pycross.gui.MainWindow.menu_main_gen |
QtWidgets.QMenu
'Generate' menu
pycross.gui.MainWindow.menu_main_help |
QtWidgets.QMenu
'Help' menu
pycross.gui.MainWindow.menu_main_view |
QtWidgets.QMenu
'View' menu
pycross.gui.MainWindow.menu_redo |
QtWidgets.QMenu
dropdown menu for Redo button
pycross.gui.MainWindow.menu_undo |
QtWidgets.QMenu
dropdown menu for Undo button
pycross.gui.MainWindow.plugin_mgr |
utils::pluginmanager::PxPluginManager
plugin manager instance to operate user plugins
pycross.gui.MainWindow.saved_cw |
list
temporary saved crossword words (crossword::Word objects)
pycross.gui.MainWindow.share_thread |
ShareThread
sharer worker thread
pycross.gui.MainWindow.sharer |
utils::onlineservices::Share
object
utils::onlineservices::Share instance used for cloud upload / sharing
pycross.gui.MainWindow.slider_cw_scale |
QtWidgets.QSlider
cw scale slider
pycross.gui.MainWindow.splitter1 |
QtWidgets.QSplitter
central widget
pycross.gui.MainWindow.statusbar |
QtWidgets.QStatusBar
main status bar
pycross.gui.MainWindow.statusbar_btnstop |
QtWidgets.QToolButton
stop current operation button
pycross.gui.MainWindow.statusbar_l1 |
QtWidgets.QLabel
status bar text 1 (app version)
pycross.gui.MainWindow.statusbar_l2 |
forms::ClickableLabel
status bar text 2 (other messages)
pycross.gui.MainWindow.statusbar_pbar |
QtWidgets.QProgressBar
progress bar inside status bar (hidden by default)
pycross.gui.MainWindow.syneditor |
utils::synteditor::SynEditorWidget
inbuilt python code editor
pycross.gui.MainWindow.threads |
list
thread list to keep track of all spawned threads
pycross.gui.MainWindow.toolbar_grid |
QtWidgets.QToolBar
grid edit toolbar
pycross.gui.MainWindow.toolbar_main |
QtWidgets.QToolBar
main toolbar
pycross.gui.MainWindow.tvClues |
QtWidgets.QTreeView
clues table
pycross.gui.MainWindow.twCw |
forms::CwTable
cw grid
pycross.gui.MainWindow.undomgr |
utils::undo::CommandManager
undo / redo history manager
pycross.gui.MainWindow.updater |
utils::update::Updater
instance (used to run app update checks and updates)
pycross.gui.MainWindow.wordsrc |
wordsrc::MultiWordsource
word source instance