Skip to content

PaintDeviceMixin

Subclasses

Class Module Description
PaintDevice prettyqt.gui.paintdevice
PaintDeviceWindowMixin prettyqt.gui.paintdevicewindow
PixmapMixin prettyqt.gui.pixmap Off-screen image representation that can be used as a paint device.
Image prettyqt.gui.image
PagedPaintDeviceMixin prettyqt.gui.pagedpaintdevice
Picture prettyqt.gui.picture
WidgetMixin prettyqt.widgets.widget
SvgGenerator prettyqt.svg.svggenerator

⋔ Inheritance diagram

graph TD
  1473245548480["gui.PaintDeviceMixin"]
  140713234304496["builtins.object"]
  140713234304496 --> 1473245548480

🛈 DocStrings

Source code in prettyqt\gui\paintdevice.py
class PaintDeviceMixin:
    def get_metric(self, metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int:
        """Return metric information.

        Args:
            metric: metric information to get

        Returns:
            metric information
        """
        return self.metric(METRICS.get_enum_value(metric))

get_metric(metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int

Return metric information.

Parameters:

Name Type Description Default
metric MetricStr | PaintDeviceMetric

metric information to get

required
Source code in prettyqt\gui\paintdevice.py
def get_metric(self, metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int:
    """Return metric information.

    Args:
        metric: metric information to get

    Returns:
        metric information
    """
    return self.metric(METRICS.get_enum_value(metric))