updated annotations

This commit is contained in:
Atul R 2019-09-11 23:05:54 +02:00
parent bc84346bf5
commit e372f750bd
5 changed files with 8 additions and 3 deletions

View File

@ -32,6 +32,7 @@ export class QMainWindow extends NodeWidget {
};
}
setCentralWidget(widget: NodeWidget) {
// react:✓
this.native.setCentralWidget(widget.native, widget.getFlexNode());
this.centralWidget = widget;
}

View File

@ -50,6 +50,7 @@ export class QPlainTextEdit extends QAbstractScrollArea {
this.native.setPlainText(`${text}`);
}
setPlaceholderText(text: string) {
// react:✓, //TODO:getter
this.placeholderText = text;
this.native.setPlaceholderText(text);
}

View File

@ -28,16 +28,16 @@ export class QPushButton extends NodeWidget {
this.setText.bind(this);
this.setFlat.bind(this);
}
setText(text: string | number) {
// react:✓, //TODO:getter
this.native.setText(`${text}`);
}
setFlat(isFlat: boolean) {
// react:✓, //TODO:getter
this.native.setFlat(isFlat);
}
setIcon(icon: QIcon) {
// react:✓, //TODO:getter
this.native.setIcon(icon.native);
}
}

View File

@ -25,10 +25,12 @@ export class QScrollArea extends QAbstractScrollArea {
this.takeWidget.bind(this);
}
setWidget(widget: NodeWidget) {
// react:✓, //TODO:getter
this.contentWidget = widget;
this.native.setWidget(widget.native);
}
takeWidget(): NodeWidget | null {
// react:✓
const contentWidget = this.contentWidget;
this.contentWidget = null;
if (contentWidget) {

View File

@ -49,6 +49,7 @@ export abstract class NodeWidget extends EventWidget {
this.native.setGeometry(x, y, w, h);
};
geometry = (): Rect => {
// react:✓
return this.native.geometry();
};
setObjectName = (objectName: string) => {