nodeguy/src/lib/QtWidgets/QRadioButton.ts
Atul R 97c67219e2
Adds Abstract button - QPushbutton, checkbox and radiobutton methods and tests (#206)
* Adds QAbstract button and related methods to QPushbutton, checkbox and radiobutton
Also adds QIcon to QVariant

* Adds iconSize to abstract button
2019-11-19 01:27:26 +01:00

24 lines
705 B
TypeScript

import addon from '../utils/addon';
import { NodeWidget } from './QWidget';
import { BaseWidgetEvents } from '../core/EventWidget';
import { NativeElement } from '../core/Component';
import { QAbstractButton } from './QAbstractButton';
export const QRadioButtonEvents = Object.freeze({
...BaseWidgetEvents,
});
export class QRadioButton extends QAbstractButton {
native: NativeElement;
constructor(parent?: NodeWidget) {
let native;
if (parent) {
native = new addon.QRadioButton(parent.native);
} else {
native = new addon.QRadioButton();
}
super(native);
this.native = native;
this.nodeParent = parent;
}
}