CHeaderView
Implements the header view widget.
Module widgets/CHeaderView.js. This class is available through the browser modules in the download.
Declared members
static readonly DefaultSectionWidth = 120;static readonly DefaultSectionHeight = 24;static readonly DefaultVerticalWidth = 40;static readonly MinimumSectionSize = 20;static readonly ResizeHandleMargin = 4;readonly sectionResized: CSignal<[number, number, number]>;Public section resized member.
readonly sectionClicked: CSignal<[number]>;Emitted when a section is clicked.
readonly sortIndicatorChanged: CSignal<[number, CSortOrder]>;Emitted when the sort indicator changes.
constructor(orientation: COrientation, parent?: CWidget | null);Creates a new instance.
orientation(): COrientation;Provides orientation behavior.
model(): CAbstractItemModel | null;Provides model behavior.
setModel(model: CAbstractItemModel | null): void;Sets the model.
offset(): number;Provides offset behavior.
setOffset(offset: number): void;Sets the offset.
sortIndicatorSection(): number;Returns the section displaying the sort indicator.
sortIndicatorOrder(): CSortOrder;Returns the order displayed by the sort indicator.
setSortIndicator(section: number, order: CSortOrder): void;Sets the section and order displayed by the sort indicator.
isSortIndicatorShown(): boolean;Returns whether the sort indicator is visible.
setSortIndicatorShown(shown: boolean): void;Sets whether the sort indicator is visible.
sectionSize(section: number): number;Provides section size behavior.
resizeSection(section: number, size: number): void;Provides resize section behavior.
sectionPosition(section: number): number;Returns the position of a section before applying the scroll offset.
sectionAt(position: number): number;Returns the section at a position in the header viewport.
length(): number;Returns the total length of all sections.
sizeHint(): CSize;Returns the preferred size of the widget.
protected paintEvent(painter: CPainter): void;Handles the paint event.
protected mousePressEvent(event: CMouseEvent): void;Handles the mouse press event.
protected mouseMoveEvent(event: CMouseEvent): void;Handles the mouse move event.
protected mouseReleaseEvent(event: CMouseEvent): void;Handles the mouse release event.
protected mouseLeaveEvent(event: CMouseEvent): void;Handles the mouse leave event.