pycrossword  0.2
Pure-Python implementation of a crossword puzzle generator and editor
Public Member Functions | Public Attributes | List of all members
pycross.forms.DefLookupDialog Class Reference
Inheritance diagram for pycross.forms.DefLookupDialog:
pycross.forms.BasicDialog

Public Member Functions

def __init__ (self, word='', word_editable=False, lang='', parent=None, flags=QtCore.Qt.WindowFlags())
 
def closeEvent (self, event)
 
def showEvent (self, event)
 
def kill_threads (self, dics=True, google=True)
 
def addMainLayout (self)
 Creates the main (central) layout for controls. More...
 
def setlang (self, lang='')
 
def init (self)
 
def update_language (self)
 
def update_dict_engine (self)
 
def update_google_engine (self)
 
def add_pages (self)
 
def on_thread_error (self, thread, err)
 
def on_dics_load_start (self)
 
def on_dics_load_run (self)
 
def on_dics_load_finish (self)
 
def on_google_load_start (self)
 
def on_google_load_run (self)
 
def on_google_load_finish (self)
 
def update_content (self, dictionary=True, google=True)
 
def rb_source_toggled (self, toggled)
 
def on_le_word_changed (self, text)
 
def on_combo_lang (self, index)
 
def on_combo_dict_homs (self, index)
 
def on_combo_google (self, index)
 
- Public Member Functions inherited from pycross.forms.BasicDialog
def __init__ (self, geometry=None, title=None, icon=None, parent=None, flags=QtCore.Qt.WindowFlags(), sizepolicy=QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed))
 Constructor. More...
 
def initUI (self, geometry=None, title=None, icon=None)
 Creates the core controls: OK and Cancel buttons and layouts. More...
 
def validate (self)
 Validates user input (reimplemented in child classes). More...
 
def on_btn_OK_clicked (self)
 Fires when the OK button is clicked. More...
 
def on_btn_cancel_clicked (self)
 Fires when the Cancel button is clicked: rejects input and closes window. More...
 

Public Attributes

 word
 
 word_editable
 
 word_def
 
 google_res
 
 dict_engine
 
 google_engine
 
 load_threads
 
 layout_controls
 
 gb_word
 
 layout_gb_word
 
 le_word
 
 combo_lang
 
 gb_sources
 
 layout_gb_sources
 
 rb_dict
 
 rb_google
 
 stacked
 
 lang
 
 page_dict
 
 layout_dict
 
 combo_dict_homs
 
 layout_dict_top
 
 te_dict_defs
 
 l_link_dict
 
 page_google
 
 layout_google
 
 combo_google
 
 layout_google_top
 
 te_google_res
 
 l_link_google
 
- Public Attributes inherited from pycross.forms.BasicDialog
 layout_controls
 QtWidgets.QFormLayout central layout for controls More...
 
 btn_OK
 QtWidgets.QPushButton OK button More...
 
 btn_cancel
 QtWidgets.QPushButton Cancel button More...
 
 layout_bottom
 QtWidgets.QHBoxLayout bottom layout for OK and Cancel buttons More...
 
 layout_main
 QtWidgets.QVBoxLayout window layout More...
 

Constructor & Destructor Documentation

◆ __init__()

def pycross.forms.DefLookupDialog.__init__ (   self,
  word = '',
  word_editable = False,
  lang = '',
  parent = None,
  flags = QtCore.Qt.WindowFlags() 
)
Params:
- word [str]: the word string to look up (def='')
- word_editable [bool]: whether the word string can be edited in the dialog (def=False)
- lang [str]: the short name of the langugage used to look up the word (def='').
    Can be one of: 'en' (English), 'ru' (Russian), 'fr' (French), 'es' (Spanish), 'de' (German), 'it' (Italian)
    (see LANG global). If the value is an empty string (default), the setting from
    CWSettings.settings['lookup']['default_lang']

Member Function Documentation

◆ add_pages()

def pycross.forms.DefLookupDialog.add_pages (   self)

◆ addMainLayout()

def pycross.forms.DefLookupDialog.addMainLayout (   self)

Creates the main (central) layout for controls.

Must be overridden by child classes to change the layout type (default = QtWidgets.QFormLayout) and add controls.

Reimplemented from pycross.forms.BasicDialog.

◆ closeEvent()

def pycross.forms.DefLookupDialog.closeEvent (   self,
  event 
)
Need to stop running background threads.

◆ init()

def pycross.forms.DefLookupDialog.init (   self)

