pycrossword  0.4
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | Public Attributes | Private Member Functions | List of all members
pycross.gui.MainWindow Class Reference

The application's main GUI window. More...

Inheritance diagram for pycross.gui.MainWindow:

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_whatsthis
 QtWidgets.QAction Whats This action (click on control to show help) 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...
 

Detailed Description

The application's main GUI window.

Constructor & Destructor Documentation

◆ __init__()

def pycross.gui.MainWindow.__init__ (   self,
**  kwargs 
)

Initializes class members.

Member Function Documentation

◆ _apply_macros()

def pycross.gui.MainWindow._apply_macros (   self,
  txt,
  grid 
)
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
 
Parameters
txtstr the text containing macros
gridcrossword::Wordgrid the crossword::Wordgrid object (crosword grid)
Returns
str text after macro replacements

◆ _clue_items_from_word()

def pycross.gui.MainWindow._clue_items_from_word (   self,
Word  word 
)
private

Returns items from a single row in the clues table corresponding to the given Word object.

Parameters
wordWord a Word instance (representing a single word in the crossword)
Returns
dict clue items as a dict:
{'num': num, 'text': 'word string', 'clue': 'clue string'}

◆ _col_setting_by_logical_index()

def pycross.gui.MainWindow._col_setting_by_logical_index (   self,
  index 
)
private

Gets the clue table column settings from CWSettings::settings given its logical index.

