widgets.*¶
Provides
- class widgets.AlignmentButton(main_window)[source]¶
Bases:
MultiStateBitmapButton
Alignment button for the format toolbar
- Parameters:
main_window (
QMainWindow
) – Application main window
- action_names = ('align_top', 'align_center', 'align_bottom')¶
- label = 'Alignment'¶
- class widgets.BackgroundColorButton(color)[source]¶
Bases:
ColorButton
Color button with text icon
- Parameters:
color (
QColor
) – Color that is initially set
- label = 'Background Color'¶
- class widgets.CellButton(text, grid, key)[source]¶
Bases:
QPushButton
Button that is used for button cells in the grid
- Parameters:
- class widgets.ColorButton(color, icon=None, max_size=PyQt5.QtCore.QSize(28, 28))[source]¶
Bases:
QToolButton
Color button widget
- Parameters:
color (
QColor
) – Color that is initially seticon (
QIcon
) – Button foreground imagemax_size (
QSize
) – Maximum Size of the button
- _color = None¶
- property color: QColor¶
Chosen color
- colorChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- default_color = None¶
- set_max_size(size)[source]¶
Set the maximum size of the widget
- Parameters:
color – Maximum button size
- title = 'Select Color'¶
- class widgets.FindEditor(parent)[source]¶
Bases:
QLineEdit
The Find editor widget for the find toolbar
- Parameters:
parent (
QWidget
) – Parent widget
- case = False¶
Context menu event handler
- Parameters:
point (
QPoint
) – Context menu coordinates on screen
- on_toggle_case(toggled)[source]¶
Find case sensitively toggle event handler
- Parameters:
toggled (
bool
) – case sensitivity option toggle state
- on_toggle_regexp(toggled)[source]¶
Find with regular expression toggle event handler
- Parameters:
toggled (
bool
) – regular expression option toggle state
- on_toggle_results(toggled)[source]¶
Find in results toggle event handler
- Parameters:
toggled (
bool
) – results option toggle state
- on_toggle_up(toggled)[source]¶
Find upwards toggle event handler
- Parameters:
toggled (
bool
) – up option toggle state
- on_toggle_word(toggled)[source]¶
Find whole word toggle event handler
- Parameters:
toggled (
bool
) – whole word option toggle state
- prepend_actions(menu)[source]¶
Prepends find specific actions to menu
- Parameters:
menu (
QMenu
) – Find editor context menu
- regexp = False¶
- results = False¶
- up = False¶
- word = False¶
- class widgets.FontChoiceCombo(main_window)[source]¶
Bases:
QFontComboBox
Font choice combo box
- Parameters:
main_window (
QMainWindow
) – Application main window
- fontChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- label = 'Font Family'¶
- class widgets.FontSizeCombo(main_window)[source]¶
Bases:
QComboBox
Font choice combo box
- Parameters:
main_window (
QMainWindow
) – Application main window
- fontSizeChanged¶
int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Type:
pyqtSignal(*types, name
- Type:
str = …, revision
- label = 'Font Size'¶
- class widgets.HelpBrowser(parent, path)[source]¶
Bases:
QTextBrowser
Help browser widget
- Parameters:
parent (
QWidget
) – Parent windowpath (
Path
) – Path to markdown file that is displayed
- class widgets.JustificationButton(main_window)[source]¶
Bases:
MultiStateBitmapButton
Justification button for the format toolbar
- Parameters:
main_window (
QMainWindow
) – Application main window
- action_names = ('justify_left', 'justify_center', 'justify_right', 'justify_fill')¶
- label = 'Justification'¶
- class widgets.LineColorButton(color)[source]¶
Bases:
ColorButton
Color button with text icon
- Parameters:
color (
QColor
) – Color that is initially set
- label = 'Line Color'¶
- class widgets.MenuComboBox(items)[source]¶
Bases:
QComboBox
ComboBox that uses a menu instead of a list
- Parameters:
items (
dict
) – Menu items
The dict items needs to be given in the following format: {
“<label_1>”: None, # For leaf item “<label_2>”: {“<label_2.1>”: None}, # For submenu
}
Event handler for menu
- text_tpl = '{} ({})'¶
- class widgets.MultiStateBitmapButton(main_window)[source]¶
Bases:
QToolButton
QToolButton that cycles through arbitrary states
The states are defined by an iterable of QIcons
- Parameters:
main_window (
QMainWindow
) – Application main window
- get_action(index)[source]¶
Returns action from index in action_names
- Parameters:
index (
int
) – Index of action to be returned- Return type:
QAction
- set_current_action(action_name)[source]¶
Sets current action
- Parameters:
action_name (
str
) – Name of action as in MainWindowActions
Sets checked status of menu
- Parameters:
action_name (
str
) – Name of action as in MainWindowActions
- class widgets.RendererButton(main_window)[source]¶
Bases:
MultiStateBitmapButton
Cell render button for the format toolbar
- Parameters:
main_window (
QMainWindow
) – Application main window
- action_names = ('text', 'markup', 'image', 'matplotlib')¶
- label = 'Renderer'¶
- class widgets.RotationButton(main_window)[source]¶
Bases:
MultiStateBitmapButton
Rotation button for the format toolbar
- Parameters:
main_window (
QMainWindow
) – Application main window
- action_names = ('rotate_0', 'rotate_90', 'rotate_180', 'rotate_270')¶
- label = 'Rotate'¶
- class widgets.TextColorButton(color)[source]¶
Bases:
ColorButton
Color button with text icon
- Parameters:
color (
QColor
) – Color that is initially set
- label = 'Text Color'¶
- class widgets.TypeMenuComboBox[source]¶
Bases:
MenuComboBox
MenuComboBox that comprises types and currencies for CSV import
- Parameters:
items – Menu items
The dict items needs to be given in the following format: {
“<label_1>”: None, # For leaf item “<label_2>”: {“<label_2.1>”: None}, # For submenu
}