Инструменты пользователя

Инструменты сайта


products:pyrog:api:lastest:types:properties:font_property

Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.

FontProperty

Inherits: Property

Class of property that provides input of data the represents description of font.

Description of font is tuple of: font name, font style and font size.

Attributes:

  • value_changed: tuple[str, str, int] — This signal is emitted when value is changed.

Constructor:

def FontProperty.__init__(default_value: tuple[str, str, int] = ('Segoe UI', 'Regular', 9), name: str | LangConstant = tr.UNNAMED, tooltip: str | LangConstant = '', show_reset_btn: bool = True)

Initializes class of property.

The description of the arguments is identical to the description of the parameters with the same names.

Parameters:

  • default_value: tuple[str, str, int] — default value of property, Format → (Font, Style, Size), for example: («Segoe UI», «Regular», 9)
  • name: str | LangConstant — name of property
  • tooltip: str | LangConstant — tooltip text
  • show_reset_btn: bool — state of reset button displaying

Properties

default_value

@property
def default_value()

Default value of property.

Returns:

  • value — tuple[str, str, int]: default value of property, Format → (Font, Style, Size), for example: («Segoe UI», «Regular», 9)

tooltip

Tooltip of the property's widget

Returns:

  • str | LangConstant — tooltip text of the property's widget

name

Property name, this text is displayed in PropertyContainer form editing values.

Returns:

show_reset_btn

State of reset button displaying. This button is displayed if value isn't equal to default value.

Returns:

  • bool — state of reset button displaying

Methods

get_font

def get_font() -> QFont

Returns font object of property value.

Converts property value to QFont object.

Returns:

  • QFont — font object

get_input_widget

def get_input_widget() -> QPushButton

Returns:

  • QPushButton — (without description)

delete_input_widget

def delete_input_widget() -> None

Returns:

  • None — (without description)
products/pyrog/api/lastest/types/properties/font_property.txt · Последнее изменение: 127.0.0.1