◆ kill_threads()

def pycross.forms.DefLookupDialog.kill_threads (   self,
  dics = True,
  google = True 
)

◆ on_combo_dict_homs()

def pycross.forms.DefLookupDialog.on_combo_dict_homs (   self,
  index 
)

◆ on_combo_google()

def pycross.forms.DefLookupDialog.on_combo_google (   self,
  index 
)

◆ on_combo_lang()

def pycross.forms.DefLookupDialog.on_combo_lang (   self,
  index 
)
When a language combo item is selected.

◆ on_dics_load_finish()

def pycross.forms.DefLookupDialog.on_dics_load_finish (   self)

◆ on_dics_load_run()

def pycross.forms.DefLookupDialog.on_dics_load_run (   self)

◆ on_dics_load_start()

def pycross.forms.DefLookupDialog.on_dics_load_start (   self)

◆ on_google_load_finish()

def pycross.forms.DefLookupDialog.on_google_load_finish (   self)

◆ on_google_load_run()

def pycross.forms.DefLookupDialog.on_google_load_run (   self)

◆ on_google_load_start()

def pycross.forms.DefLookupDialog.on_google_load_start (   self)

◆ on_le_word_changed()

def pycross.forms.DefLookupDialog.on_le_word_changed (   self,
  text 
)

◆ on_thread_error()

def pycross.forms.DefLookupDialog.on_thread_error (   self,
  thread,
  err 
)

◆ rb_source_toggled()

def pycross.forms.DefLookupDialog.rb_source_toggled (   self,
  toggled 
)
Show specified source page.

◆ setlang()

def pycross.forms.DefLookupDialog.setlang (   self,
  lang = '' 
)

◆ showEvent()

def pycross.forms.DefLookupDialog.showEvent (   self,
  event 
)

◆ update_content()

def pycross.forms.DefLookupDialog.update_content (   self,
  dictionary = True,
  google = True 
)

◆ update_dict_engine()

def pycross.forms.DefLookupDialog.update_dict_engine (   self)

◆ update_google_engine()

def pycross.forms.DefLookupDialog.update_google_engine (   self)

◆ update_language()

def pycross.forms.DefLookupDialog.update_language (   self)

Member Data Documentation

◆ combo_dict_homs

pycross.forms.DefLookupDialog.combo_dict_homs

◆ combo_google

pycross.forms.DefLookupDialog.combo_google

◆ combo_lang

pycross.forms.DefLookupDialog.combo_lang

◆ dict_engine

pycross.forms.DefLookupDialog.dict_engine

◆ gb_sources

pycross.forms.DefLookupDialog.gb_sources

◆ gb_word

pycross.forms.DefLookupDialog.gb_word

◆ google_engine

pycross.forms.DefLookupDialog.google_engine

◆ google_res

pycross.forms.DefLookupDialog.google_res

◆ l_link_dict

pycross.forms.DefLookupDialog.l_link_dict

◆ l_link_google

pycross.forms.DefLookupDialog.l_link_google

◆ lang

pycross.forms.DefLookupDialog.lang

◆ layout_controls

pycross.forms.DefLookupDialog.layout_controls

◆ layout_dict

pycross.forms.DefLookupDialog.layout_dict

◆ layout_dict_top

pycross.forms.DefLookupDialog.layout_dict_top

◆ layout_gb_sources

pycross.forms.DefLookupDialog.layout_gb_sources

◆ layout_gb_word

pycross.forms.DefLookupDialog.layout_gb_word

◆ layout_google

pycross.forms.DefLookupDialog.layout_google

◆ layout_google_top

pycross.forms.DefLookupDialog.layout_google_top

◆ le_word

pycross.forms.DefLookupDialog.le_word

◆ load_threads

pycross.forms.DefLookupDialog.load_threads

◆ page_dict

pycross.forms.DefLookupDialog.page_dict

◆ page_google

pycross.forms.DefLookupDialog.page_google

◆ rb_dict

pycross.forms.DefLookupDialog.rb_dict

◆ rb_google

pycross.forms.DefLookupDialog.rb_google

◆ stacked

pycross.forms.DefLookupDialog.stacked

◆ te_dict_defs

pycross.forms.DefLookupDialog.te_dict_defs

◆ te_google_res

pycross.forms.DefLookupDialog.te_google_res

◆ word

pycross.forms.DefLookupDialog.word

◆ word_def

pycross.forms.DefLookupDialog.word_def

◆ word_editable

pycross.forms.DefLookupDialog.word_editable

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