TableWidgetSelectionRange
Qt Base Class: QTableWidgetSelectionRange
Signature: QTableWidgetSelectionRange(self) -> None
QTableWidgetSelectionRange(self, QTableWidgetSelectionRange: PySide6.QtWidgets.QTableWidgetSelectionRange) -> None
QTableWidgetSelectionRange(self, top: int, left: int, bottom: int, right: int) -> None
Base classes
⋔ Inheritance diagram
graph TD
1473296340800["widgets.TableWidgetSelectionRange"]
1473290768672["QtWidgets.QTableWidgetSelectionRange"]
1473291690208["Shiboken.Object"]
140713234304496["builtins.object"]
1473290768672 --> 1473296340800
1473291690208 --> 1473290768672
140713234304496 --> 1473291690208
🛈 DocStrings
Bases: QTableWidgetSelectionRange
Source code in prettyqt\widgets\tablewidgetselectionrange.py
| class TableWidgetSelectionRange(QtWidgets.QTableWidgetSelectionRange):
def __repr__(self):
return get_repr(
self, self.topRow(), self.leftColumn(), self.bottomRow(), self.rightColumn()
)
def __eq__(self, other: object):
return (
(
self.topRow() == other.topRow()
and self.bottomRow() == other.bottomRow()
and self.leftColumn() == other.leftColumn()
and self.rightColumn() == other.rightColumn()
)
if isinstance(other, TableWidgetSelectionRange)
else False
)
def __or__(
self, other: QtWidgets.QTableWidgetSelectionRange
) -> TableWidgetSelectionRange:
return TableWidgetSelectionRange(
min(self.topRow(), other.topRow()),
min(self.leftColumn(), other.leftColumn()),
max(self.bottomRow(), other.bottomRow()),
max(self.rightColumn(), other.rightColumn()),
)
def __and__(
self, other: QtWidgets.QTableWidgetSelectionRange
) -> TableWidgetSelectionRange:
return (
TableWidgetSelectionRange()
if other.topRow() > self.bottomRow()
and other.bottomRow() < self.topRow()
and other.leftColumn() > self.rightColumn()
and other.rightColumn() < self.leftColumn()
else TableWidgetSelectionRange(
max(self.topRow(), other.topRow()),
max(self.leftColumn(), other.leftColumn()),
min(self.bottomRow(), other.bottomRow()),
min(self.rightColumn(), other.rightColumn()),
)
)
|