Remove NodeHeaderView, use QHeaderView
This commit is contained in:
parent
387555f3c0
commit
7dcbc32540
@ -11,7 +11,22 @@ import { AlignmentFlag, checkIfNativeElement, Orientation, QPoint, SortOrder } f
|
||||
* **This class is a JS wrapper around Qt's [QHeaderView class](https://doc.qt.io/qt-5/qheaderview.html)**
|
||||
|
||||
*/
|
||||
export abstract class NodeHeaderView<Signals extends QHeaderViewSignals> extends QAbstractItemView<Signals> {
|
||||
export class QHeaderView<Signals extends QHeaderViewSignals = QHeaderViewSignals> extends QAbstractItemView<Signals> {
|
||||
constructor(orientationOrNative: Orientation | NativeElement, parent: QWidget | null = null) {
|
||||
let native: NativeElement;
|
||||
if (checkIfNativeElement(orientationOrNative)) {
|
||||
native = orientationOrNative as NativeElement;
|
||||
} else {
|
||||
if (parent != null) {
|
||||
native = new addon.QHeaderView(orientationOrNative, parent.native);
|
||||
} else {
|
||||
native = new addon.QHeaderView(orientationOrNative);
|
||||
}
|
||||
}
|
||||
super(native);
|
||||
parent && this.setNodeParent(parent);
|
||||
}
|
||||
|
||||
// *** Public Function ***
|
||||
cascadingSectionResizes(): boolean {
|
||||
return this.native.cascadingSectionResizes();
|
||||
@ -204,23 +219,6 @@ export abstract class NodeHeaderView<Signals extends QHeaderViewSignals> extends
|
||||
}
|
||||
}
|
||||
|
||||
export class QHeaderView extends NodeHeaderView<QHeaderViewSignals> {
|
||||
constructor(orientationOrNative: Orientation | NativeElement, parent: QWidget | null = null) {
|
||||
let native: NativeElement;
|
||||
if (checkIfNativeElement(orientationOrNative)) {
|
||||
native = orientationOrNative as NativeElement;
|
||||
} else {
|
||||
if (parent != null) {
|
||||
native = new addon.QHeaderView(orientationOrNative, parent.native);
|
||||
} else {
|
||||
native = new addon.QHeaderView(orientationOrNative);
|
||||
}
|
||||
}
|
||||
super(native);
|
||||
parent && this.setNodeParent(parent);
|
||||
}
|
||||
}
|
||||
|
||||
export enum QHeaderViewResizeMode {
|
||||
Interactive = 0,
|
||||
Fixed = 2,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user