Class: CharacterWidget¶
- class qgis.gui.CharacterWidget(parent: QWidget = None)¶
Bases:
PyQt5.QtWidgets.QWidget
Constructor for CharacterWidget.
A widget for displaying characters available in a preset font, and allowing users to select an individual character.
Methods
Returns the currently selected character in the widget.
Clears the currently selected character in the widget.
Returns the number of columns of characters shown in the widget.
Returns the font shown in the widget
- param event
- param event
- param event
- param event
- param event
Sets the currently selected
character
in the widget.Sets the number of columns of characters to show in the widget.
Sets the
font
to show in the widget.Sets the font size (in points) to render in the widget.
Sets the font style to show in the widget.
- rtype
QSize
Returns the size (in pixels) of the square used to render each character preview.
- param enable
Signals
Emitted when a character is selected in the widget.
- actionEvent(self, QActionEvent)¶
- changeEvent(self, QEvent)¶
- character(self) → str¶
Returns the currently selected character in the widget.
See also
New in version 3.0.
- Return type
str
- characterSelected¶
Emitted when a character is selected in the widget. [signal]
- Parameters
character (str) –
- childEvent(self, QChildEvent)¶
- clearCharacter(self)¶
Clears the currently selected character in the widget.
See also
See also
- closeEvent(self, QCloseEvent)¶
- columns(self) → int¶
Returns the number of columns of characters shown in the widget.
- Return type
int
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) → bool¶
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) → bool¶
- focusNextPrevChild(self, bool) → bool¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) → bool¶
- font(self) → QFont¶
Returns the font shown in the widget
See also
New in version 3.0.
- Return type
QFont
- hideEvent(self, QHideEvent)¶
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) → bool¶
- keyPressEvent(self, event: QKeyEvent)¶
- Parameters
event (QKeyEvent) –
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- metric(self, QPaintDevice.PaintDeviceMetric) → int¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, event: QMouseEvent)¶
- Parameters
event (QMouseEvent) –
- mousePressEvent(self, event: QMouseEvent)¶
- Parameters
event (QMouseEvent) –
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
- paintEvent(self, event: QPaintEvent)¶
- Parameters
event (QPaintEvent) –
- receivers(self, PYQT_SIGNAL) → int¶
- resizeEvent(self, event: QResizeEvent)¶
- Parameters
event (QResizeEvent) –
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- setCharacter(self, character: str)¶
Sets the currently selected
character
in the widget.See also
See also
- Parameters
character (str) –
- setColumns(self, columns: int)¶
Sets the number of columns of characters to show in the widget.
New in version 3.0.
- Parameters
columns (int) –
- setFont(self, font: QFont)¶
Sets the
font
to show in the widget.See also
New in version 3.0.
- Parameters
font (QFont) –
- setFontSize(self, fontSize: float)¶
Sets the font size (in points) to render in the widget.
New in version 3.0.
- Parameters
fontSize (float) –
- setFontStyle(self, fontStyle: str)¶
Sets the font style to show in the widget.
New in version 3.0.
- Parameters
fontStyle (str) –
- showEvent(self, QShowEvent)¶
- sizeHint(self) → QSize¶
- Return type
QSize
- squareSize(self) → int¶
Returns the size (in pixels) of the square used to render each character preview.
- Return type
int
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateFontMerging(self, enable: bool)¶
- Parameters
enable (bool) –
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