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

Standalone syntax editor window with a SynEditor object as the main widget. More...

Inheritance diagram for pycross.utils.synteditor.SynEditorWidget:
pycross.utils.synteditor.PluginSynEditorWidget

Public Member Functions

def __init__ (self, lexer=Qsci.QsciLexerPython(), source=None, autocomplete_source=None, minsize=(600, 400), icon='file.png', title='::Code Editor ::')
 
def add_elements (self, lexer, source, autocomplete_source)
 Constructs main layout blocks. More...
 
def add_central (self, lexer, source, autocomplete_source)
 Constructs the central widget (syntax editor). More...
 
def add_bottom (self)
 Constructs the bottom layout with the OK and Cancel buttons. More...
 
def currenttext (self)
 Returns the current text in the syntax editor. More...
 

Public Attributes

 layout_main
 QtWidgets.QVBoxLayout main window layout More...
 
 editor
 SynEditor the syntax editor More...
 
 layout_bottom
 
 btn_OK
 
 btn_cancel
 

Detailed Description

Standalone syntax editor window with a SynEditor object as the main widget.

Constructor & Destructor Documentation

◆ __init__()

def pycross.utils.synteditor.SynEditorWidget.__init__ (   self,
  lexer = Qsci.QsciLexerPython(),
  source = None,
  autocomplete_source = None,
  minsize = (600, 400),
  icon = 'file.png',
  title = ':: Code Editor ::' 
)
Parameters
lexerQsci.QsciLexer lexer object responsible for parsing / highlighting
sourcestr|None source code to place in the editor upon creation
autocomplete_sourcelist|None list of variables & functions serving as the autocompletion source (see utils::utils::get_script_members())
minsizetuple minimum window size in pixels (width, height)
iconstr icon file to use in the window
titlestr the window title (caption)

Reimplemented in pycross.utils.synteditor.PluginSynEditorWidget.

Member Function Documentation

◆ add_bottom()

def pycross.utils.synteditor.SynEditorWidget.add_bottom (   self)

Constructs the bottom layout with the OK and Cancel buttons.

◆ add_central()

def pycross.utils.synteditor.SynEditorWidget.add_central (   self,
  lexer,
  source,
  autocomplete_source 
)

Constructs the central widget (syntax editor).

Parameters
lexerQsci.QsciLexer lexer object responsible for parsing / highlighting
sourcestr|None source code to place in the editor upon creation
autocomplete_sourcelist|None list of variables & functions serving as the autocompletion source (see utils::utils::get_script_members())

Reimplemented in pycross.utils.synteditor.PluginSynEditorWidget.

◆ add_elements()

def pycross.utils.synteditor.SynEditorWidget.add_elements (   self,
  lexer,
  source,
  autocomplete_source 
)

Constructs main layout blocks.

Parameters
lexerQsci.QsciLexer lexer object responsible for parsing / highlighting
sourcestr|None source code to place in the editor upon creation
autocomplete_sourcelist|None list of variables & functions serving as the autocompletion source (see utils::utils::get_script_members())

◆ currenttext()

def pycross.utils.synteditor.SynEditorWidget.currenttext (   self)

Returns the current text in the syntax editor.

Returns
str current text in the syntax editor

Member Data Documentation

◆ btn_cancel

pycross.utils.synteditor.SynEditorWidget.btn_cancel

◆ btn_OK

pycross.utils.synteditor.SynEditorWidget.btn_OK

◆ editor

pycross.utils.synteditor.SynEditorWidget.editor

SynEditor the syntax editor

◆ layout_bottom

pycross.utils.synteditor.SynEditorWidget.layout_bottom

◆ layout_main

pycross.utils.synteditor.SynEditorWidget.layout_main

QtWidgets.QVBoxLayout main window layout


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