Skip to content

TextTableCellFormat

Base classes

Name Children Inherits
TextCharFormatMixin
prettyqt.gui.textcharformat
QTextTableCellFormat
PySide6.QtGui
QTextTableCellFormat(self, /) -> None

â‹” Inheritance diagram

graph TD
  3907461934["gui.TextTableCellFormat"]
  1115109788["gui.TextCharFormatMixin"]
  1171567019["gui.TextFormatMixin"]
  2751680898["builtins.object"]
  1467685224["QtGui.QTextTableCellFormat"]
  696065468["QtGui.QTextCharFormat"]
  1757385971["QtGui.QTextFormat"]
  37984305["Shiboken.Object"]
  1115109788 --> 3907461934
  1171567019 --> 1115109788
  2751680898 --> 1171567019
  2751680898 --> 1115109788
  1467685224 --> 3907461934
  696065468 --> 1467685224
  1757385971 --> 696065468
  37984305 --> 1757385971
  2751680898 --> 37984305

🛈 DocStrings

Bases: TextCharFormatMixin, QTextTableCellFormat

Source code in prettyqt/gui/texttablecellformat.py
class TextTableCellFormat(gui.TextCharFormatMixin, gui.QTextTableCellFormat):
    def get_bottom_border_brush(self) -> gui.Brush:
        return gui.Brush(self.bottomBorderBrush())

    def set_border_style(
        self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
    ):
        """Set border style.

        Args:
            style: border style
        """
        self.setBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

    def set_bottom_border_style(
        self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
    ):
        """Set bottom border style.

        Args:
            style: bottom border style
        """
        self.setBottomBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

    def get_bottom_border_style(self) -> gui.textframeformat.BorderStyleStr:
        """Get the current bottom border style.

        Returns:
            bottom border style
        """
        return gui.textframeformat.BORDER_STYLES.inverse[self.bottomBorderStyle()]

    def get_left_border_brush(self) -> gui.Brush:
        return gui.Brush(self.leftBorderBrush())

    def set_left_border_style(
        self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
    ):
        """Set left border style.

        Args:
            style: left border style
        """
        self.setLeftBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

    def get_left_border_style(self) -> gui.textframeformat.BorderStyleStr:
        """Get the current left border style.

        Returns:
            left border style
        """
        return gui.textframeformat.BORDER_STYLES.inverse[self.leftBorderStyle()]

    def get_right_border_brush(self) -> gui.Brush:
        return gui.Brush(self.rightBorderBrush())

    def set_right_border_style(
        self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
    ):
        """Set right border style.

        Args:
            style: right border style
        """
        self.setRightBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

    def get_right_border_style(self) -> gui.textframeformat.BorderStyleStr:
        """Get the current right border style.

        Returns:
            right border style
        """
        return gui.textframeformat.BORDER_STYLES.inverse[self.rightBorderStyle()]

    def get_top_border_brush(self) -> gui.Brush:
        return gui.Brush(self.topBorderBrush())

    def set_top_border_style(
        self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
    ):
        """Set top border style.

        Args:
            style: top border style
        """
        self.setTopBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

    def get_top_border_style(self) -> gui.textframeformat.BorderStyleStr:
        """Get the current top border style.

        Returns:
            top border style
        """
        return gui.textframeformat.BORDER_STYLES.inverse[self.topBorderStyle()]

get_bottom_border_style() -> gui.textframeformat.BorderStyleStr

Get the current bottom border style.

Source code in prettyqt/gui/texttablecellformat.py
def get_bottom_border_style(self) -> gui.textframeformat.BorderStyleStr:
    """Get the current bottom border style.

    Returns:
        bottom border style
    """
    return gui.textframeformat.BORDER_STYLES.inverse[self.bottomBorderStyle()]

get_left_border_style() -> gui.textframeformat.BorderStyleStr

Get the current left border style.

Source code in prettyqt/gui/texttablecellformat.py
def get_left_border_style(self) -> gui.textframeformat.BorderStyleStr:
    """Get the current left border style.

    Returns:
        left border style
    """
    return gui.textframeformat.BORDER_STYLES.inverse[self.leftBorderStyle()]

get_right_border_style() -> gui.textframeformat.BorderStyleStr

Get the current right border style.

Source code in prettyqt/gui/texttablecellformat.py
def get_right_border_style(self) -> gui.textframeformat.BorderStyleStr:
    """Get the current right border style.

    Returns:
        right border style
    """
    return gui.textframeformat.BORDER_STYLES.inverse[self.rightBorderStyle()]

get_top_border_style() -> gui.textframeformat.BorderStyleStr

Get the current top border style.

Source code in prettyqt/gui/texttablecellformat.py
def get_top_border_style(self) -> gui.textframeformat.BorderStyleStr:
    """Get the current top border style.

    Returns:
        top border style
    """
    return gui.textframeformat.BORDER_STYLES.inverse[self.topBorderStyle()]

set_border_style(style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle)

Set border style.

Parameters:

Name Type Description Default
style BorderStyleStr | BorderStyle

border style

required
Source code in prettyqt/gui/texttablecellformat.py
def set_border_style(
    self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
):
    """Set border style.

    Args:
        style: border style
    """
    self.setBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

set_bottom_border_style(style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle)

Set bottom border style.

Parameters:

Name Type Description Default
style BorderStyleStr | BorderStyle

bottom border style

required
Source code in prettyqt/gui/texttablecellformat.py
def set_bottom_border_style(
    self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
):
    """Set bottom border style.

    Args:
        style: bottom border style
    """
    self.setBottomBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

set_left_border_style(style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle)

Set left border style.

Parameters:

Name Type Description Default
style BorderStyleStr | BorderStyle

left border style

required
Source code in prettyqt/gui/texttablecellformat.py
def set_left_border_style(
    self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
):
    """Set left border style.

    Args:
        style: left border style
    """
    self.setLeftBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

set_right_border_style(style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle)

Set right border style.

Parameters:

Name Type Description Default
style BorderStyleStr | BorderStyle

right border style

required
Source code in prettyqt/gui/texttablecellformat.py
def set_right_border_style(
    self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
):
    """Set right border style.

    Args:
        style: right border style
    """
    self.setRightBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

set_top_border_style(style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle)

Set top border style.

Parameters:

Name Type Description Default
style BorderStyleStr | BorderStyle

top border style

required
Source code in prettyqt/gui/texttablecellformat.py
def set_top_border_style(
    self, style: gui.textframeformat.BorderStyleStr | gui.QTextFrameFormat.BorderStyle
):
    """Set top border style.

    Args:
        style: top border style
    """
    self.setTopBorderStyle(gui.textframeformat.BORDER_STYLES.get_enum_value(style))

:fa-brands-github: Show source on GitHub