pycrossword
0.4
Pure-Python implementation of a crossword puzzle generator and editor
|
Print preview window to preview crossword / clues and configure printing. More...
Public Member Functions | |
def | __init__ (self, printer, mainwindow, parent=None, flags=QtCore.Qt.WindowFlags()) |
Constructor. More... | |
def | showEvent (self, event) |
Update preview on dialog show. More... | |
def | addMainLayout (self) |
Creates the main (central) layout for controls. More... | |
def | update_controls (self) |
Updates the printer settings from guisettings::CWSettings::settings and updates the controls in toolbar and preview according to current printer settings. More... | |
def | update_page_size (self) |
Updates the page size from the one selected in the page size combo. More... | |
def | update_margins (self) |
Sets the page margins according to the values in the margin edit fields. More... | |
def | write_settings (self) |
Saves the current page config to the global settings. More... | |
def | on_combo_page_size (self, index) |
When a new page size is selected in the combo box. More... | |
def | on_combo_view (self, index) |
When a view mode is selected in the view combo box. More... | |
def | on_combo_layout (self, index) |
When a layout is selected in the layout combo box. More... | |
def | on_btn_fit_width (self) |
Scale page to width. More... | |
def | on_btn_fit_all (self) |
Scale page to fit in window. More... | |
def | on_combo_color (self, index) |
Set print color mode. More... | |
def | on_zoom_changed (self, value) |
Set scale factor. More... | |
def | on_margins_changed (self, text) |
Set page margins. More... | |
def | on_btn_settings (self) |
Shows global settings dialog. More... | |
![]() | |
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 | event (self, QtCore.QEvent event) |
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 | |
printer | |
QtPrintSupport.QPrinter selected printer More... | |
mainwindow | |
QtWidgets.QMainWindow pointer to gui::MainWindow instance More... | |
layout_controls | |
tb_main | |
layout_tb_main | |
combo_page_size | |
layout_pagesize | |
combo_view | |
layout_view | |
combo_layout | |
layout_layout | |
btn_fit_width | |
btn_fit_all | |
slider_zoom | |
layout_fit | |
combo_color | |
layout_color | |
le_margin_l | |
le_margin_r | |
le_margin_t | |
le_margin_b | |
layout_margins | |
btn_settings | |
layout_center | |
ppreview | |
![]() | |
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... | |
Private Member Functions | |
def | _make_labelled_widgets (self, name, caption, widgets) |
Shortcut method to create a 'tab' (layout) with a caption and widgets. More... | |
Print preview window to preview crossword / clues and configure printing.
def pycross.forms.PrintPreviewDialog.__init__ | ( | self, | |
printer, | |||
mainwindow, | |||
parent = None , |
|||
flags = QtCore.Qt.WindowFlags() |
|||
) |
Constructor.
printer | QtPrintSupport.QPrinter selected printer |
mainwindow | QtWidgets.QMainWindow pointer to gui::MainWindow instance |
parent | QtWidgets.QWidget parent widget (default = None , i.e. no parent) |
flags | QtCore.Qt.WindowFlags Qt window flags |
|
private |
Shortcut method to create a 'tab' (layout) with a caption and widgets.
name | str name of caption label |
caption | str caption string |
widgets | iterable list of widgets to add to layout |
QtWidgets.QVBoxLayout
layout with widgets and caption label def pycross.forms.PrintPreviewDialog.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.
def pycross.forms.PrintPreviewDialog.on_btn_fit_all | ( | self | ) |
Scale page to fit in window.
def pycross.forms.PrintPreviewDialog.on_btn_fit_width | ( | self | ) |
Scale page to width.
def pycross.forms.PrintPreviewDialog.on_btn_settings | ( | self | ) |
Shows global settings dialog.
def pycross.forms.PrintPreviewDialog.on_combo_color | ( | self, | |
index | |||
) |
Set print color mode.
def pycross.forms.PrintPreviewDialog.on_combo_layout | ( | self, | |
index | |||
) |
When a layout is selected in the layout combo box.
def pycross.forms.PrintPreviewDialog.on_combo_page_size | ( | self, | |
index | |||
) |
When a new page size is selected in the combo box.
def pycross.forms.PrintPreviewDialog.on_combo_view | ( | self, | |
index | |||
) |
When a view mode is selected in the view combo box.
def pycross.forms.PrintPreviewDialog.on_margins_changed | ( | self, | |
text | |||
) |
Set page margins.
def pycross.forms.PrintPreviewDialog.on_zoom_changed | ( | self, | |
value | |||
) |
Set scale factor.
def pycross.forms.PrintPreviewDialog.showEvent | ( | self, | |
event | |||
) |
Update preview on dialog show.
def pycross.forms.PrintPreviewDialog.update_controls | ( | self | ) |
Updates the printer settings from guisettings::CWSettings::settings and updates the controls in toolbar and preview according to current printer settings.
def pycross.forms.PrintPreviewDialog.update_margins | ( | self | ) |
Sets the page margins according to the values in the margin edit fields.
def pycross.forms.PrintPreviewDialog.update_page_size | ( | self | ) |
Updates the page size from the one selected in the page size combo.
def pycross.forms.PrintPreviewDialog.write_settings | ( | self | ) |
Saves the current page config to the global settings.
pycross.forms.PrintPreviewDialog.btn_fit_all |
pycross.forms.PrintPreviewDialog.btn_fit_width |
pycross.forms.PrintPreviewDialog.btn_settings |
pycross.forms.PrintPreviewDialog.combo_color |
pycross.forms.PrintPreviewDialog.combo_layout |
pycross.forms.PrintPreviewDialog.combo_page_size |
pycross.forms.PrintPreviewDialog.combo_view |
pycross.forms.PrintPreviewDialog.layout_center |
pycross.forms.PrintPreviewDialog.layout_color |
pycross.forms.PrintPreviewDialog.layout_controls |
pycross.forms.PrintPreviewDialog.layout_fit |
pycross.forms.PrintPreviewDialog.layout_layout |
pycross.forms.PrintPreviewDialog.layout_margins |
pycross.forms.PrintPreviewDialog.layout_pagesize |
pycross.forms.PrintPreviewDialog.layout_tb_main |
pycross.forms.PrintPreviewDialog.layout_view |
pycross.forms.PrintPreviewDialog.le_margin_b |
pycross.forms.PrintPreviewDialog.le_margin_l |
pycross.forms.PrintPreviewDialog.le_margin_r |
pycross.forms.PrintPreviewDialog.le_margin_t |
pycross.forms.PrintPreviewDialog.mainwindow |
QtWidgets.QMainWindow
pointer to gui::MainWindow instance
pycross.forms.PrintPreviewDialog.ppreview |
pycross.forms.PrintPreviewDialog.printer |
QtPrintSupport.QPrinter
selected printer
pycross.forms.PrintPreviewDialog.slider_zoom |
pycross.forms.PrintPreviewDialog.tb_main |