Parameters
indexint the logical column index (independent of manual column reordering in the view)
Returns
dict the corresponding column's settings found in ‘CWSettings::settings['clues’]['columns']`

◆ _item_in_word()

def pycross.gui.MainWindow._item_in_word (   self,
QtWidgets.QTableWidgetItem  cell_item,
Word  word 
)
private

Checks if a given cw grid cell is found in a given Word instance.

◆ _localize_colname()

def pycross.gui.MainWindow._localize_colname (   self,
  name 
)
private

Helper method that returns the localized column names for the Clues panel.

◆ _log()

def pycross.gui.MainWindow._log (   self,
  what,
  end = '\n' 
)
private

Simple util method to print stuff to console.

Parameters
whatstr message body
endstr line ending

◆ _logical_col_by_name()

def pycross.gui.MainWindow._logical_col_by_name (   self,
  colname 
)
private

Gets the logical column number of clues table by the column header (title).

Parameters
colnamestr the column title (must be the original English name!)
Returns
int the logical column index (independent of manual column reordering in the view)

◆ _paint_cwgrid()

def pycross.gui.MainWindow._paint_cwgrid (   self,
  painter,
  cliprect = None,
  clear_cw = True 
)
private

Paints cw grid by QtGui.QPainter object, constrained by cliprect (QRectF).

Parameters
painterQtGui.QPainter the painter object
cliprectQtCore.Qt.QRectF clip rectangle inside which the painting will be made
clear_cwbool whether to clear all words from the crossword before painting (words will be restored after the painting has finished)

◆ _put_grid_char()

def pycross.gui.MainWindow._put_grid_char (   self,
  character 
)
private

Puts a given charactr into the currently selected crossword cells.

Parameters
characterstr the character (letter) to place

◆ _save_cw()

def pycross.gui.MainWindow._save_cw (   self,
  filepath = None,
  file_type = None 
)
private

Util function to save or export current crossword to a given file and file type.

Parameters
filepathstr 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_typestr | 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

◆ _word_from_clue_item()

def pycross.gui.MainWindow._word_from_clue_item (   self,
QtGui.QStandardItem  item 
)
private

Returns Word object from self.cw corresponding to the given clue item.

Parameters
itemQtGui.QStandardItem the item in the clues table

◆ actionEvent()

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.

Parameters
eventQtGui.QActionEvent the handled event

◆ adjust_clues_header_columns()

def pycross.gui.MainWindow.adjust_clues_header_columns (   self)

Applies clues header column widths from CWSettings::settings.

◆ apply_config()

def pycross.gui.MainWindow.apply_config (   self,
  save_settings = True,
  autoloadcw = True 
)

Applies settings found in CWSettings::settings and updates the settings file.

◆ autoload_cw()

def pycross.gui.MainWindow.autoload_cw (   self)

Loads self.cw from the default autosave file (utils::globalvars::SAVEDCW_FILE) if present.

◆ autosave_cw()

def pycross.gui.MainWindow.autosave_cw (   self)

Saves the currently open crossword (MainWindow::cw) to the default autosave file (utils::globalvars::SAVEDCW_FILE).

◆ changeEvent()

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.

Parameters
eventQtCore.QEvent the handled event

◆ check_save_required()

def pycross.gui.MainWindow.check_save_required (   self,
  cancellable = True 
)

Checks if the current crossword has been modified and asks user to save it.

Parameters
cancellablebool whether the save dialog can be cancelled by user
Returns
str user's reply from the request dialog, e.g. 'yes' or 'no'

◆ close_cw()

def pycross.gui.MainWindow.close_cw (   self,
  save_history = True 
)

Closes the currently open crossword (freeing MainWindow::cw).

Parameters
save_historybool True (default) to make this action undoable by saving it to the Undo history; if set to False, the action will not be undoable

◆ closeEvent()

def pycross.gui.MainWindow.closeEvent (   self,
  event 
)

Fires when the window is about to close.

Parameters
eventQtGui.QCloseEvent the handled event

◆ clues_show_hide_cols()

def pycross.gui.MainWindow.clues_show_hide_cols (   self)

Shows or hides columns in the clues table based on current settings.

◆ contextMenuEvent()

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.

Parameters
eventQtGui.QContextMenuEvent the handled event

◆ create_actions()

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.

◆ create_cloud()

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).

Parameters
threadQtCore.QThread the sharer thread (ShareThread)

◆ create_plugin_manager()

def pycross.gui.MainWindow.create_plugin_manager (   self,
  collect_plugins = True 
)

Сreates and returns an instance of the Plugin Manager.

Parameters
mainwindowMainWindow pointer to the app main window
collect_pluginsbool whether to collect all plugins on creation (default)
Returns
utils::pluginmanager::PxPluginManager instance of created Plugin Manager

◆ create_syneditor()

def pycross.gui.MainWindow.create_syneditor (   self,
  source = None,
  show = True,
  modal = False 
)

Creates and optionally shows the inbuilt python code editor.

Parameters
sourcestr | None source code to set in editor (None clears the existing code)
showbool whether to show the editor window
See also
utils::synteditor

◆ cw_resized()

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.

◆ delete_temp_files()

def pycross.gui.MainWindow.delete_temp_files (   self,
  delete_update_log = True 
)

Clears any temps left by the app's previous launches.

Parameters
delete_update_logbool whether to delete the 'update.log' file left from previous update

◆ dragEnterEvent()

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.

Parameters
eventQtGui.QDragEnterEvent the handled event

◆ dragLeaveEvent()

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.

Parameters
eventQtGui.QDragLeaveEvent the handled event

◆ dragMoveEvent()

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.

Parameters
eventQtGui.QDragMoveEvent the handled event

◆ dropEvent()

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.

Parameters
eventQtGui.QDropEvent the handled event

◆ edit_cw_cell()

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().

Parameters
cell_itemQtWidgets.QTableWidgetItem the currently selected grid cell
keyint the pressed key
textstr translated character string (single character)
modifiersflags set of keyboard modifiers (Ctrl, Shift, Alt)
multiselectbool whether the Multiselect mode is on (see MainWindow::act_grid_multiselect)
fix_changesbool whether to reformat the grid according to the changes made

◆ enterEvent()

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.

Parameters
eventQtCore.QEvent the handled event

◆ 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.

Parameters
eventQtCore.QEvent the handled event

◆ execute_cli_args()

def pycross.gui.MainWindow.execute_cli_args (   self,
**  kwargs 
)

Looks for valid command-line commands (to open a file, etc.) and executes them.

Parameters
kwargskeyword arguments commands to execute

◆ export_cw()

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)

Parameters
filepathstr the destination file path
scalefloat output image scale factor

◆ focusInEvent()

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.

Parameters
eventQtGui.QFocusEvent the handled event

◆ focusOutEvent()

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.

Parameters
eventQtGui.QFocusEvent the handled event

◆ generate_cw_worker()

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)

◆ get_word_suggestion()

def pycross.gui.MainWindow.get_word_suggestion (   self,
  wordstr 
)

Shows the Suggest Word dialog (forms::WordSuggestDialog) to suggest variants for a given word.

Parameters
wordstrstr the string representation (mask) of the target word (crossword::FILLER, crossword::FILLER2 and crossword::BLANK symbols are used)
Returns
str | None selected word in suggest dialog or None if nothing was selected (cancelled)

◆ grid_from_file()

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.

Parameters
gridfilestr the full path to the text file containing the cw grid structure
Returns
list list of rows (strings) representing a crossword grid

◆ hideEvent()

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.

Parameters
eventQtGui.QHideEvent the handled event

◆ initUI()

def pycross.gui.MainWindow.initUI (   self,
  autoloadcw = True 
)

Creates all window elements: layouts, panels, toolbars, widgets.

Parameters
autoloadcwbool whether to load crossword automatically from autosave file (utils::globalvars::SAVEDCW_FILE)

◆ inputMethodEvent()

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.

Parameters
eventQtGui.QInputMethodEvent the handled event

◆ keyPressEvent()

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.

Parameters
eventQtGui.QKeyEvent the handled event

◆ keyReleaseEvent()

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.

Parameters
eventQtGui.QKeyEvent the handled event

◆ leaveEvent()

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.

Parameters
eventQtCore.QEvent the handled event

◆ make_cell_item()

def pycross.gui.MainWindow.make_cell_item (   self,
  text,
  icon_text = '' 
)

Creates a crossword cell item (QtWidgets.QTableWidgetItem) with given text and number.

Parameters
textstr the cell text (1 character)
icon_textstr the text of the number caption (default = empty)
Returns
QtWidgets.QTableWidgetItem cell object that can be inserted into MainWindow::twCw

◆ mouseDoubleClickEvent()

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.

Parameters
eventQtGui.QMouseEvent the handled event

◆ mouseMoveEvent()

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.

Parameters
eventQtGui.QMouseEvent the handled event

◆ mousePressEvent()

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.

Parameters
eventQtGui.QMouseEvent the handled event

◆ mouseReleaseEvent()

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.

Parameters
eventQtGui.QMouseEvent the handled event

◆ moveEvent()

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.

Parameters
eventQtGui.QMoveEvent the handled event

◆ nativeEvent()

def pycross.gui.MainWindow.nativeEvent (   self,
  eventType,
  message 
)

Generic NATIVE event handler.

Default implementation here as a placeholder for possible overrides in custom plugins.

Parameters
eventTypeQtCore.QByteArray | bytes type of handled event:
  • for Windows: 'windows_generic_MSG'
  • for macOS: 'NSEvent'
  • for XCB: 'xcb_generic_event_t'
messagevoidptr message received
Returns
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)
See also
Qt docs

◆ on_act_about()

def pycross.gui.MainWindow.on_act_about (   self,
  checked 
)

Slot for MainWindow::act_about: shows the About dialog.

◆ on_act_addcol()

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).

◆ on_act_addrow()

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).

◆ on_act_apiref()

def pycross.gui.MainWindow.on_act_apiref (   self,
  checked 
)

Slot for MainWindow::act_apiref: shows API reference in browser.

◆ on_act_clear()

def pycross.gui.MainWindow.on_act_clear (   self,
  checked 
)

Slot for MainWindow::act_clear: clears the current crossword.

See also
Crossword::clear()

◆ on_act_clear_wd()

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.

See also
Compare with on_act_erase_wd() that erases all letters in the word. Also see Crossword::clear_word()

◆ on_act_clearclues()

def pycross.gui.MainWindow.on_act_clearclues (   self,
  checked 
)

Slot for MainWindow::act_clearclues: clears all clues from crossword.

◆ on_act_close()

def pycross.gui.MainWindow.on_act_close (   self,
  checked 
)

Slot for MainWindow::act_close: closes current crossword calling close_cw().

◆ on_act_config()

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()

◆ on_act_contact()

def pycross.gui.MainWindow.on_act_contact (   self,
  checked 
)

Slot for MainWindow::act_contact: shows form to contact author, i.e.

me :)).

◆ on_act_delcol()

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).

◆ on_act_delrow()

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).

◆ on_act_edit()

def pycross.gui.MainWindow.on_act_edit (   self,
  checked 
)

Slot for MainWindow::act_edit: updates cell formatting in crossword and actions.

◆ on_act_editclue()

def pycross.gui.MainWindow.on_act_editclue (   self,
  checked 
)

Slot for MainWindow::act_editclue: activates the editing mode for the current word's clue.

◆ on_act_erase_wd()

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.

See also
Also see Crossword::clear_word()

◆ on_act_exit()

def pycross.gui.MainWindow.on_act_exit (   self,
  checked 
)

Slot for MainWindow::act_exit: quits the application calling close() on the main window.

◆ on_act_fitgrid()

def pycross.gui.MainWindow.on_act_fitgrid (   self,
  checked 
)

Slot for MainWindow::act_fitgrid: fits the crossword grid in the window size.

◆ on_act_gen()

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.

See also
Crossword::generate()

◆ on_act_grid_blank()

def pycross.gui.MainWindow.on_act_grid_blank (   self,
  checked 
)

Slot for MainWindow::act_grid_blank: makes selected cells blank (clears them).

◆ on_act_grid_filler()

def pycross.gui.MainWindow.on_act_grid_filler (   self,
  checked 
)

Slot for MainWindow::act_grid_filler: makes selected cells filled with FILLER.

◆ on_act_grid_filler2()

def pycross.gui.MainWindow.on_act_grid_filler2 (   self,
  checked 
)

Slot for MainWindow::act_grid_filler2: makes selected cells filled with FILLER2.

◆ on_act_grid_multiselect()

def pycross.gui.MainWindow.on_act_grid_multiselect (   self,
  checked 
)

Slot for MainWindow::act_grid_multiselect: toggle multi cell selection.

◆ on_act_help()

def pycross.gui.MainWindow.on_act_help (   self,
  checked 
)

Slot for MainWindow::act_help: opens up the Help documentation.

◆ on_act_info()

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.

See also
CwInfoDialog

◆ on_act_lookup()

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.

◆ on_act_new()

def pycross.gui.MainWindow.on_act_new (   self,
  checked 
)

Slot for MainWindow::act_new: creates a new crossword from file, structure or parameters.

◆ on_act_open()

def pycross.gui.MainWindow.on_act_open (   self,
  checked 
)

Slot for MainWindow::act_open: loads crossword from a file (showing an Open File dialog).

See also
open_cw()

◆ on_act_print()

def pycross.gui.MainWindow.on_act_print (   self,
  checked 
)

Slot for MainWindow::act_print: prints current CW and/or clues to printer or PDF.

See also
print_cw()

◆ on_act_redo()

def pycross.gui.MainWindow.on_act_redo (   self,
  checked 
)

Slot for MainWindow::act_redo: redoes last operation.

◆ on_act_redo_hovered()

def pycross.gui.MainWindow.on_act_redo_hovered (   self)

Slot for MainWindow::act_redo::hovered: updates the tooltip for the Redo action when hovered.

◆ on_act_reflect()

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).

◆ on_act_reload()

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).

◆ on_act_save()

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.

See also
save_cw()

◆ on_act_saveas()

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.

See also
save_cw()

◆ on_act_share()

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.

◆ on_act_stats()

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.

◆ on_act_stop()

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.

See also
stop_all_threads()

◆ on_act_stop_changed()

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.

◆ on_act_suggest()

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.

See also
get_word_suggestion()

◆ on_act_undo()

def pycross.gui.MainWindow.on_act_undo (   self,
  checked 
)

Slot for MainWindow::act_undo: undoes last operation.

◆ on_act_undo_hovered()

def pycross.gui.MainWindow.on_act_undo_hovered (   self)

Slot for MainWindow::act_undo::hovered: updates the tooltip for the Undo action when hovered.

◆ on_act_update()

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.

See also
MainWindow::updater

◆ on_act_view_showtoolbar()

def pycross.gui.MainWindow.on_act_view_showtoolbar (   self,
  checked 
)

Slot for MainWindow::act_view_showtoolbar: shows or hides the main toolbar.

◆ on_act_wsrc()

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.

◆ on_before_update()

def pycross.gui.MainWindow.on_before_update (   self,
  old_version,
  new_version 
)

Fires when the application is about to update.

Parameters
old_versionstr the current app version
new_versionstr the new app version found on the server
Returns
bool True if user accepts the update or False otherwise

◆ on_clues_editor_commit()

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.

Parameters
editorQtWidgets.QWidget the internal widget used for editing the clue item (here = QLineEdit)

◆ on_combo_lang()

def pycross.gui.MainWindow.on_combo_lang (   self,
  index 
)

Fires when a new language in the language combo is picked.

Parameters
indexint the selected index in the language combo

◆ on_cw_current_item_changed()

def pycross.gui.MainWindow.on_cw_current_item_changed (   self,
  current,
  previous 
)

Fires when a new cw grid cell is focused.

Parameters
currentQtWidgets.QTableWidgetItem the currently focused cell
previousQtWidgets.QTableWidgetItem the previously focused cell

◆ on_cw_deselect()

def pycross.gui.MainWindow.on_cw_deselect (   self)

◆ on_cw_item_clicked()

def pycross.gui.MainWindow.on_cw_item_clicked (   self,
  item 
)

Fires when a cw grid cell is clicked (pressed).

Parameters
itemQtWidgets.QTableWidgetItem the pressed cell

◆ on_cw_key()

def pycross.gui.MainWindow.on_cw_key (   self,
QtGui.QKeyEvent  event 
)

Fires when a key is pressed in the crossword grid.

Parameters
eventQtGui.QKeyEvent the handled event
See also
forms::CwTable

◆ on_filter_word()

def pycross.gui.MainWindow.on_filter_word (   self,
str  word 
)

Default word source filter for Crossword constructor.

Returns
bool set to True (don't use any extra filters)

◆ on_gen_error()

def pycross.gui.MainWindow.on_gen_error (   self,
  thread,
  err 
)

Slot fires when the cw generation thread (MainWindow::gen_thread) has encountered an error.

Parameters
threadQtCore.QThread the generation thread object (GenThread)
errstr the error message

◆ on_gen_progress()

def pycross.gui.MainWindow.on_gen_progress (   self,
  cw_,
  complete_,
  total_ 
)

Slot fires to show progress of cw generation thread (MainWindow::gen_thread).

Parameters
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

◆ on_gen_stop()

def pycross.gui.MainWindow.on_gen_stop (   self)

Slot fires when the cw generation thread (MainWindow::gen_thread) has been stopped.

◆ on_gen_timeout()

def pycross.gui.MainWindow.on_gen_timeout (   self,
  timeout_ 
)

Slot fires when the cw generation thread (MainWindow::gen_thread) has timed out.

Parameters
timeout_float timeout in (fractions of) seconds

◆ on_gen_validate()

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.

Parameters
bad_list list of words str that haven't passed validation (not found in active word sources)

◆ on_generate_finish()

def pycross.gui.MainWindow.on_generate_finish (   self)

Slot fires when the cw generation thread (MainWindow::gen_thread) has completed.

◆ on_generate_start()

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.

◆ on_get_recent()

def pycross.gui.MainWindow.on_get_recent (   self,
  new_version 
)

Callback for MainWindow::updater, fires when a new release is found.

Parameters
new_versionstr new version found on the server, e.g. '1.1'

◆ on_menu_redo_triggered()

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.

Parameters
actionQtWudgets.QAction the triggered action (operation)

◆ on_menu_undo_triggered()

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.

Parameters
actionQtWudgets.QAction the triggered action (operation)

◆ on_norecent()

def pycross.gui.MainWindow.on_norecent (   self)

Fires when the updater has found no newer versions on the server.

◆ on_pop_redo()

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.

Parameters
histmgrutils::undo::CommandManager pointer to the history manager
cmdutils::undo::Operation pointer to the operation being removed

◆ on_pop_undo()

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.

Parameters
histmgrutils::undo::CommandManager pointer to the history manager
cmdutils::undo::Operation pointer to the operation being removed

◆ on_preview_paint()

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.

Parameters
printerQtPrintSupport.QPrinter the printer object

◆ on_push_redo()

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.

Parameters
histmgrutils::undo::CommandManager pointer to the history manager
cmdutils::undo::Operation pointer to the operation being added

◆ on_push_undo()

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.

Parameters
histmgrutils::undo::CommandManager pointer to the history manager
cmdutils::undo::Operation pointer to the operation being added

◆ on_share_apikey_required()

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.

Parameters
reslist input data for the request handler: res[0] = API key entered by user str res[1] = user dialog result bool: True = OK, False = Cancel

◆ on_share_bearer_required()

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.

Parameters
reslist input data for the request handler: res[0] = Bearer Token entered by user str res[1] = user dialog result bool: True = OK, False = Cancel

◆ on_share_clipboard_write()

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.

Parameters
urlstr the destination URL where the file is uploaded

◆ on_share_error()

def pycross.gui.MainWindow.on_share_error (   self,
  thread,
  err 
)

Slot fires when the sharer (MainWindow::share_thread) has encountered an error.

Parameters
threadQtCore.QThread the sharer thread (ShareThread)
errstr the error message

◆ on_share_finish()

def pycross.gui.MainWindow.on_share_finish (   self)

Slot fires when the sharer (MainWindow::share_thread) has completed its operation.

◆ on_share_no_user()

def pycross.gui.MainWindow.on_share_no_user (   self,
  cloud,
  username 
)

Slot fires when the sharer detects that there is no current username assigned.

Parameters
cloudutils::onlineservices::Cloudstorage pointer to the cloud object
usernamelist created / found username [OUT] - empty list must be passed!

◆ on_share_prepare_url()

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.

Parameters
urlstr the sharing URL generated by sharer (specific to the selected social network)

◆ on_share_progress()

def pycross.gui.MainWindow.on_share_progress (   self,
  percent,
  status 
)

Slot fires during the sharing thread's progress.

Parameters
percentint percent complete
statusstr status message to show in status bar

◆ on_share_run()

def pycross.gui.MainWindow.on_share_run (   self)

Main worker slot (function) for the sharer thread (MainWindow::share_thread).

◆ on_share_start()

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.

◆ on_share_upload()

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.

Parameters
filepthstr the source file full path
urlstr the destination URL where the file is uploaded

◆ on_slider_cw_scale()

def pycross.gui.MainWindow.on_slider_cw_scale (   self,
  value 
)

Fires when MainWindow::slider_cw_scale is moved: rescales the crossword grid.

Parameters
valueint the MainWindow::slider_cw_scale value (scale %)
See also
scale_cw()

◆ on_statusbar_l2_dblclicked()

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.

See also
on_act_update()

◆ on_toolbar_contextmenu()

def pycross.gui.MainWindow.on_toolbar_contextmenu (   self,
  point 
)

Fires when the custom context meny is requested on the main toolbar.

Parameters
pointQtCore.QPoint the current cursor position (relative to toolbar coordinates)

◆ on_tvClues_column_moved()

def pycross.gui.MainWindow.on_tvClues_column_moved (   self,
  logicalIndex,
  oldVisualIndex,
  newVisualIndex 
)

Fires when the clues table columns have been moved by dragging.

Parameters
logicalIndexint the column's logical (independent) index
oldVisualIndexint the column's previous position (as seen in the table)
newVisualIndexint the column's new position (as seen in the table)
See also
update_clue_column_settings()

◆ on_tvClues_contextmenu()

def pycross.gui.MainWindow.on_tvClues_contextmenu (   self,
  point 
)

Fires when the custom context meny is requested on the Clues panel.

Parameters
pointQtCore.QPoint the current cursor position (relative to grid coordinates)

◆ on_tvClues_current_changed()

def pycross.gui.MainWindow.on_tvClues_current_changed (   self,
  current,
  previous 
)

Fires when the currenly selected clue item in MainWindow::tvClues has changed.

Parameters
currentQtCore.QModelIndex the currently selected items
previousQtCore.QModelIndex the previously selected items

◆ on_tvClues_header_contextmenu()

def pycross.gui.MainWindow.on_tvClues_header_contextmenu (   self,
  point 
)

Fires when the custom context meny is requested on the Clues panel header.

Parameters
pointQtCore.QPoint the current cursor position (relative to grid coordinates)

◆ on_tvClues_selected()

def pycross.gui.MainWindow.on_tvClues_selected (   self,
  selected,
  deselected 
)

Fires when one or severals clue rows are selected in MainWindow::tvClues.

Parameters
selectedQtCore.QItemSelection the selected items
deselectedQtCore.QItemSelection the deselected items

◆ on_twCw_contextmenu()

def pycross.gui.MainWindow.on_twCw_contextmenu (   self,
  point 
)

Fires when the custom context meny is requested on the crossword grid.

Parameters
pointQtCore.QPoint the current cursor position (relative to grid coordinates)

◆ open_cw()

def pycross.gui.MainWindow.open_cw (   self,
  selected_path,
  save_history = True 
)

Loads the crossword (MainWindow::cw) from a given file.

Parameters
selected_pathstr the full file path to the file from which the crossword is loaded
save_historybool True (default) to make this action undoable by saving it to the Undo history; if set to False, the action will not be undoable

◆ options()

def pycross.gui.MainWindow.options (   self)

Util method to get the global settings dictionary.

Returns
guisettings.CWSettings global settings dictionary

◆ paintEvent()

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.

Parameters
eventQtGui.QPaintEvent the handled event

◆ print_cw()

def pycross.gui.MainWindow.print_cw (   self,
  pdf_file = None,
  show_preview = True 
)

Prints current crossword (and optionally clues) to file or printer.

Parameters
pdf_filestr | None path to PDF file or None to print to a physical printer
show_previewbool True to show print preview dialog - see forms::PrintPreviewDialog

◆ reformat_cells()

def pycross.gui.MainWindow.reformat_cells (   self)

Updates the internal formatting (colors, fonts) of the crossword grid.

◆ reformat_clues()

def pycross.gui.MainWindow.reformat_clues (   self)

Sets formatting in clues table according to word status (filled / empty).

◆ resizeEvent()

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.

Parameters
eventQtGui.QResizeEvent the handled event

◆ save_cw()

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.

See also
Description in _save_cw()

◆ scale_cw()

def pycross.gui.MainWindow.scale_cw (   self,
  scale_factor = 100,
  update_label = True,
  save_history = False 
)

Changes the scale of the crossword grid.

Parameters
scale_factorint the scale factor in percent values
update_labelbool whether to update the caption below the scale slider
save_historybool True (default) to make this action undoable by saving it to the Undo history; if set to False, the action will not be undoable

◆ select_clue()

def pycross.gui.MainWindow.select_clue (   self)

Selects (and if necessary scrolls to) the clue item corresponding to the currently selected word.

◆ set_cell_formatting()

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.

Parameters
cell_itemQtWidgets.QTableWidgetItem the cell that must be formatted

◆ set_selected_lang()

def pycross.gui.MainWindow.set_selected_lang (   self)

Writes the current interface language into the global settings.

◆ share_url()

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)

Parameters
urlstr the share URL generated by MainWindow::sharer
headersdict HTTP headers passed to the request
error_keymapdict error code-to-message mapping
See also
utils::onlineservices::Share

◆ showEvent()

def pycross.gui.MainWindow.showEvent (   self,
  event 
)

Fires when the window is about to show.

Parameters
eventQtGui.QShowEvent the handled event

◆ stop_all_threads()

def pycross.gui.MainWindow.stop_all_threads (   self)

Stops all running threads.

◆ tabletEvent()

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.

Parameters
eventQtGui.QTabletEvent the handled event

◆ toolbar_from_settings()

def pycross.gui.MainWindow.toolbar_from_settings (   self)

Fills main toolbar from app settings (CWSettings::settings).

◆ UI_create_central_widget()

def pycross.gui.MainWindow.UI_create_central_widget (   self)

Creates the main UI elements: the crossword grid and clues table.

◆ UI_create_context_menus()

def pycross.gui.MainWindow.UI_create_context_menus (   self)

Creates all context menus for main window.

◆ UI_create_lang_combo()

def pycross.gui.MainWindow.UI_create_lang_combo (   self)

Creates the langugage combo box and fills it with supported languages.

◆ UI_create_menu()

def pycross.gui.MainWindow.UI_create_menu (   self)

Creates the application's main menu.

◆ UI_create_statusbar()

def pycross.gui.MainWindow.UI_create_statusbar (   self)

Creates the main window's status bar.

◆ UI_create_toolbar()

def pycross.gui.MainWindow.UI_create_toolbar (   self)

Creates the app's main toolbar (which can also be hidden in settings).

◆ update_actions()

def pycross.gui.MainWindow.update_actions (   self)

Updates the enabled property of each action depending on which actions are currently available.

◆ update_clue_column_settings()

def pycross.gui.MainWindow.update_clue_column_settings (   self)

Updates the settings (CWSettings::settings) with current clue table's column parameters.

◆ update_clue_replies()

def pycross.gui.MainWindow.update_clue_replies (   self,
  coord 
)

Updates the reply values in clues table for given grid coordinate.

Parameters
coord2-tuple the grid coordinate (see crossword::Coords)

◆ update_clues_model()

def pycross.gui.MainWindow.update_clues_model (   self)

Updates (regenerates) the clues table from the clues contained in the current crossword.

◆ update_current_word()

def pycross.gui.MainWindow.update_current_word (   self,
  on_intersect = 'current' 
)

Updates the currently selected word in the grid and clues table.

Parameters
on_intersectstr one of:
  • 'current' = leave current direction
  • 'h' = switch to across word
  • 'v' = switch to down word
  • 'flip' = toggle current from across to down or vice-versa

◆ update_cw()

def pycross.gui.MainWindow.update_cw (   self,
  rescale = True 
)

Updates cw data and view.

Parameters
rescalebool whether rescaling the grid is required

◆ update_cw_grid()

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.

◆ update_cw_params()

def pycross.gui.MainWindow.update_cw_params (   self)

Updates the core settings of MainWindow::cw (internal crossword::Crossword instance) from CWSettings::settings.

◆ update_settings_before_quit()

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).

◆ update_wordsrc()

def pycross.gui.MainWindow.update_wordsrc (   self)

Updates MainWindow::wordsrc from the global settings in CWSettings::settings.

◆ wheelEvent()

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.

Parameters
eventQtGui.QWheelEvent the handled event

Member Data Documentation

◆ act_about

pycross.gui.MainWindow.act_about

QtWidgets.QAction show About action

◆ act_addcol

pycross.gui.MainWindow.act_addcol

QtWidgets.QAction add column action

◆ act_addrow

pycross.gui.MainWindow.act_addrow

QtWidgets.QAction add row action

◆ act_apiref

pycross.gui.MainWindow.act_apiref

QtWidgets.QAction show API reference action

◆ act_clear

pycross.gui.MainWindow.act_clear

QtWidgets.QAction grid clear action

◆ act_clear_wd

pycross.gui.MainWindow.act_clear_wd

QtWidgets.QAction clear word action

◆ act_clearclues

pycross.gui.MainWindow.act_clearclues

QtWidgets.QAction clear clues action

◆ act_close

pycross.gui.MainWindow.act_close

QtWidgets.QAction crossword close action

◆ act_config

pycross.gui.MainWindow.act_config

QtWidgets.QAction configure settings action

◆ act_contact

pycross.gui.MainWindow.act_contact

QtWidgets.QAction contact action

◆ act_delcol

pycross.gui.MainWindow.act_delcol

QtWidgets.QAction delete column action

◆ act_delrow

pycross.gui.MainWindow.act_delrow

QtWidgets.QAction delete row action

◆ act_edit

pycross.gui.MainWindow.act_edit

QtWidgets.QAction crossword edit action (toggle editing mode)

◆ act_editclue

pycross.gui.MainWindow.act_editclue

QtWidgets.QAction go to clue action

◆ act_erase_wd

pycross.gui.MainWindow.act_erase_wd

QtWidgets.QAction erase word action

◆ act_exit

pycross.gui.MainWindow.act_exit

QtWidgets.QAction quit application action

◆ act_fitgrid

pycross.gui.MainWindow.act_fitgrid

QtWidgets.QAction fit grid in window action

◆ act_gen

pycross.gui.MainWindow.act_gen

QtWidgets.QAction crossword generate (fill) action

◆ act_grid_blank

pycross.gui.MainWindow.act_grid_blank

QtWidgets.QAction clear selected cells action (put crossword::BLANK)

◆ act_grid_filler

pycross.gui.MainWindow.act_grid_filler

QtWidgets.QAction block selected cells action (put crossword::FILLER)

◆ act_grid_filler2

pycross.gui.MainWindow.act_grid_filler2

QtWidgets.QAction grey out selected cells action (put crossword::FILLER2)

◆ act_grid_multiselect

pycross.gui.MainWindow.act_grid_multiselect

QtWidgets.QAction toggle grid Multiselect mode action

◆ act_help

pycross.gui.MainWindow.act_help

QtWidgets.QAction show help docs action

◆ act_info

pycross.gui.MainWindow.act_info

QtWidgets.QAction show / edit crossword info action

◆ act_lookup

pycross.gui.MainWindow.act_lookup

QtWidgets.QAction lookup word action

◆ act_new

pycross.gui.MainWindow.act_new

QtWidgets.QAction new crossword action

◆ act_open

pycross.gui.MainWindow.act_open

QtWidgets.QAction open crossword (file) action

◆ act_print

pycross.gui.MainWindow.act_print

QtWidgets.QAction print (cw / clues) action

◆ act_redo

pycross.gui.MainWindow.act_redo

QtWidgets.QAction redo action – see utils::undo

◆ act_reflect

pycross.gui.MainWindow.act_reflect

QtWidgets.QAction reflect (duplicate) grid action

◆ act_reload

pycross.gui.MainWindow.act_reload

QtWidgets.QAction crossword reload (from file) action

◆ act_save

pycross.gui.MainWindow.act_save

QtWidgets.QAction crossword save action

◆ act_saveas

pycross.gui.MainWindow.act_saveas

QtWidgets.QAction crossword save as (export) action

◆ act_share

pycross.gui.MainWindow.act_share

QtWidgets.QAction crossword share action

◆ act_stats

pycross.gui.MainWindow.act_stats

QtWidgets.QAction show crossword stats action

◆ act_stop

pycross.gui.MainWindow.act_stop

QtWidgets.QAction stop (current operation) action

◆ act_suggest

pycross.gui.MainWindow.act_suggest

QtWidgets.QAction suggest word action

◆ act_undo

pycross.gui.MainWindow.act_undo

QtWidgets.QAction undo action – see utils::undo

◆ act_update

pycross.gui.MainWindow.act_update

QtWidgets.QAction check for update action

◆ act_view_showtoolbar

pycross.gui.MainWindow.act_view_showtoolbar

QtWidgets.QAction show toolbar action

◆ act_whatsthis

pycross.gui.MainWindow.act_whatsthis

QtWidgets.QAction Whats This action (click on control to show help)

◆ act_wsrc

pycross.gui.MainWindow.act_wsrc

QtWidgets.QAction edit word sources action

◆ btn_act_redo

pycross.gui.MainWindow.btn_act_redo

◆ btn_act_undo

pycross.gui.MainWindow.btn_act_undo

◆ btn_fitgrid

pycross.gui.MainWindow.btn_fitgrid

QtWidgets.QToolButton fit grid in window button

◆ cluesmodel

pycross.gui.MainWindow.cluesmodel

QtGui.QStandardItemModel underlying data model for MainWindow::tvClues

◆ combo_lang

pycross.gui.MainWindow.combo_lang

QtWidgets.QComboBox UI language combo

◆ current_word

pycross.gui.MainWindow.current_word

Word currently selected word in grid

◆ cw

pycross.gui.MainWindow.cw

crossword::Crossword internal crossword generator object

◆ cw_file

pycross.gui.MainWindow.cw_file

str currently opened cw file

◆ cw_modified

pycross.gui.MainWindow.cw_modified

bool flag showing that current cw has been changed since last save

◆ cw_widget

pycross.gui.MainWindow.cw_widget

QtWidgets.QWidget cw layout container

◆ dia_about

pycross.gui.MainWindow.dia_about

About dialog.

◆ dia_info

pycross.gui.MainWindow.dia_info

crossword information edit dialog

◆ dia_load

pycross.gui.MainWindow.dia_load

forms::LoadCwDialog CW load dialog

◆ dia_lookup

pycross.gui.MainWindow.dia_lookup

word meaning lookup dialog

◆ dia_reflect

pycross.gui.MainWindow.dia_reflect

forms::ReflectGridDialog reflect / duplicate dialog

◆ dia_settings

pycross.gui.MainWindow.dia_settings

forms::SettingsDialog instance (settings window)

◆ dia_share

pycross.gui.MainWindow.dia_share

share settings dialog

◆ garbage

pycross.gui.MainWindow.garbage

list files to delete on startup / close

◆ gen_thread

pycross.gui.MainWindow.gen_thread

GenThread cw generation worker thread

◆ l_cw_scale

pycross.gui.MainWindow.l_cw_scale

QtWidgets.QLabel cw table scale indicator

◆ last_pressed_item

pycross.gui.MainWindow.last_pressed_item

QtWidgets.QTableWidgetItem last pressed cell in cw grid

◆ layout_cw_scale

pycross.gui.MainWindow.layout_cw_scale

QtWidgets.QHBoxLayout cw table scale layout

◆ layout_vcw

pycross.gui.MainWindow.layout_vcw

QtWidgets.QVBoxLayout cw layout

◆ menu_crossword

pycross.gui.MainWindow.menu_crossword

◆ menu_main

pycross.gui.MainWindow.menu_main

QtWidgets.QMenu UI main menu

◆ menu_main_edit

pycross.gui.MainWindow.menu_main_edit

QtWidgets.QMenu 'Edit' menu

◆ menu_main_file

pycross.gui.MainWindow.menu_main_file

QtWidgets.QMenu 'File' menu

◆ menu_main_gen

pycross.gui.MainWindow.menu_main_gen

QtWidgets.QMenu 'Generate' menu

◆ menu_main_help

pycross.gui.MainWindow.menu_main_help

QtWidgets.QMenu 'Help' menu

◆ menu_main_view

pycross.gui.MainWindow.menu_main_view

QtWidgets.QMenu 'View' menu

◆ menu_redo

pycross.gui.MainWindow.menu_redo

QtWidgets.QMenu dropdown menu for Redo button

◆ menu_undo

pycross.gui.MainWindow.menu_undo

QtWidgets.QMenu dropdown menu for Undo button

◆ plugin_mgr

pycross.gui.MainWindow.plugin_mgr

utils::pluginmanager::PxPluginManager plugin manager instance to operate user plugins

◆ saved_cw

pycross.gui.MainWindow.saved_cw

list temporary saved crossword words (crossword::Word objects)

◆ share_thread

pycross.gui.MainWindow.share_thread

ShareThread sharer worker thread

◆ sharer

pycross.gui.MainWindow.sharer

utils::onlineservices::Share object

utils::onlineservices::Share instance used for cloud upload / sharing

◆ slider_cw_scale

pycross.gui.MainWindow.slider_cw_scale

QtWidgets.QSlider cw scale slider

◆ splitter1

pycross.gui.MainWindow.splitter1

QtWidgets.QSplitter central widget

◆ statusbar

pycross.gui.MainWindow.statusbar

QtWidgets.QStatusBar main status bar

◆ statusbar_btnstop

pycross.gui.MainWindow.statusbar_btnstop

QtWidgets.QToolButton stop current operation button

◆ statusbar_l1

pycross.gui.MainWindow.statusbar_l1

QtWidgets.QLabel status bar text 1 (app version)

◆ statusbar_l2

pycross.gui.MainWindow.statusbar_l2

forms::ClickableLabel status bar text 2 (other messages)

◆ statusbar_pbar

pycross.gui.MainWindow.statusbar_pbar

QtWidgets.QProgressBar progress bar inside status bar (hidden by default)

◆ syneditor

pycross.gui.MainWindow.syneditor

utils::synteditor::SynEditorWidget inbuilt python code editor

◆ threads

pycross.gui.MainWindow.threads

list thread list to keep track of all spawned threads

◆ toolbar_grid

pycross.gui.MainWindow.toolbar_grid

QtWidgets.QToolBar grid edit toolbar

◆ toolbar_main

pycross.gui.MainWindow.toolbar_main

QtWidgets.QToolBar main toolbar

◆ tvClues

pycross.gui.MainWindow.tvClues

QtWidgets.QTreeView clues table

◆ twCw

pycross.gui.MainWindow.twCw

forms::CwTable cw grid

◆ undomgr

pycross.gui.MainWindow.undomgr

utils::undo::CommandManager undo / redo history manager

◆ updater

pycross.gui.MainWindow.updater

utils::update::Updater instance (used to run app update checks and updates)

◆ wordsrc

pycross.gui.MainWindow.wordsrc

wordsrc::MultiWordsource word source instance


The documentation for this class was generated from the following file: