Class: CharacterWidget¶
- class qgis.gui.CharacterWidget¶
Bases:
PyQt5.QtWidgets.QWidget
A widget for displaying characters available in a preset font, and allowing users to select an individual character.
CharacterWidget(parent: QWidget = None) Constructor for CharacterWidget.
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
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- 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¶
pyqtSignal(*types, name: str = …, revision: 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.
- Parameters
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type
PYQT_SIGNAL
- 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: PyQt5.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], PyQt5.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)¶